From 6694742fb5e0ee6425763dae34dac5425fe6e2cb Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 1 Nov 2007 21:27:59 +0000 Subject: [PATCH] --- yaml --- r: 73354 b: refs/heads/master c: c617360afaeeef4bf3768dc0537edfc72ffb2763 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/local_ops.txt | 23 -- trunk/Documentation/networking/00-INDEX | 10 + trunk/Documentation/networking/Configurable | 34 ++ trunk/Documentation/networking/comx.txt | 248 ++++++++++++ trunk/Documentation/networking/ncsa-telnet | 16 + trunk/Documentation/networking/pt.txt | 58 +++ trunk/Documentation/networking/routing.txt | 46 +++ trunk/Documentation/networking/slicecom.hun | 371 ++++++++++++++++++ trunk/Documentation/networking/slicecom.txt | 369 +++++++++++++++++ .../powerpc/booting-without-of.txt | 275 +------------ .../Documentation/video4linux/CARDLIST.em28xx | 3 - trunk/MAINTAINERS | 6 +- trunk/Makefile | 21 +- trunk/arch/frv/mm/init.c | 2 +- trunk/arch/powerpc/boot/dts/walnut.dts | 4 +- trunk/arch/powerpc/boot/wrapper | 43 +- trunk/arch/powerpc/configs/pasemi_defconfig | 308 ++++++--------- trunk/arch/powerpc/configs/ppc64_defconfig | 247 ++++-------- trunk/arch/powerpc/kernel/cputable.c | 36 +- trunk/arch/powerpc/kernel/entry_32.S | 23 -- trunk/arch/powerpc/kernel/head_64.S | 2 +- trunk/arch/powerpc/kernel/idle.c | 2 +- trunk/arch/powerpc/kernel/misc_32.S | 32 +- trunk/arch/powerpc/kernel/prom.c | 12 - trunk/arch/powerpc/kernel/prom_init.c | 2 +- trunk/arch/powerpc/kernel/setup_64.c | 19 +- trunk/arch/powerpc/kernel/swsusp_32.S | 2 - trunk/arch/powerpc/kernel/time.c | 10 +- trunk/arch/powerpc/kernel/vmlinux.lds.S | 3 +- trunk/arch/powerpc/mm/40x_mmu.c | 17 +- trunk/arch/powerpc/mm/44x_mmu.c | 1 - trunk/arch/powerpc/mm/fault.c | 2 +- trunk/arch/powerpc/mm/hash_low_64.S | 5 +- trunk/arch/powerpc/mm/hash_utils_64.c | 7 +- trunk/arch/powerpc/mm/mmu_decl.h | 4 +- trunk/arch/powerpc/mm/slb.c | 35 +- trunk/arch/powerpc/platforms/cell/interrupt.c | 24 +- trunk/arch/powerpc/platforms/cell/smp.c | 1 - trunk/arch/powerpc/platforms/celleb/setup.c | 1 - trunk/arch/powerpc/platforms/iseries/irq.h | 4 - trunk/arch/powerpc/platforms/iseries/setup.c | 4 + trunk/arch/powerpc/platforms/iseries/vio.c | 10 +- trunk/arch/powerpc/platforms/pseries/eeh.c | 13 +- .../powerpc/platforms/pseries/eeh_driver.c | 18 +- .../arch/powerpc/platforms/pseries/firmware.c | 1 - trunk/arch/powerpc/platforms/pseries/msi.c | 6 - trunk/arch/powerpc/sysdev/i8259.c | 1 - trunk/arch/powerpc/sysdev/mv64x60_pci.c | 10 +- trunk/arch/ppc/kernel/entry.S | 23 -- trunk/arch/ppc/kernel/misc.S | 31 +- trunk/arch/ppc/mm/44x_mmu.c | 1 - trunk/arch/ppc/mm/4xx_mmu.c | 17 +- trunk/arch/ppc/mm/fault.c | 2 +- trunk/arch/ppc/mm/mmu_decl.h | 4 +- trunk/arch/ppc/platforms/4xx/ebony.c | 2 +- trunk/arch/ppc/platforms/4xx/luan.c | 7 +- trunk/arch/ppc/platforms/4xx/ocotea.c | 2 +- trunk/arch/ppc/platforms/4xx/taishan.c | 2 +- trunk/arch/ppc/syslib/i8259.c | 1 - trunk/arch/ppc/syslib/m8260_setup.c | 13 +- trunk/arch/s390/kernel/early.c | 4 +- trunk/arch/s390/kernel/process.c | 8 +- trunk/arch/s390/kernel/smp.c | 6 +- trunk/arch/s390/kernel/time.c | 2 +- trunk/arch/sparc/kernel/irq.c | 1 + trunk/arch/sparc64/kernel/ds.c | 1 + trunk/arch/sparc64/kernel/module.c | 1 + trunk/arch/sparc64/kernel/sys_sparc32.c | 1 + trunk/arch/sparc64/kernel/sys_sunos32.c | 1 + trunk/arch/sparc64/kernel/time.c | 2 + trunk/arch/um/Makefile | 7 +- trunk/arch/um/Makefile-i386 | 4 +- trunk/arch/um/drivers/ubd_kern.c | 2 +- trunk/arch/x86/boot/pmjump.S | 8 +- trunk/arch/x86/lguest/boot.c | 69 ++-- trunk/block/cfq-iosched.c | 34 +- trunk/block/ll_rw_blk.c | 41 +- trunk/drivers/ata/ata_piix.c | 1 - trunk/drivers/ata/libata-core.c | 39 +- trunk/drivers/ata/pata_hpt37x.c | 49 +-- trunk/drivers/ata/pata_serverworks.c | 11 +- trunk/drivers/block/paride/pt.c | 2 +- trunk/drivers/block/pktcdvd.c | 9 - trunk/drivers/char/drm/drmP.h | 2 + trunk/drivers/char/drm/drm_ioctl.c | 2 +- trunk/drivers/char/drm/drm_os_linux.h | 8 + trunk/drivers/char/drm/savage_bci.c | 3 + trunk/drivers/char/tty_ioctl.c | 170 ++++---- trunk/drivers/char/virtio_console.c | 2 +- trunk/drivers/firewire/fw-sbp2.c | 11 +- trunk/drivers/ide/Kconfig | 22 +- trunk/drivers/ide/ide-dma.c | 5 +- trunk/drivers/ide/ide-io.c | 5 +- trunk/drivers/ide/ide-iops.c | 8 +- trunk/drivers/ide/ide-probe.c | 5 +- trunk/drivers/ide/ide-taskfile.c | 3 - trunk/drivers/ide/pci/piix.c | 1 - trunk/drivers/isdn/hisax/Kconfig | 18 +- trunk/drivers/isdn/hisax/avm_pci.c | 4 +- trunk/drivers/isdn/hisax/diva.c | 6 +- trunk/drivers/isdn/hisax/elsa.c | 6 +- trunk/drivers/isdn/hisax/gazel.c | 4 +- trunk/drivers/isdn/hisax/niccy.c | 7 +- trunk/drivers/isdn/hisax/sedlbauer.c | 4 +- trunk/drivers/leds/leds-gpio.c | 20 +- trunk/drivers/macintosh/windfarm_core.c | 10 +- trunk/drivers/md/bitmap.c | 3 +- trunk/drivers/md/dm-table.c | 3 +- trunk/drivers/md/linear.c | 3 +- trunk/drivers/md/md.c | 4 +- trunk/drivers/md/multipath.c | 3 +- trunk/drivers/md/raid0.c | 3 +- trunk/drivers/md/raid1.c | 3 +- trunk/drivers/md/raid10.c | 3 +- trunk/drivers/md/raid5.c | 17 +- trunk/drivers/media/Kconfig | 1 - trunk/drivers/media/common/saa7146_core.c | 70 +--- trunk/drivers/media/dvb/frontends/mt2131.c | 2 +- trunk/drivers/media/dvb/frontends/s5h1409.c | 96 +---- trunk/drivers/media/dvb/frontends/stv0297.c | 22 +- trunk/drivers/media/dvb/frontends/tda10021.c | 6 - trunk/drivers/media/dvb/frontends/ves1820.c | 2 +- trunk/drivers/media/dvb/ttpci/Kconfig | 2 +- trunk/drivers/media/video/Kconfig | 2 +- trunk/drivers/media/video/bt8xx/bttv-driver.c | 6 +- trunk/drivers/media/video/cafe_ccic.c | 6 - trunk/drivers/media/video/cx23885/Kconfig | 2 +- trunk/drivers/media/video/cx88/Kconfig | 2 +- trunk/drivers/media/video/em28xx/Kconfig | 2 +- trunk/drivers/media/video/em28xx/em28xx-i2c.c | 6 +- .../drivers/media/video/em28xx/em28xx-video.c | 1 - trunk/drivers/media/video/planb.c | 8 +- .../media/video/pvrusb2/pvrusb2-ctrl.c | 2 +- .../media/video/pvrusb2/pvrusb2-main.c | 5 +- .../media/video/pvrusb2/pvrusb2-sysfs.c | 8 + trunk/drivers/media/video/saa7134/Kconfig | 2 +- .../media/video/saa7134/saa7134-alsa.c | 16 +- .../media/video/saa7134/saa7134-cards.c | 4 +- trunk/drivers/media/video/tuner-core.c | 6 +- trunk/drivers/media/video/tvp5150.c | 16 +- trunk/drivers/message/i2o/i2o_block.c | 4 +- trunk/drivers/mmc/card/queue.c | 2 +- trunk/drivers/net/82596.c | 3 +- trunk/drivers/net/Kconfig | 7 +- trunk/drivers/net/hamradio/6pack.c | 26 +- trunk/drivers/net/irda/irtty-sir.c | 7 +- trunk/drivers/net/phy/marvell.c | 23 +- trunk/drivers/net/phy/phy_device.c | 2 +- trunk/drivers/net/ppp_async.c | 10 +- trunk/drivers/net/ppp_synctty.c | 10 +- trunk/drivers/net/pppol2tp.c | 25 +- trunk/drivers/net/rrunner.c | 18 + trunk/drivers/net/slip.c | 8 +- trunk/drivers/net/sunhme.c | 4 +- trunk/drivers/net/tg3.c | 9 + trunk/drivers/net/usb/Kconfig | 9 +- trunk/drivers/net/usb/usbnet.c | 7 + trunk/drivers/net/wan/x25_asy.c | 6 +- trunk/drivers/net/wireless/strip.c | 10 +- trunk/drivers/pci/Kconfig | 11 - trunk/drivers/pci/hotplug/Kconfig | 6 +- trunk/drivers/pci/hotplug/cpqphp_ctrl.c | 16 +- trunk/drivers/pci/msi.c | 18 +- trunk/drivers/pci/pci-driver.c | 5 +- trunk/drivers/pci/quirks.c | 51 +-- trunk/drivers/pci/search.c | 9 - trunk/drivers/rtc/rtc-m48t59.c | 6 +- trunk/drivers/s390/block/dcssblk.c | 9 +- trunk/drivers/s390/cio/cmf.c | 4 +- trunk/drivers/s390/cio/device.c | 2 +- trunk/drivers/s390/net/smsgiucv.c | 4 - trunk/drivers/scsi/Kconfig | 2 +- trunk/drivers/scsi/ibmvscsi/ibmvscsi.c | 19 +- trunk/drivers/scsi/lpfc/lpfc_scsi.c | 5 +- trunk/drivers/scsi/osst.c | 6 +- trunk/drivers/serial/8250_early.c | 4 +- trunk/drivers/serial/8250_pci.c | 5 +- trunk/drivers/serial/uartlite.c | 10 +- trunk/drivers/telephony/phonedev.c | 5 +- trunk/fs/9p/v9fs.c | 6 +- trunk/fs/9p/vfs_super.c | 3 - trunk/fs/afs/vlocation.c | 2 +- trunk/fs/dlm/lowcomms.c | 6 +- trunk/fs/ecryptfs/crypto.c | 28 +- trunk/fs/ioprio.c | 4 - trunk/fs/ocfs2/alloc.c | 2 +- trunk/fs/ocfs2/aops.c | 22 -- trunk/fs/ocfs2/cluster/heartbeat.c | 2 +- trunk/fs/ocfs2/dcache.c | 2 +- trunk/fs/ocfs2/dir.c | 6 +- trunk/fs/ocfs2/dlmglue.c | 25 +- trunk/fs/ocfs2/file.c | 26 +- trunk/fs/ocfs2/namei.c | 13 +- trunk/fs/proc/proc_net.c | 7 + trunk/include/asm-arm/hardware/iop3xx.h | 2 +- trunk/include/asm-arm26/irq_regs.h | 1 + trunk/include/asm-frv/irq.h | 3 + trunk/include/asm-m68knommu/unistd.h | 4 +- trunk/include/asm-powerpc/commproc.h | 2 +- trunk/include/asm-powerpc/pgtable-ppc32.h | 13 - trunk/include/asm-powerpc/systbl.h | 2 +- trunk/include/asm-powerpc/time.h | 20 +- trunk/include/asm-powerpc/tlbflush.h | 12 +- trunk/include/asm-sparc64/vio.h | 4 +- trunk/include/asm-x86/lguest_hcall.h | 3 + trunk/include/linux/ata.h | 11 - trunk/include/linux/blkdev.h | 1 - trunk/include/linux/futex.h | 4 + trunk/include/linux/ide.h | 9 +- trunk/include/linux/kallsyms.h | 1 - trunk/include/linux/libata.h | 1 - trunk/include/linux/mroute.h | 12 - trunk/include/linux/netfilter/Kbuild | 18 +- trunk/include/linux/netfilter_ipv4/Kbuild | 28 +- trunk/include/linux/netfilter_ipv6/Kbuild | 2 +- trunk/include/linux/netlink.h | 2 +- trunk/include/linux/pci.h | 14 +- trunk/include/linux/pci_ids.h | 5 +- trunk/include/linux/proc_fs.h | 3 + trunk/include/linux/tty.h | 4 +- trunk/include/net/inet_hashtables.h | 71 +--- trunk/include/net/ip_fib.h | 15 +- trunk/include/net/ip_vs.h | 8 - trunk/include/net/sock.h | 63 +-- trunk/ipc/mqueue.c | 6 +- trunk/kernel/futex.c | 11 +- trunk/kernel/sysctl_check.c | 1 - trunk/kernel/time/tick-broadcast.c | 2 +- trunk/kernel/time/tick-sched.c | 2 +- trunk/kernel/timer.c | 2 +- trunk/lib/bitmap.c | 4 - trunk/lib/libcrc32c.c | 7 +- trunk/mm/memory.c | 1 + trunk/mm/slub.c | 20 +- trunk/net/8021q/vlan.c | 1 - trunk/net/9p/mod.c | 4 +- trunk/net/9p/trans_fd.c | 3 +- trunk/net/bridge/netfilter/ebt_arp.c | 2 +- trunk/net/core/dst.c | 1 + trunk/net/core/neighbour.c | 2 - trunk/net/core/net_namespace.c | 28 +- trunk/net/core/sock.c | 69 +--- trunk/net/dccp/ipv4.c | 3 - trunk/net/dccp/ipv6.c | 3 - trunk/net/dccp/proto.c | 9 +- trunk/net/decnet/dn_dev.c | 2 +- trunk/net/ieee80211/ieee80211_crypt_tkip.c | 1 + trunk/net/ieee80211/ieee80211_crypt_wep.c | 1 + trunk/net/ipv4/fib_frontend.c | 15 +- trunk/net/ipv4/inet_diag.c | 9 +- trunk/net/ipv4/inet_hashtables.c | 7 +- trunk/net/ipv4/inet_timewait_sock.c | 13 +- trunk/net/ipv4/ip_output.c | 28 +- trunk/net/ipv4/ip_sockglue.c | 39 +- trunk/net/ipv4/ipcomp.c | 3 +- trunk/net/ipv4/ipvs/ip_vs_conn.c | 19 - trunk/net/ipv4/ipvs/ip_vs_core.c | 20 +- trunk/net/ipv4/ipvs/ip_vs_ctl.c | 26 -- trunk/net/ipv4/ipvs/ip_vs_sync.c | 24 +- trunk/net/ipv4/netfilter/Makefile | 20 +- trunk/net/ipv4/netfilter/ip_queue.c | 37 +- trunk/net/ipv4/netfilter/nf_nat_amanda.c | 2 +- trunk/net/ipv4/netfilter/nf_nat_ftp.c | 2 +- trunk/net/ipv4/netfilter/nf_nat_h323.c | 18 +- trunk/net/ipv4/netfilter/nf_nat_irc.c | 2 +- trunk/net/ipv4/netfilter/nf_nat_pptp.c | 8 +- trunk/net/ipv4/netfilter/nf_nat_sip.c | 4 +- trunk/net/ipv4/netfilter/nf_nat_tftp.c | 2 +- trunk/net/ipv4/proc.c | 19 +- trunk/net/ipv4/raw.c | 3 - trunk/net/ipv4/tcp.c | 4 +- trunk/net/ipv4/tcp_ipv4.c | 14 +- trunk/net/ipv4/udp.c | 3 - trunk/net/ipv4/udplite.c | 3 - trunk/net/ipv6/inet6_hashtables.c | 19 +- trunk/net/ipv6/ip6_output.c | 36 +- trunk/net/ipv6/ipcomp6.c | 3 +- trunk/net/ipv6/netfilter/Makefile | 28 +- trunk/net/ipv6/netfilter/ip6_queue.c | 37 +- trunk/net/ipv6/proc.c | 19 +- trunk/net/ipv6/raw.c | 3 - trunk/net/ipv6/route.c | 91 +++-- trunk/net/ipv6/tcp_ipv6.c | 3 - trunk/net/ipv6/udp.c | 8 +- trunk/net/ipv6/udplite.c | 3 - trunk/net/netfilter/Makefile | 14 +- trunk/net/netfilter/nf_sockopt.c | 13 +- trunk/net/netfilter/xt_connlimit.c | 5 +- trunk/net/netfilter/xt_time.c | 3 +- trunk/net/netfilter/xt_u32.c | 5 +- trunk/net/netlink/af_netlink.c | 10 +- trunk/net/sched/cls_u32.c | 4 +- trunk/net/sched/sch_teql.c | 3 - trunk/net/sctp/socket.c | 6 - trunk/security/selinux/ss/avtab.c | 32 +- trunk/security/selinux/ss/avtab.h | 5 +- trunk/security/selinux/ss/conditional.c | 3 +- trunk/security/selinux/ss/ebitmap.c | 2 +- trunk/security/selinux/ss/mls.c | 66 ++-- trunk/security/selinux/ss/mls.h | 2 - trunk/security/selinux/ss/policydb.c | 45 +-- trunk/security/selinux/ss/policydb.h | 3 - trunk/security/selinux/xfrm.c | 13 +- 304 files changed, 2587 insertions(+), 2769 deletions(-) create mode 100644 trunk/Documentation/networking/Configurable create mode 100644 trunk/Documentation/networking/comx.txt create mode 100644 trunk/Documentation/networking/ncsa-telnet create mode 100644 trunk/Documentation/networking/pt.txt create mode 100644 trunk/Documentation/networking/routing.txt create mode 100644 trunk/Documentation/networking/slicecom.hun create mode 100644 trunk/Documentation/networking/slicecom.txt create mode 100644 trunk/include/asm-arm26/irq_regs.h diff --git a/[refs] b/[refs] index 70a95fe8c842..b68b1235ce55 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cb834e7cc0e8b223386f219c1d1986846c87c55f +refs/heads/master: c617360afaeeef4bf3768dc0537edfc72ffb2763 diff --git a/trunk/Documentation/local_ops.txt b/trunk/Documentation/local_ops.txt index 1a45f11e645e..4269a1105b37 100644 --- a/trunk/Documentation/local_ops.txt +++ b/trunk/Documentation/local_ops.txt @@ -45,29 +45,6 @@ long fails. The definition looks like : typedef struct { atomic_long_t a; } local_t; -* Rules to follow when using local atomic operations - -- Variables touched by local ops must be per cpu variables. -- _Only_ the CPU owner of these variables must write to them. -- This CPU can use local ops from any context (process, irq, softirq, nmi, ...) - to update its local_t variables. -- Preemption (or interrupts) must be disabled when using local ops in - process context to make sure the process won't be migrated to a - different CPU between getting the per-cpu variable and doing the - actual local op. -- When using local ops in interrupt context, no special care must be - taken on a mainline kernel, since they will run on the local CPU with - preemption already disabled. I suggest, however, to explicitly - disable preemption anyway to make sure it will still work correctly on - -rt kernels. -- Reading the local cpu variable will provide the current copy of the - variable. -- Reads of these variables can be done from any CPU, because updates to - "long", aligned, variables are always atomic. Since no memory - synchronization is done by the writer CPU, an outdated copy of the - variable can be read when reading some _other_ cpu's variables. - - * Rules to follow when using local atomic operations - Variables touched by local ops must be per cpu variables. diff --git a/trunk/Documentation/networking/00-INDEX b/trunk/Documentation/networking/00-INDEX index 563e442f2d42..f5a5e6d3d541 100644 --- a/trunk/Documentation/networking/00-INDEX +++ b/trunk/Documentation/networking/00-INDEX @@ -4,6 +4,8 @@ - information on the 3Com EtherLink Plus (3c505) driver. 6pack.txt - info on the 6pack protocol, an alternative to KISS for AX.25 +Configurable + - info on some of the configurable network parameters DLINK.txt - info on the D-Link DE-600/DE-620 parallel port pocket adapters PLIP.txt @@ -24,6 +26,8 @@ baycom.txt - info on the driver for Baycom style amateur radio modems bridge.txt - where to get user space programs for ethernet bridging with Linux. +comx.txt + - info on drivers for COMX line of synchronous serial adapters. cops.txt - info on the COPS LocalTalk Linux driver cs89x0.txt @@ -74,14 +78,20 @@ ltpc.txt - the Apple or Farallon LocalTalk PC card driver multicast.txt - Behaviour of cards under Multicast +ncsa-telnet + - notes on how NCSA telnet (DOS) breaks with MTU discovery enabled. netdevices.txt - info on network device driver functions exported to the kernel. olympic.txt - IBM PCI Pit/Pit-Phy/Olympic Token Ring driver info. policy-routing.txt - IP policy-based routing +pt.txt + - the Gracilis Packetwin AX.25 device driver ray_cs.txt - Raylink Wireless LAN card driver info. +routing.txt + - the new routing mechanism shaper.txt - info on the module that can shape/limit transmitted traffic. sk98lin.txt diff --git a/trunk/Documentation/networking/Configurable b/trunk/Documentation/networking/Configurable new file mode 100644 index 000000000000..69c0dd466ead --- /dev/null +++ b/trunk/Documentation/networking/Configurable @@ -0,0 +1,34 @@ + +There are a few network parameters that can be tuned to better match +the kernel to your system hardware and intended usage. The defaults +are usually a good choice for 99% of the people 99% of the time, but +you should be aware they do exist and can be changed. + +The current list of parameters can be found in the files: + + linux/net/TUNABLE + Documentation/networking/ip-sysctl.txt + +Some of these are accessible via the sysctl interface, and many more are +scheduled to be added in this way. For example, some parameters related +to Address Resolution Protocol (ARP) are very easily viewed and altered. + + # cat /proc/sys/net/ipv4/arp_timeout + 6000 + # echo 7000 > /proc/sys/net/ipv4/arp_timeout + # cat /proc/sys/net/ipv4/arp_timeout + 7000 + +Others are already accessible via the related user space programs. +For example, MAX_WINDOW has a default of 32 k which is a good choice for +modern hardware, but if you have a slow (8 bit) Ethernet card and/or a slow +machine, then this will be far too big for the card to keep up with fast +machines transmitting on the same net, resulting in overruns and receive errors. +A value of about 4 k would be more appropriate, which can be set via: + + # route add -net 192.168.3.0 window 4096 + +The remainder of these can only be presently changed by altering a #define +in the related header file. This means an edit and recompile cycle. + + Paul Gortmaker 06/96 diff --git a/trunk/Documentation/networking/comx.txt b/trunk/Documentation/networking/comx.txt new file mode 100644 index 000000000000..d1526eba2645 --- /dev/null +++ b/trunk/Documentation/networking/comx.txt @@ -0,0 +1,248 @@ + + COMX drivers for the 2.2 kernel + +Originally written by: Tivadar Szemethy, +Currently maintained by: Gergely Madarasz + +Last change: 21/06/1999. + +INTRODUCTION + +This document describes the software drivers and their use for the +COMX line of synchronous serial adapters for Linux version 2.2.0 and +above. +The cards are produced and sold by ITC-Pro Ltd. Budapest, Hungary +For further info contact +or http://www.itc.hu (mostly in Hungarian). +The firmware files and software are available from ftp://ftp.itc.hu + +Currently, the drivers support the following cards and protocols: + +COMX (2x64 kbps intelligent board) +CMX (1x256 + 1x128 kbps intelligent board) +HiCOMX (2x2Mbps intelligent board) +LoCOMX (1x512 kbps passive board) +MixCOM (1x512 or 2x512kbps passive board with a hardware watchdog an + optional BRI interface and optional flashROM (1-32M)) +SliceCOM (1x2Mbps channelized E1 board) +PciCOM (X21) + +At the moment of writing this document, the (Cisco)-HDLC, LAPB, SyncPPP and +Frame Relay (DTE, rfc1294 IP encapsulation with partially implemented Q933a +LMI) protocols are available as link-level protocol. +X.25 support is being worked on. + +USAGE + +Load the comx.o module and the hardware-specific and protocol-specific +modules you'll need into the running kernel using the insmod utility. +This creates the /proc/comx directory. +See the example scripts in the 'etc' directory. + +/proc INTERFACE INTRO + +The COMX driver set has a new type of user interface based on the /proc +filesystem which eliminates the need for external user-land software doing +IOCTL calls. +Each network interface or device (i.e. those ones you configure with 'ifconfig' +and 'route' etc.) has a corresponding directory under /proc/comx. You can +dynamically create a new interface by saying 'mkdir /proc/comx/comx0' (or you +can name it whatever you want up to 8 characters long, comx[n] is just a +convention). +Generally the files contained in these directories are text files, which can +be viewed by 'cat filename' and you can write a string to such a file by +saying 'echo _string_ >filename'. This is very similar to the sysctl interface. +Don't use a text editor to edit these files, always use 'echo' (or 'cat' +where appropriate). +When you've created the comx[n] directory, two files are created automagically +in it: 'boardtype' and 'protocol'. You have to fill in these files correctly +for your board and protocol you intend to use (see the board and protocol +descriptions in this file below or the example scripts in the 'etc' directory). +After filling in these files, other files will appear in the directory for +setting the various hardware- and protocol-related informations (for example +irq and io addresses, keepalive values etc.) These files are set to default +values upon creation, so you don't necessarily have to change all of them. + +When you're ready with filling in the files in the comx[n] directory, you can +configure the corresponding network interface with the standard network +configuration utilities. If you're unable to bring the interfaces up, look up +the various kernel log files on your system, and consult the messages for +a probable reason. + +EXAMPLE + +To create the interface 'comx0' which is the first channel of a COMX card: + +insmod comx +# insmod comx-hw-comx ; insmod comx-proto-ppp (these are usually +autoloaded if you use the kernel module loader) + +mkdir /proc/comx/comx0 +echo comx >/proc/comx/comx0/boardtype +echo 0x360 >/proc/comx/comx0/io <- jumper-selectable I/O port +echo 0x0a >/proc/comx/comx0/irq <- jumper-selectable IRQ line +echo 0xd000 >/proc/comx/comx0/memaddr <- software-configurable memory + address. COMX uses 64 KB, and this + can be: 0xa000, 0xb000, 0xc000, + 0xd000, 0xe000. Avoid conflicts + with other hardware. +cat /proc/comx/comx0/firmware <- the firmware for the card +echo HDLC >/proc/comx/comx0/protocol <- the data-link protocol +echo 10 >/proc/comx/comx0/keepalive <- the keepalive for the protocol +ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255 <- + finally configure it with ifconfig +Check its status: +cat /proc/comx/comx0/status + +If you want to use the second channel of this board: + +mkdir /proc/comx/comx1 +echo comx >/proc/comx/comx1/boardtype +echo 0x360 >/proc/comx/comx1/io +echo 10 >/proc/comx/comx1/irq +echo 0xd000 >/proc/comx/comx1/memaddr +echo 1 >/proc/comx/comx1/channel <- channels are numbered + as 0 (default) and 1 + +Now, check if the driver recognized that you're going to use the other +channel of the same adapter: + +cat /proc/comx/comx0/twin +comx1 +cat /proc/comx/comx1/twin +comx0 + +You don't have to load the firmware twice, if you use both channels of +an adapter, just write it into the channel 0's /proc firmware file. + +Default values: io 0x360 for COMX, 0x320 (HICOMX), irq 10, memaddr 0xd0000 + +THE LOCOMX HARDWARE DRIVER + +The LoCOMX driver doesn't require firmware, and it doesn't use memory either, +but it uses DMA channels 1 and 3. You can set the clock rate (if enabled by +jumpers on the board) by writing the kbps value into the file named 'clock'. +Set it to 'external' (it is the default) if you have external clock source. + +(Note: currently the LoCOMX driver does not support the internal clock) + +THE COMX, CMX AND HICOMX DRIVERS + +On the HICOMX, COMX and CMX, you have to load the firmware (it is different for +the three cards!). All these adapters can share the same memory +address (we usually use 0xd0000). On the CMX you can set the internal +clock rate (if enabled by jumpers on the small adapter boards) by writing +the kbps value into the 'clock' file. You have to do this before initializing +the card. If you use both HICOMX and CMX/COMX cards, initialize the HICOMX +first. The I/O address of the HICOMX board is not configurable by any +method available to the user: it is hardwired to 0x320, and if you have to +change it, consult ITC-Pro Ltd. + +THE MIXCOM DRIVER + +The MixCOM board doesn't require firmware, the driver communicates with +it through I/O ports. You can have three of these cards in one machine. + +THE SLICECOM DRIVER + +The SliceCOM board doesn't require firmware. You can have 4 of these cards +in one machine. The driver doesn't (yet) support shared interrupts, so +you will need a separate IRQ line for every board. +Read Documentation/networking/slicecom.txt for help on configuring +this adapter. + +THE HDLC/PPP LINE PROTOCOL DRIVER + +The HDLC/SyncPPP line protocol driver uses the kernel's built-in syncppp +driver (syncppp.o). You don't have to manually select syncppp.o when building +the kernel, the dependencies compile it in automatically. + + + + +EXAMPLE +(setting up hw parameters, see above) + +# using HDLC: +echo hdlc >/proc/comx/comx0/protocol +echo 10 >/proc/comx/comx0/keepalive <- not necessary, 10 is the default +ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255 + +(setting up hw parameters, see above) + +# using PPP: +echo ppp >/proc/comx/comx0/protocol +ifconfig comx0 up +ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255 + + +THE LAPB LINE PROTOCOL DRIVER + +For this, you'll need to configure LAPB support (See 'LAPB Data Link Driver' in +'Network options' section) into your kernel (thanks to Jonathan Naylor for his +excellent implementation). +comx-proto-lapb.o provides the following files in the appropriate directory +(the default values in parens): t1 (5), t2 (1), n2 (20), mode (DTE, STD) and +window (7). Agree with the administrator of your peer router on these +settings (most people use defaults, but you have to know if you are DTE or +DCE). + +EXAMPLE + +(setting up hw parameters, see above) +echo lapb >/proc/comx/comx0/protocol +echo dce >/proc/comx/comx0/mode <- DCE interface in this example +ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255 + + +THE FRAME RELAY PROTOCOL DRIVER + +You DON'T need any other frame relay related modules from the kernel to use +COMX-Frame Relay. This protocol is a bit more complicated than the others, +because it allows to use 'subinterfaces' or DLCIs within one physical device. +First you have to create the 'master' device (the actual physical interface) +as you would do for other protocols. Specify 'frad' as protocol type. +Now you can bring this interface up by saying 'ifconfig comx0 up' (or whatever +you've named the interface). Do not assign any IP address to this interface +and do not set any routes through it. +Then, set up your DLCIs the following way: create a comx interface for each +DLCI you intend to use (with mkdir), and write 'dlci' to the 'boardtype' file, +and 'ietf-ip' to the 'protocol' file. Currently, the only supported +encapsulation type is this (also called as RFC1294/1490 IP encapsulation). +Write the DLCI number to the 'dlci' file, and write the name of the physical +COMX device to the file called 'master'. +Now you can assign an IP address to this interface and set routes using it. +See the example file for further info and example config script. +Notes: this driver implements a DTE interface with partially implemented +Q933a LMI. +You can find an extensively commented example in the 'etc' directory. + +FURTHER /proc FILES + +boardtype: +Type of the hardware. Valid values are: + 'comx', 'hicomx', 'locomx', 'cmx', 'slicecom'. + +protocol: +Data-link protocol on this channel. Can be: HDLC, LAPB, PPP, FRAD + +status: +You can read the channel's actual status from the 'status' file, for example +'cat /proc/comx/comx3/status'. + +lineup_delay: +Interpreted in seconds (default is 1). Used to avoid line jitter: the system +will consider the line status 'UP' only if it is up for at least this number +of seconds. + +debug: +You can set various debug options through this file. Valid options are: +'comx_events', 'comx_tx', 'comx_rx', 'hw_events', 'hw_tx', 'hw_rx'. +You can enable a debug options by writing its name prepended by a '+' into +the debug file, for example 'echo +comx_rx >comx0/debug'. +Disabling an option happens similarly, use the '-' prefix +(e.g. 'echo -hw_rx >debug'). +Debug results can be read from the debug file, for example: +tail -f /proc/comx/comx2/debug + + diff --git a/trunk/Documentation/networking/ncsa-telnet b/trunk/Documentation/networking/ncsa-telnet new file mode 100644 index 000000000000..d77d28b09093 --- /dev/null +++ b/trunk/Documentation/networking/ncsa-telnet @@ -0,0 +1,16 @@ +NCSA telnet doesn't work with path MTU discovery enabled. This is due to a +bug in NCSA that also stops it working with other modern networking code +such as Solaris. + +The following information is courtesy of +Marek + +There is a fixed version somewhere on ftp.upe.ac.za (sorry, I don't +remember the exact pathname, and this site is very slow from here). +It may or may not be faster for you to get it from +ftp://ftp.ists.pwr.wroc.pl/pub/msdos/telnet/ncsa_upe/tel23074.zip +(source is in v230704s.zip). I have tested it with 1.3.79 (with +path mtu discovery enabled - ncsa 2.3.08 didn't work) and it seems +to work. I don't know if anyone is working on this code - this +version is over a year old. Too bad - it's faster and often more +stable than these windoze telnets, and runs on almost anything... diff --git a/trunk/Documentation/networking/pt.txt b/trunk/Documentation/networking/pt.txt new file mode 100644 index 000000000000..72e888c1d988 --- /dev/null +++ b/trunk/Documentation/networking/pt.txt @@ -0,0 +1,58 @@ +This is the README for the Gracilis Packetwin device driver, version 0.5 +ALPHA for Linux 1.3.43. + +These files will allow you to talk to the PackeTwin (now know as PT) and +connect through it just like a pair of TNCs. To do this you will also +require the AX.25 code in the kernel enabled. + +There are four files in this archive; this readme, a patch file, a .c file +and finally a .h file. The two program files need to be put into the +drivers/net directory in the Linux source tree, for me this is the +directory /usr/src/linux/drivers/net. The patch file needs to be patched in +at the top of the Linux source tree (/usr/src/linux in my case). + +You will most probably have to edit the pt.c file to suit your own setup, +this should just involve changing some of the defines at the top of the file. +Please note that if you run an external modem you must specify a speed of 0. + +The program is currently setup to run a 4800 baud external modem on port A +and a Kantronics DE-9600 daughter board on port B so if you have this (or +something similar) then you're right. + +To compile in the driver, put the files in the correct place and patch in +the diff. You will have to re-configure the kernel again before you +recompile it. + +The driver is not real good at the moment for finding the card. You can +'help' it by changing the order of the potential addresses in the structure +found in the pt_init() function so the address of where the card is is put +first. + +After compiling, you have to get them going, they are pretty well like any +other net device and just need ifconfig to get them going. +As an example, here is my /etc/rc.net +-------------------------- + +# +# Configure the PackeTwin, port A. +/sbin/ifconfig pt0a 44.136.8.87 hw ax25 vk2xlz mtu 512 +/sbin/ifconfig pt0a 44.136.8.87 broadcast 44.136.8.255 netmask 255.255.255.0 +/sbin/route add -net 44.136.8.0 netmask 255.255.255.0 dev pt0a +/sbin/route add -net 44.0.0.0 netmask 255.0.0.0 gw 44.136.8.68 dev pt0a +/sbin/route add -net 138.25.16.0 netmask 255.255.240.0 dev pt0a +/sbin/route add -host 44.136.8.255 dev pt0a +# +# Configure the PackeTwin, port B. +/sbin/ifconfig pt0b 44.136.8.87 hw ax25 vk2xlz-1 mtu 512 +/sbin/ifconfig pt0b 44.136.8.87 broadcast 44.255.255.255 netmask 255.0.0.0 +/sbin/route add -host 44.136.8.216 dev pt0b +/sbin/route add -host 44.136.8.95 dev pt0b +/sbin/route add -host 44.255.255.255 dev pt0b + +This version of the driver comes under the GNU GPL. If you have one of my +previous (non-GPL) versions of the driver, please update to this one. + +I hope that this all works well for you. I would be pleased to hear how +many people use the driver and if it does its job. + + - Craig vk2xlz diff --git a/trunk/Documentation/networking/routing.txt b/trunk/Documentation/networking/routing.txt new file mode 100644 index 000000000000..a26838b930f2 --- /dev/null +++ b/trunk/Documentation/networking/routing.txt @@ -0,0 +1,46 @@ +The directory ftp.inr.ac.ru:/ip-routing contains: + +- iproute.c - "professional" routing table maintenance utility. + +- rdisc.tar.gz - rdisc daemon, ported from Sun. + STRONGLY RECOMMENDED FOR ALL HOSTS. + +- routing.tgz - original Mike McLagan's route by source patch. + Currently it is obsolete. + +- gated.dif-ss.gz - gated-R3_6Alpha_2 fixes. + Look at README.gated + +- mrouted-3.8.dif.gz - mrouted-3.8 fixes. + +- rtmon.c - trivial debugging utility: reads and stores netlink. + + +NEWS for user. + +- Policy based routing. Routing decisions are made on the basis + not only of destination address, but also source address, + TOS and incoming interface. +- Complete set of IP level control messages. + Now Linux is the only OS in the world complying to RFC requirements. + Great win 8) +- New interface addressing paradigm. + Assignment of address ranges to interface, + multiple prefixes etc. etc. + Do not bother, it is compatible with the old one. Moreover: +- You don't need to do "route add aaa.bbb.ccc... eth0" anymore, + it is done automatically. +- "Abstract" UNIX sockets and security enhancements. + This is necessary to use TIRPC and TLI emulation library. + +NEWS for hacker. + +- New destination cache. Flexible, robust and just beautiful. +- Network stack is reordered, simplified, optimized, a lot of bugs fixed. + (well, and new bugs were introduced, but I haven't seen them yet 8)) + It is difficult to describe all the changes, look into source. + +If you see this file, then this patch works 8) + +Alexey Kuznetsov. +kuznet@ms2.inr.ac.ru diff --git a/trunk/Documentation/networking/slicecom.hun b/trunk/Documentation/networking/slicecom.hun new file mode 100644 index 000000000000..bed2f045e550 --- /dev/null +++ b/trunk/Documentation/networking/slicecom.hun @@ -0,0 +1,371 @@ + +SliceCOM adapter felhasznaloi dokumentacioja - 0.51 verziohoz + +Bartók István +Utolso modositas: Wed Aug 29 17:26:58 CEST 2001 + +----------------------------------------------------------------- + +Hasznalata: + +Forditas: + +Code maturity level options + [*] Prompt for development and/or incomplete code/drivers + +Network device support + Wan interfaces + MultiGate (COMX) synchronous + Support for MUNICH based boards: SliceCOM, PCICOM (NEW) + Support for HDLC and syncPPP... + + +A modulok betoltese: + +modprobe comx + +modprobe comx-proto-ppp # a Cisco-HDLC es a SyncPPP protokollt is + # ez a modul adja + +modprobe comx-hw-munich # a modul betoltodeskor azonnal jelent a + # syslogba a detektalt kartyakrol + + +Konfiguralas: + +# Ezen az interfeszen Cisco-HDLC vonali protokoll fog futni +# Az interfeszhez rendelt idoszeletek: 1,2 (128 kbit/sec-es vonal) +# (a G.703 keretben az elso adatot vivo idoszelet az 1-es) +# +mkdir /proc/comx/comx0.1/ +echo slicecom >/proc/comx/comx0.1/boardtype +echo hdlc >/proc/comx/comx0.1/protocol +echo 1 2 >/proc/comx/comx0.1/timeslots + + +# Ezen az interfeszen SyncPPP vonali protokoll fog futni +# Az interfeszhez rendelt idoszelet: 3 (64 kbit/sec-es vonal) +# +mkdir /proc/comx/comx0.2/ +echo slicecom >/proc/comx/comx0.2/boardtype +echo ppp >/proc/comx/comx0.2/protocol +echo 3 >/proc/comx/comx0.2/timeslots + +... + +ifconfig comx0.1 up +ifconfig comx0.2 up + +----------------------------------------------------------------- + +A COMX driverek default 20 csomagnyi transmit queue-t rendelnek a halozati +interfeszekhez. WAN halozatokban ennel hosszabbat is szokas hasznalni +(20 es 100 kozott), hogy a vonal kihasznaltsaga nagy terheles eseten jobb +legyen (bar ezzel megno a varhato kesleltetes a csomagok sorban allasa miatt): + +# ifconfig comx0 txqueuelen 50 + +Ezt a beallitasi lehetoseget csak az ujabb disztribuciok ifconfig parancsa +tamogatja (amik mar a 2.2 kernelekhez keszultek, mint a RedHat 6.1 vagy a +Debian 2.2). + +A 2.1-es Debian disztribuciohoz a http://www.debian.org/~rcw/2.2/netbase/ +cimrol toltheto le ujabb netbase csomag, ami mar ilyet tamogato ifconfig +parancsot tartalmaz. Bovebben a 2.2 kernel hasznalatarol Debian 2.1 alatt: +http://www.debian.org/releases/stable/running-kernel-2.2 + +----------------------------------------------------------------- + +A kartya LED-jeinek jelentese: + +piros - eg, ha Remote Alarm-ot kuld a tuloldal +zold - eg, ha a vett jelben megtalalja a keretszinkront + +Reszletesebben: + +piros: zold: jelentes: + +- - nincs keretszinkron (nincs jel, vagy rossz a jel) +- eg "minden rendben" +eg eg a vetel OK, de a tuloldal Remote Alarm-ot kuld +eg - ez nincs ertelmezve, egyelore funkcio nelkul + +----------------------------------------------------------------- + +Reszletesebb leiras a hardver beallitasi lehetosegeirol: + +Az altalanos,- es a protokoll-retegek beallitasi lehetosegeirol a 'comx.txt' +fajlban leirtak SliceCOM kartyanal is ervenyesek, itt csak a hardver-specifikus +beallitasi lehetosegek vannak osszefoglalva: + +Konfiguralasi interfesz a /proc/comx/ alatt: + +Minden timeslot-csoportnak kulon comx* interfeszt kell letrehozni mkdir-rel: +comx0, comx1, .. stb. Itt beallithato, hogy az adott interfesz hanyadik kartya +melyik timeslotja(i)bol alljon ossze. A Cisco-fele serial3:1 elnevezesek +(serial3:1 = a 3. kartyaban az 1-es idoszelet-csoport) Linuxon aliasing-ot +jelentenenek, ezert mi nem tudunk ilyen elnevezest hasznalni. + +Tobb kartya eseten a comx0.1, comx0.2, ... vagy slice0.1, slice0.2 nevek +hasznalhatoak. + +Tobb SliceCOM kartya is lehet egy gepben, de sajat interrupt kell mindegyiknek, +nem tud meg megosztott interruptot kezelni. + +Az egesz kartyat erinto beallitasok: + +Az ioport es irq beallitas nincs: amit a PCI BIOS kioszt a rendszernek, +azt hasznalja a driver. + + +comx0/boardnum - hanyadik SliceCOM kartya a gepben (a 'termeszetes' PCI + sorrendben ertve: ahogyan a /proc/pci-ban vagy az 'lspci' + kimeneteben megjelenik, altalaban az alaplapi PCI meghajto + aramkorokhoz kozelebb eso kartyak a kisebb sorszamuak) + + Default: 0 (0-tol kezdodik a szamolas) + + +Bar a kovetkezoket csak egy-egy interfeszen allitjuk at, megis az egesz kartya +mukodeset egyszerre allitjak. A megkotes hogy csak UP-ban levo interfeszen +hasznalhatoak, azert van, mert kulonben nem vart eredmenyekre vezetne egy ilyen +paranccsorozat: + + echo 0 >boardnum + echo internal >clock_source + echo 1 >boardnum + +- Ez a 0-s board clock_source-at allitana at. + +Ezek a beallitasok megmaradnak az osszes interfesz torlesekor, de torlodnek +a driver modul ki/betoltesekor. + + +comx0/clock_source - A Tx orajelforrasa, a Cisco-val hasonlatosra keszult. + Hasznalata: + + papaya:# echo line >/proc/comx/comx0/clock_source + papaya:# echo internal >/proc/comx/comx0/clock_source + + line - A Tx orajelet a vett adatfolyambol dekodolja, igyekszik + igazodni hozza. Ha nem lat orajelet az inputon, akkor + atall a sajat orajelgeneratorara. + internal - A Tx orajelet a sajat orajelgeneratora szolgaltatja. + + Default: line + + Normal osszeallitas eseten a tavkozlesi szolgaltato eszkoze + (pl. HDSL modem) adja az orajelet, ezert ez a default. + + +comx0/framing - A CRC4 ki/be kapcsolasa + + A CRC4: 16 PCM keretet (A PCM keret az, amibe a 32 darab 64 + kilobites csatorna van bemultiplexalva. Nem osszetevesztendo a HDLC + kerettel.) 2x8 -as csoportokra osztanak, es azokhoz 4-4 bites CRC-t + szamolnak. Elsosorban a vonal minosegenek a monitorozasara szolgal. + + papaya:~# echo crc4 >/proc/comx/comx0/framing + papaya:~# echo no-crc4 >/proc/comx/comx0/framing + + Default a 'crc4', a MATAV vonalak altalaban igy futnak. De ha nem + egyforma is a beallitas a vonal ket vegen, attol a forgalom altalaban + at tud menni. + + +comx0/linecode - A vonali kodolas beallitasa + + papaya:~# echo hdb3 >/proc/comx/comx0/linecode + papaya:~# echo ami >/proc/comx/comx0/linecode + + Default a 'hdb3', a MATAV vonalak igy futnak. + + (az AMI kodolas igen ritka E1-es vonalaknal). Ha ez a beallitas nem + egyezik a vonal ket vegen, akkor elofordulhat hogy a keretszinkron + osszejon, de CRC4-hibak es a vonalakon atvitt adatokban is hibak + keletkeznek (amit a HDLC/SyncPPP szinten CRC-hibaval jelez) + + +comx0/reg - a kartya aramkoreinek, a MUNICH (reg) es a FALC (lbireg) +comx0/lbireg regisztereinek kozvetlen elerese. Hasznalata: + + echo >reg 0x04 0x0 - a 4-es regiszterbe 0-t ir + echo >reg 0x104 - printk()-val kiirja a 4-es regiszter + tartalmat a syslogba. + + WARNING: ezek csak a fejleszteshez keszultek, sok galibat + lehet veluk okozni! + + +comx0/loopback - A kartya G.703 jelenek a visszahurkolasara is van lehetoseg: + + papaya:# echo none >/proc/comx/comx0/loopback + papaya:# echo local >/proc/comx/comx0/loopback + papaya:# echo remote >/proc/comx/comx0/loopback + + none - nincs visszahurkolas, normal mukodes + local - a kartya a sajat maga altal adott jelet kapja vissza + remote - a kartya a kivulrol vett jelet adja kifele + + Default: none + +----------------------------------------------------------------- + +Az interfeszhez (Cisco terminologiaban 'channel-group') kapcsolodo beallitasok: + +comx0/timeslots - mely timeslotok (idoszeletek) tartoznak az adott interfeszhez. + + papaya:~# cat /proc/comx/comx0/timeslots + 1 3 4 5 6 + papaya:~# + + Egy timeslot megkeresese (hanyas interfeszbe tartozik nalunk): + + papaya:~# grep ' 4' /proc/comx/comx*/timeslots + /proc/comx/comx0/timeslots:1 3 4 5 6 + papaya:~# + + Beallitasa: + papaya:~# echo '1 5 2 6 7 8' >/proc/comx/comx0/timeslots + + A timeslotok sorrendje nem szamit, '1 3 2' ugyanaz mint az '1 2 3'. + + Beallitashoz az adott interfesznek DOWN-ban kell lennie + (ifconfig comx0 down), de ugyanannak a kartyanak a tobbi interfesze + uzemelhet kozben. + + Beallitaskor leellenorzi, hogy az uj timeslotok nem utkoznek-e egy + masik interfesz timeslotjaival. Ha utkoznek, akkor nem allitja at. + + Mindig 10-es szamrendszerben tortenik a timeslotok ertelmezese, nehogy + a 08, 09 alaku felirast rosszul ertelmezze. + +----------------------------------------------------------------- + +Az interfeszek es a kartya allapotanak lekerdezese: + +- A ' '-szel kezdodo sorok az eredeti kimenetet, a //-rel kezdodo sorok a +magyarazatot jelzik. + + papaya:~$ cat /proc/comx/comx1/status + Interface administrative status is UP, modem status is UP, protocol is UP + Modem status changes: 0, Transmitter status is IDLE, tbusy: 0 + Interface load (input): 978376 / 947808 / 951024 bits/s (5s/5m/15m) + (output): 978376 / 947848 / 951024 bits/s (5s/5m/15m) + Debug flags: none + RX errors: len: 22, overrun: 1, crc: 0, aborts: 0 + buffer overrun: 0, pbuffer overrun: 0 + TX errors: underrun: 0 + Line keepalive (value: 10) status UP [0] + +// Itt kezdodik a hardver-specifikus resz: + Controller status: + No alarms + +// Alarm: hibajelzes: +// +// No alarms - minden rendben +// +// LOS - Loss Of Signal - nem erzekel jelet a bemeneten. +// AIS - Alarm Indication Signal - csak egymas utani 1-esek jonnek +// a bemeneten, a tuloldal igy is jelezheti hogy meghibasodott vagy +// nincs inicializalva. +// AUXP - Auxiliary Pattern Indication - 01010101.. sorozat jon a bemeneten. +// LFA - Loss of Frame Alignment - nincs keretszinkron +// RRA - Receive Remote Alarm - a tuloldal el, de hibat jelez. +// LMFA - Loss of CRC4 Multiframe Alignment - nincs CRC4-multikeret-szinkron +// NMF - No Multiframe alignment Found after 400 msec - ilyen alarm a no-crc4 +// es crc4 keretezesek eseten nincs, lasd lentebb +// +// Egyeb lehetseges hibajelzesek: +// +// Transmit Line Short - a kartya ugy erzi hogy az adasi kimenete rovidre +// van zarva, ezert kikapcsolta az adast. (nem feltetlenul veszi eszre +// a kulso rovidzarat) + +// A veteli oldal csomagjainak lancolt listai, debug celokra: + + Rx ring: + rafutott: 0 + lastcheck: 50845731, jiffies: 51314281 + base: 017b1858 + rx_desc_ptr: 0 + rx_desc_ptr: 017b1858 + hw_curr_ptr: 017b1858 + 06040000 017b1868 017b1898 c016ff00 + 06040000 017b1878 017b1e9c c016ff00 + 46040000 017b1888 017b24a0 c016ff00 + 06040000 017b1858 017b2aa4 c016ff00 + +// A kartyat hasznalo tobbi interfesz: a 0-s channel-group a comx1 interfesz, +// es az 1,2,...,16 timeslotok tartoznak hozza: + + Interfaces using this board: (channel-group, interface, timeslots) + 0 comx1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + 1 comx2: 17 + 2 comx3: 18 + 3 comx4: 19 + 4 comx5: 20 + 5 comx6: 21 + 6 comx7: 22 + 7 comx8: 23 + 8 comx9: 24 + 9 comx10: 25 + 10 comx11: 26 + 11 comx12: 27 + 12 comx13: 28 + 13 comx14: 29 + 14 comx15: 30 + 15 comx16: 31 + +// Hany esemenyt kezelt le a driver egy-egy hardver-interrupt kiszolgalasanal: + + Interrupt work histogram: + hist[ 0]: 0 hist[ 1]: 2 hist[ 2]: 18574 hist[ 3]: 79 + hist[ 4]: 14 hist[ 5]: 1 hist[ 6]: 0 hist[ 7]: 1 + hist[ 8]: 0 hist[ 9]: 7 + +// Hany kikuldendo csomag volt mar a Tx-ringben amikor ujabb lett irva bele: + + Tx ring histogram: + hist[ 0]: 2329 hist[ 1]: 0 hist[ 2]: 0 hist[ 3]: 0 + +// Az E1-interfesz hiba-szamlaloi, az rfc2495-nek megfeleloen: +// (kb. a Cisco routerek "show controllers e1" formatumaban: http://www.cisco.com/univercd/cc/td/doc/product/software/ios11/rbook/rinterfc.htm#xtocid25669126) + +Data in current interval (91 seconds elapsed): + 9516 Line Code Violations, 65 Path Code Violations, 2 E-Bit Errors + 0 Slip Secs, 2 Fr Loss Secs, 2 Line Err Secs, 0 Degraded Mins + 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 11 Unavail Secs +Data in Interval 1 (15 minutes): + 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors + 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins + 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs +Data in last 4 intervals (1 hour): + 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors + 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins + 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs +Data in last 96 intervals (24 hours): + 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors + 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins + 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs + +----------------------------------------------------------------- + +Nehany kulonlegesebb beallitasi lehetoseg (idovel beepulhetnek majd a driverbe): +Ezekkel sok galibat lehet okozni, nagyon ovatosan kell oket hasznalni! + + modified CRC-4, for improved interworking of CRC-4 and non-CRC-4 + devices: (lasd page 107 es g706 Annex B) + lbireg[ 0x1b ] |= 0x08 + lbireg[ 0x1c ] |= 0xc0 + - ilyenkor ertelmezett az NMF - 'No Multiframe alignment Found after + 400 msec' alarm. + + FALC - a vonali meghajto IC + local loop - a sajat adasomat halljam vissza + remote loop - a kivulrol jovo adast adom vissza + + Egy hibakeresesre hasznalhato dolog: + - 1-es timeslot local loop a FALC-ban: echo >lbireg 0x1d 0x21 + - local loop kikapcsolasa: echo >lbireg 0x1d 0x00 diff --git a/trunk/Documentation/networking/slicecom.txt b/trunk/Documentation/networking/slicecom.txt new file mode 100644 index 000000000000..c82c0cf981b4 --- /dev/null +++ b/trunk/Documentation/networking/slicecom.txt @@ -0,0 +1,369 @@ + +SliceCOM adapter user's documentation - for the 0.51 driver version + +Written by Bartók István + +English translation: Lakatos György +Mon Dec 11 15:28:42 CET 2000 + +Last modified: Wed Aug 29 17:25:37 CEST 2001 + +----------------------------------------------------------------- + +Usage: + +Compiling the kernel: + +Code maturity level options + [*] Prompt for development and/or incomplete code/drivers + +Network device support + Wan interfaces + MultiGate (COMX) synchronous + Support for MUNICH based boards: SliceCOM, PCICOM (NEW) + Support for HDLC and syncPPP... + + +Loading the modules: + +modprobe comx + +modprobe comx-proto-ppp # module for Cisco-HDLC and SyncPPP protocols + +modprobe comx-hw-munich # the module logs information by the kernel + # about the detected boards + + +Configuring the board: + +# This interface will use the Cisco-HDLC line protocol, +# the timeslices assigned are 1,2 (128 KiBit line speed) +# (the first data timeslice in the G.703 frame is no. 1) +# +mkdir /proc/comx/comx0.1/ +echo slicecom >/proc/comx/comx0.1/boardtype +echo hdlc >/proc/comx/comx0.1/protocol +echo 1 2 >/proc/comx/comx0.1/timeslots + + +# This interface uses SyncPPP line protocol, the assigned +# is no. 3 (64 KiBit line speed) +# +mkdir /proc/comx/comx0.2/ +echo slicecom >/proc/comx/comx0.2/boardtype +echo ppp >/proc/comx/comx0.2/protocol +echo 3 >/proc/comx/comx0.2/timeslots + +... + +ifconfig comx0.1 up +ifconfig comx0.2 up + +----------------------------------------------------------------- + +The COMX interfaces use a 10 packet transmit queue by default, however WAN +networks sometimes use bigger values (20 to 100), to utilize the line better +by large traffic (though the line delay increases because of more packets +join the queue). + +# ifconfig comx0 txqueuelen 50 + +This option is only supported by the ifconfig command of the later +distributions, which came with 2.2 kernels, such as RedHat 6.1 or Debian 2.2. + +You can download a newer netbase packet from +http://www.debian.org/~rcw/2.2/netbase/ for Debian 2.1, which has a new +ifconfig. You can get further information about using 2.2 kernel with +Debian 2.1 from http://www.debian.org/releases/stable/running-kernel-2.2 + +----------------------------------------------------------------- + +The SliceCom LEDs: + +red - on, if the interface is unconfigured, or it gets Remote Alarm-s +green - on, if the board finds frame-sync in the received signal + +A bit more detailed: + +red: green: meaning: + +- - no frame-sync, no signal received, or signal SNAFU. +- on "Everything is OK" +on on Reception is ok, but the remote end sends Remote Alarm +on - The interface is unconfigured + +----------------------------------------------------------------- + +A more detailed description of the hardware setting options: + +The general and the protocol layer options described in the 'comx.txt' file +apply to the SliceCom as well, I only summarize the SliceCom hardware specific +settings below. + +The '/proc/comx' configuring interface: + +An interface directory should be created for every timeslot group with +'mkdir', e,g: 'comx0', 'comx1' etc. The timeslots can be assigned here to the +specific interface. The Cisco-like naming convention (serial3:1 - first +timeslot group of the 3rd. board) can't be used here, because these mean IP +aliasing in Linux. + +You can give any meaningful name to keep the configuration clear; +e.g: 'comx0.1', 'comx0.2', 'comx1.1', comx1.2', if you have two boards +with two interfaces each. + +Settings, which apply to the board: + +Neither 'io' nor 'irq' settings required, the driver uses the resources +given by the PCI BIOS. + +comx0/boardnum - board number of the SliceCom in the PC (using the 'natural' + PCI order) as listed in '/proc/pci' or the output of the + 'lspci' command, generally the slots nearer to the motherboard + PCI driver chips have the lower numbers. + + Default: 0 (the counting starts with 0) + +Though the options below are to be set on a single interface, they apply to the +whole board. The restriction, to use them on 'UP' interfaces, is because the +command sequence below could lead to unpredictable results. + + # echo 0 >boardnum + # echo internal >clock_source + # echo 1 >boardnum + +The sequence would set the clock source of board 0. + +These settings will persist after all the interfaces are cleared, but are +cleared when the driver module is unloaded and loaded again. + +comx0/clock_source - source of the transmit clock + Usage: + + # echo line >/proc/comx/comx0/clock_source + # echo internal >/proc/comx/comx0/clock_source + + line - The Tx clock is being decoded if the input data stream, + if no clock seen on the input, then the board will use it's + own clock generator. + + internal - The Tx clock is supplied by the builtin clock generator. + + Default: line + + Normally, the telecommunication company's end device (the HDSL + modem) provides the Tx clock, that's why 'line' is the default. + +comx0/framing - Switching CRC4 off/on + + CRC4: 16 PCM frames (The 32 64Kibit channels are multiplexed into a + PCM frame, nothing to do with HDLC frames) are divided into 2x8 + groups, each group has a 4 bit CRC. + + # echo crc4 >/proc/comx/comx0/framing + # echo no-crc4 >/proc/comx/comx0/framing + + Default is 'crc4', the Hungarian MATAV lines behave like this. + The traffic generally passes if this setting on both ends don't match. + +comx0/linecode - Setting the line coding + + # echo hdb3 >/proc/comx/comx0/linecode + # echo ami >/proc/comx/comx0/linecode + + Default a 'hdb3', MATAV lines use this. + + (AMI coding is rarely used with E1 lines). Frame sync may occur, if + this setting doesn't match the other end's, but CRC4 and data errors + will come, which will result in CRC errors on HDLC/SyncPPP level. + +comx0/reg - direct access to the board's MUNICH (reg) and FALC (lbireg) +comx0/lbireg circuit's registers + + # echo >reg 0x04 0x0 - write 0 to register 4 + # echo >reg 0x104 - write the contents of register 4 with + printk() to syslog + +WARNING! These are only for development purposes, messing with this will + result much trouble! + +comx0/loopback - Places a loop to the board's G.703 signals + + # echo none >/proc/comx/comx0/loopback + # echo local >/proc/comx/comx0/loopback + # echo remote >/proc/comx/comx0/loopback + + none - normal operation, no loop + local - the board receives it's own output + remote - the board sends the received data to the remote side + + Default: none + +----------------------------------------------------------------- + +Interface (channel group in Cisco terms) settings: + +comx0/timeslots - which timeslots belong to the given interface + + Setting: + + # echo '1 5 2 6 7 8' >/proc/comx/comx0/timeslots + + # cat /proc/comx/comx0/timeslots + 1 2 5 6 7 8 + # + + Finding a timeslot: + + # grep ' 4' /proc/comx/comx*/timeslots + /proc/comx/comx0/timeslots:1 3 4 5 6 + # + + The timeslots can be in any order, '1 2 3' is the same as '1 3 2'. + + The interface has to be DOWN during the setting ('ifconfig comx0 + down'), but the other interfaces could operate normally. + + The driver checks if the assigned timeslots are vacant, if not, then + the setting won't be applied. + + The timeslot values are treated as decimal numbers, not to misunderstand + values of 08, 09 form. + +----------------------------------------------------------------- + +Checking the interface and board status: + +- Lines beginning with ' ' (space) belong to the original output, the lines +which begin with '//' are the comments. + + papaya:~$ cat /proc/comx/comx1/status + Interface administrative status is UP, modem status is UP, protocol is UP + Modem status changes: 0, Transmitter status is IDLE, tbusy: 0 + Interface load (input): 978376 / 947808 / 951024 bits/s (5s/5m/15m) + (output): 978376 / 947848 / 951024 bits/s (5s/5m/15m) + Debug flags: none + RX errors: len: 22, overrun: 1, crc: 0, aborts: 0 + buffer overrun: 0, pbuffer overrun: 0 + TX errors: underrun: 0 + Line keepalive (value: 10) status UP [0] + +// The hardware specific part starts here: + Controller status: + No alarms + +// Alarm: +// +// No alarms - Everything OK +// +// LOS - Loss Of Signal - No signal sensed on the input +// AIS - Alarm Indication Signal - The remote side sends '11111111'-s, +// it tells, that there's an error condition, or it's not +// initialised. +// AUXP - Auxiliary Pattern Indication - 01010101.. received. +// LFA - Loss of Frame Alignment - no frame sync received. +// RRA - Receive Remote Alarm - the remote end's OK, but signals error cond. +// LMFA - Loss of CRC4 Multiframe Alignment - no CRC4 multiframe sync. +// NMF - No Multiframe alignment Found after 400 msec - no such alarm using +// no-crc4 or crc4 framing, see below. +// +// Other possible error messages: +// +// Transmit Line Short - the board felt, that it's output is short-circuited, +// so it switched the transmission off. (The board can't definitely tell, +// that it's output is short-circuited.) + +// Chained list of the received packets, for debug purposes: + + Rx ring: + rafutott: 0 + lastcheck: 50845731, jiffies: 51314281 + base: 017b1858 + rx_desc_ptr: 0 + rx_desc_ptr: 017b1858 + hw_curr_ptr: 017b1858 + 06040000 017b1868 017b1898 c016ff00 + 06040000 017b1878 017b1e9c c016ff00 + 46040000 017b1888 017b24a0 c016ff00 + 06040000 017b1858 017b2aa4 c016ff00 + +// All the interfaces using the board: comx1, using the 1,2,...16 timeslots, +// comx2, using timeslot 17, etc. + + Interfaces using this board: (channel-group, interface, timeslots) + 0 comx1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + 1 comx2: 17 + 2 comx3: 18 + 3 comx4: 19 + 4 comx5: 20 + 5 comx6: 21 + 6 comx7: 22 + 7 comx8: 23 + 8 comx9: 24 + 9 comx10: 25 + 10 comx11: 26 + 11 comx12: 27 + 12 comx13: 28 + 13 comx14: 29 + 14 comx15: 30 + 15 comx16: 31 + +// The number of events handled by the driver during an interrupt cycle: + + Interrupt work histogram: + hist[ 0]: 0 hist[ 1]: 2 hist[ 2]: 18574 hist[ 3]: 79 + hist[ 4]: 14 hist[ 5]: 1 hist[ 6]: 0 hist[ 7]: 1 + hist[ 8]: 0 hist[ 9]: 7 + +// The number of packets to send in the Tx ring, when a new one arrived: + + Tx ring histogram: + hist[ 0]: 2329 hist[ 1]: 0 hist[ 2]: 0 hist[ 3]: 0 + +// The error counters of the E1 interface, according to the RFC2495, +// (similar to the Cisco "show controllers e1" command's output: +// http://www.cisco.com/univercd/cc/td/doc/product/software/ios11/rbook/rinterfc.htm#xtocid25669126) + +Data in current interval (91 seconds elapsed): + 9516 Line Code Violations, 65 Path Code Violations, 2 E-Bit Errors + 0 Slip Secs, 2 Fr Loss Secs, 2 Line Err Secs, 0 Degraded Mins + 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 11 Unavail Secs +Data in Interval 1 (15 minutes): + 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors + 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins + 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs +Data in last 4 intervals (1 hour): + 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors + 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins + 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs +Data in last 96 intervals (24 hours): + 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors + 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins + 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs + +----------------------------------------------------------------- + +Some unique options, (may get into the driver later): +Treat them very carefully, these can cause much trouble! + + modified CRC-4, for improved interworking of CRC-4 and non-CRC-4 + devices: (see page 107 and g706 Annex B) + lbireg[ 0x1b ] |= 0x08 + lbireg[ 0x1c ] |= 0xc0 + + - The NMF - 'No Multiframe alignment Found after 400 msec' alarm + comes into account. + + FALC - the line driver chip. + local loop - I hear my transmission back. + remote loop - I echo the remote transmission back. + + Something useful for finding errors: + + - local loop for timeslot 1 in the FALC chip: + + # echo >lbireg 0x1d 0x21 + + - Switching the loop off: + + # echo >lbireg 0x1d 0x00 diff --git a/trunk/Documentation/powerpc/booting-without-of.txt b/trunk/Documentation/powerpc/booting-without-of.txt index ac1be25c1e25..a96e85397eb7 100644 --- a/trunk/Documentation/powerpc/booting-without-of.txt +++ b/trunk/Documentation/powerpc/booting-without-of.txt @@ -52,7 +52,6 @@ Table of Contents i) Freescale QUICC Engine module (QE) j) CFI or JEDEC memory-mapped NOR flash k) Global Utilities Block - l) Xilinx IP cores VII - Specifying interrupt information for devices 1) interrupts property @@ -852,18 +851,12 @@ address which can extend beyond that limit. /cpus/PowerPC,970FX@0 /cpus/PowerPC,970FX@1 (unit addresses do not require leading zeroes) - - d-cache-block-size : one cell, L1 data cache block size in bytes (*) - - i-cache-block-size : one cell, L1 instruction cache block size in + - d-cache-line-size : one cell, L1 data cache line size in bytes + - i-cache-line-size : one cell, L1 instruction cache line size in bytes - d-cache-size : one cell, size of L1 data cache in bytes - i-cache-size : one cell, size of L1 instruction cache in bytes -(*) The cache "block" size is the size on which the cache management -instructions operate. Historically, this document used the cache -"line" size here which is incorrect. The kernel will prefer the cache -block size and will fallback to cache line size for backward -compatibility. - Recommended properties: - timebase-frequency : a cell indicating the frequency of the @@ -877,10 +870,6 @@ compatibility. for the above, the common code doesn't use that property, but you are welcome to re-use the pSeries or Maple one. A future kernel version might provide a common function for this. - - d-cache-line-size : one cell, L1 data cache line size in bytes - if different from the block size - - i-cache-line-size : one cell, L1 instruction cache line size in - bytes if different from the block size You are welcome to add any property you find relevant to your board, like some information about the mechanism used to soft-reset the @@ -2253,266 +2242,6 @@ platforms are moved over to use the flattened-device-tree model. available. For Axon: 0x0000012a - l) Xilinx IP cores - - The Xilinx EDK toolchain ships with a set of IP cores (devices) for use - in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range - of standard device types (network, serial, etc.) and miscellanious - devices (gpio, LCD, spi, etc). Also, since these devices are - implemented within the fpga fabric every instance of the device can be - synthesised with different options that change the behaviour. - - Each IP-core has a set of parameters which the FPGA designer can use to - control how the core is synthesized. Historically, the EDK tool would - extract the device parameters relevant to device drivers and copy them - into an 'xparameters.h' in the form of #define symbols. This tells the - device drivers how the IP cores are configured, but it requres the kernel - to be recompiled every time the FPGA bitstream is resynthesized. - - The new approach is to export the parameters into the device tree and - generate a new device tree each time the FPGA bitstream changes. The - parameters which used to be exported as #defines will now become - properties of the device node. In general, device nodes for IP-cores - will take the following form: - - (name)@(base-address) { - compatible = "xlnx,(ip-core-name)-(HW_VER)" - [, (list of compatible devices), ...]; - reg = <(baseaddr) (size)>; - interrupt-parent = <&interrupt-controller-phandle>; - interrupts = < ... >; - xlnx,(parameter1) = "(string-value)"; - xlnx,(parameter2) = <(int-value)>; - }; - - (ip-core-name): the name of the ip block (given after the BEGIN - directive in system.mhs). Should be in lowercase - and all underscores '_' converted to dashes '-'. - (name): is derived from the "PARAMETER INSTANCE" value. - (parameter#): C_* parameters from system.mhs. The C_ prefix is - dropped from the parameter name, the name is converted - to lowercase and all underscore '_' characters are - converted to dashes '-'. - (baseaddr): the C_BASEADDR parameter. - (HW_VER): from the HW_VER parameter. - (size): equals C_HIGHADDR - C_BASEADDR + 1 - - Typically, the compatible list will include the exact IP core version - followed by an older IP core version which implements the same - interface or any other device with the same interface. - - 'reg', 'interrupt-parent' and 'interrupts' are all optional properties. - - For example, the following block from system.mhs: - - BEGIN opb_uartlite - PARAMETER INSTANCE = opb_uartlite_0 - PARAMETER HW_VER = 1.00.b - PARAMETER C_BAUDRATE = 115200 - PARAMETER C_DATA_BITS = 8 - PARAMETER C_ODD_PARITY = 0 - PARAMETER C_USE_PARITY = 0 - PARAMETER C_CLK_FREQ = 50000000 - PARAMETER C_BASEADDR = 0xEC100000 - PARAMETER C_HIGHADDR = 0xEC10FFFF - BUS_INTERFACE SOPB = opb_7 - PORT OPB_Clk = CLK_50MHz - PORT Interrupt = opb_uartlite_0_Interrupt - PORT RX = opb_uartlite_0_RX - PORT TX = opb_uartlite_0_TX - PORT OPB_Rst = sys_bus_reset_0 - END - - becomes the following device tree node: - - opb-uartlite-0@ec100000 { - device_type = "serial"; - compatible = "xlnx,opb-uartlite-1.00.b"; - reg = ; - interrupt-parent = <&opb-intc>; - interrupts = <1 0>; // got this from the opb_intc parameters - current-speed = ; // standard serial device prop - clock-frequency = ; // standard serial device prop - xlnx,data-bits = <8>; - xlnx,odd-parity = <0>; - xlnx,use-parity = <0>; - }; - - Some IP cores actually implement 2 or more logical devices. In this case, - the device should still describe the whole IP core with a single node - and add a child node for each logical device. The ranges property can - be used to translate from parent IP-core to the registers of each device. - (Note: this makes the assumption that both logical devices have the same - bus binding. If this is not true, then separate nodes should be used for - each logical device). The 'cell-index' property can be used to enumerate - logical devices within an IP core. For example, the following is the - system.mhs entry for the dual ps2 controller found on the ml403 reference - design. - - BEGIN opb_ps2_dual_ref - PARAMETER INSTANCE = opb_ps2_dual_ref_0 - PARAMETER HW_VER = 1.00.a - PARAMETER C_BASEADDR = 0xA9000000 - PARAMETER C_HIGHADDR = 0xA9001FFF - BUS_INTERFACE SOPB = opb_v20_0 - PORT Sys_Intr1 = ps2_1_intr - PORT Sys_Intr2 = ps2_2_intr - PORT Clkin1 = ps2_clk_rx_1 - PORT Clkin2 = ps2_clk_rx_2 - PORT Clkpd1 = ps2_clk_tx_1 - PORT Clkpd2 = ps2_clk_tx_2 - PORT Rx1 = ps2_d_rx_1 - PORT Rx2 = ps2_d_rx_2 - PORT Txpd1 = ps2_d_tx_1 - PORT Txpd2 = ps2_d_tx_2 - END - - It would result in the following device tree nodes: - - opb_ps2_dual_ref_0@a9000000 { - ranges = <0 a9000000 2000>; - // If this device had extra parameters, then they would - // go here. - ps2@0 { - compatible = "xlnx,opb-ps2-dual-ref-1.00.a"; - reg = <0 40>; - interrupt-parent = <&opb-intc>; - interrupts = <3 0>; - cell-index = <0>; - }; - ps2@1000 { - compatible = "xlnx,opb-ps2-dual-ref-1.00.a"; - reg = <1000 40>; - interrupt-parent = <&opb-intc>; - interrupts = <3 0>; - cell-index = <0>; - }; - }; - - Also, the system.mhs file defines bus attachments from the processor - to the devices. The device tree structure should reflect the bus - attachments. Again an example; this system.mhs fragment: - - BEGIN ppc405_virtex4 - PARAMETER INSTANCE = ppc405_0 - PARAMETER HW_VER = 1.01.a - BUS_INTERFACE DPLB = plb_v34_0 - BUS_INTERFACE IPLB = plb_v34_0 - END - - BEGIN opb_intc - PARAMETER INSTANCE = opb_intc_0 - PARAMETER HW_VER = 1.00.c - PARAMETER C_BASEADDR = 0xD1000FC0 - PARAMETER C_HIGHADDR = 0xD1000FDF - BUS_INTERFACE SOPB = opb_v20_0 - END - - BEGIN opb_uart16550 - PARAMETER INSTANCE = opb_uart16550_0 - PARAMETER HW_VER = 1.00.d - PARAMETER C_BASEADDR = 0xa0000000 - PARAMETER C_HIGHADDR = 0xa0001FFF - BUS_INTERFACE SOPB = opb_v20_0 - END - - BEGIN plb_v34 - PARAMETER INSTANCE = plb_v34_0 - PARAMETER HW_VER = 1.02.a - END - - BEGIN plb_bram_if_cntlr - PARAMETER INSTANCE = plb_bram_if_cntlr_0 - PARAMETER HW_VER = 1.00.b - PARAMETER C_BASEADDR = 0xFFFF0000 - PARAMETER C_HIGHADDR = 0xFFFFFFFF - BUS_INTERFACE SPLB = plb_v34_0 - END - - BEGIN plb2opb_bridge - PARAMETER INSTANCE = plb2opb_bridge_0 - PARAMETER HW_VER = 1.01.a - PARAMETER C_RNG0_BASEADDR = 0x20000000 - PARAMETER C_RNG0_HIGHADDR = 0x3FFFFFFF - PARAMETER C_RNG1_BASEADDR = 0x60000000 - PARAMETER C_RNG1_HIGHADDR = 0x7FFFFFFF - PARAMETER C_RNG2_BASEADDR = 0x80000000 - PARAMETER C_RNG2_HIGHADDR = 0xBFFFFFFF - PARAMETER C_RNG3_BASEADDR = 0xC0000000 - PARAMETER C_RNG3_HIGHADDR = 0xDFFFFFFF - BUS_INTERFACE SPLB = plb_v34_0 - BUS_INTERFACE MOPB = opb_v20_0 - END - - Gives this device tree (some properties removed for clarity): - - plb-v34-0 { - #address-cells = <1>; - #size-cells = <1>; - device_type = "ibm,plb"; - ranges; // 1:1 translation - - plb-bram-if-cntrl-0@ffff0000 { - reg = ; - } - - opb-v20-0 { - #address-cells = <1>; - #size-cells = <1>; - ranges = <20000000 20000000 20000000 - 60000000 60000000 20000000 - 80000000 80000000 40000000 - c0000000 c0000000 20000000>; - - opb-uart16550-0@a0000000 { - reg = ; - }; - - opb-intc-0@d1000fc0 { - reg = ; - }; - }; - }; - - That covers the general approach to binding xilinx IP cores into the - device tree. The following are bindings for specific devices: - - i) Xilinx ML300 Framebuffer - - Simple framebuffer device from the ML300 reference design (also on the - ML403 reference design as well as others). - - Optional properties: - - resolution = : pixel resolution of framebuffer. Some - implementations use a different resolution. - Default is - - virt-resolution = : Size of framebuffer in memory. - Default is . - - rotate-display (empty) : rotate display 180 degrees. - - ii) Xilinx SystemACE - - The Xilinx SystemACE device is used to program FPGAs from an FPGA - bitstream stored on a CF card. It can also be used as a generic CF - interface device. - - Optional properties: - - 8-bit (empty) : Set this property for SystemACE in 8 bit mode - - iii) Xilinx EMAC and Xilinx TEMAC - - Xilinx Ethernet devices. In addition to general xilinx properties - listed above, nodes for these devices should include a phy-handle - property, and may include other common network device properties - like local-mac-address. - - iv) Xilinx Uartlite - - Xilinx uartlite devices are simple fixed speed serial ports. - - Requred properties: - - current-speed : Baud rate of uartlite - More devices will be defined as this spec matures. VII - Specifying interrupt information for devices diff --git a/trunk/Documentation/video4linux/CARDLIST.em28xx b/trunk/Documentation/video4linux/CARDLIST.em28xx index 37f0e3cedf43..a3026689bbe6 100644 --- a/trunk/Documentation/video4linux/CARDLIST.em28xx +++ b/trunk/Documentation/video4linux/CARDLIST.em28xx @@ -8,7 +8,4 @@ 7 -> Leadtek Winfast USB II (em2800) 8 -> Kworld USB2800 (em2800) 9 -> Pinnacle Dazzle DVC 90 (em2820/em2840) [2304:0207] - 10 -> Hauppauge WinTV HVR 900 (em2880) - 11 -> Terratec Hybrid XS (em2880) 12 -> Kworld PVR TV 2800 RF (em2820/em2840) - 13 -> Terratec Prodigy XS (em2880) diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 1c7c229a0926..6c0e44bbf601 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -2549,7 +2549,7 @@ S: Supported MISCELLANEOUS MCA-SUPPORT P: James Bottomley -M: James.Bottomley@HansenPartnership.com +M: jejb@steeleye.com L: linux-kernel@vger.kernel.org S: Maintained @@ -3301,11 +3301,9 @@ S: Maintained SCSI SUBSYSTEM P: James E.J. Bottomley -M: James.Bottomley@HansenPartnership.com +M: James.Bottomley@SteelEye.com L: linux-scsi@vger.kernel.org T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git -T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git -T: git kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-pending-2.6.git S: Maintained SCSI TAPE DRIVER diff --git a/trunk/Makefile b/trunk/Makefile index e28dde8887d7..188c3b6b3fa9 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 24 -EXTRAVERSION = -rc2 +EXTRAVERSION = -rc1 NAME = Arr Matey! A Hairy Bilge Rat! # *DOCUMENTATION* @@ -528,22 +528,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments -# But warn user when we do so -warn-assign = \ -$(warning "WARNING: Appending $$K$(1) ($(K$(1))) from $(origin K$(1)) to kernel $$$(1)") - -ifneq ($(KCPPFLAGS),) - $(call warn-assign,CPPFLAGS) - KBUILD_CPPFLAGS += $(KCPPFLAGS) -endif -ifneq ($(KAFLAGS),) - $(call warn-assign,AFLAGS) - KBUILD_AFLAGS += $(KAFLAGS) -endif -ifneq ($(KCFLAGS),) - $(call warn-assign,CFLAGS) - KBUILD_CFLAGS += $(KCFLAGS) -endif +KBUILD_CPPFLAGS += $(CPPFLAGS) +KBUILD_AFLAGS += $(AFLAGS) +KBUILD_CFLAGS += $(CFLAGS) # Use --build-id when available. LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ diff --git a/trunk/arch/frv/mm/init.c b/trunk/arch/frv/mm/init.c index b841ecfd5d5a..4103c2c487f3 100644 --- a/trunk/arch/frv/mm/init.c +++ b/trunk/arch/frv/mm/init.c @@ -197,7 +197,7 @@ void __init mem_init(void) /* * free the memory that was only required for initialisation */ -void free_initmem(void) +void __init free_initmem(void) { #if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL) unsigned long start, end, addr; diff --git a/trunk/arch/powerpc/boot/dts/walnut.dts b/trunk/arch/powerpc/boot/dts/walnut.dts index 754fa3960f83..fa681f5343fe 100644 --- a/trunk/arch/powerpc/boot/dts/walnut.dts +++ b/trunk/arch/powerpc/boot/dts/walnut.dts @@ -122,9 +122,7 @@ device_type = "network"; compatible = "ibm,emac-405gp", "ibm,emac"; interrupt-parent = <&UIC0>; - interrupts = < - f 4 /* Ethernet */ - 9 4 /* Ethernet Wake Up */>; + interrupts = <9 4 f 4>; local-mac-address = [000000000000]; /* Filled in by zImage */ reg = ; mal-device = <&MAL>; diff --git a/trunk/arch/powerpc/boot/wrapper b/trunk/arch/powerpc/boot/wrapper index 31147a037728..39b27e5ef6c1 100755 --- a/trunk/arch/powerpc/boot/wrapper +++ b/trunk/arch/powerpc/boot/wrapper @@ -21,14 +21,6 @@ # (default ./arch/powerpc/boot) # -W dir specify working directory for temporary files (default .) -# Stop execution if any command fails -set -e - -# Allow for verbose output -if [ "$V" = 1 ]; then - set -x -fi - # defaults kernel= ofile=zImage @@ -119,7 +111,7 @@ if [ -n "$dts" ]; then if [ -z "$dtb" ]; then dtb="$platform.dtb" fi - dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts" + dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts" || exit 1 fi if [ -z "$kernel" ]; then @@ -157,6 +149,7 @@ cuboot*) ps3) platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o" lds=$object/zImage.ps3.lds + binary=y gzip= ext=bin objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data" @@ -240,7 +233,7 @@ entry=`${CROSS}objdump -f "$ofile" | grep '^start address ' | cut -d' ' -f3` if [ -n "$binary" ]; then mv "$ofile" "$ofile".elf - ${CROSS}objcopy -O binary "$ofile".elf "$ofile" + ${CROSS}objcopy -O binary "$ofile".elf "$ofile".bin fi # post-processing needed for some platforms @@ -253,9 +246,9 @@ coff) $object/hack-coff "$ofile" ;; cuboot*) - gzip -f -9 "$ofile" + gzip -f -9 "$ofile".bin mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \ - $uboot_version -d "$ofile".gz "$ofile" + $uboot_version -d "$ofile".bin.gz "$ofile" ;; treeboot*) mv "$ofile" "$ofile.elf" @@ -276,11 +269,11 @@ ps3) # then copied to offset 0x100. At runtime the bootwrapper program # copies the 0x100 bytes at __system_reset_kernel to addr 0x100. - system_reset_overlay=0x`${CROSS}nm "$ofile" \ + system_reset_overlay=0x`${CROSS}nm "$ofile".elf \ | grep ' __system_reset_overlay$' \ | cut -d' ' -f1` system_reset_overlay=`printf "%d" $system_reset_overlay` - system_reset_kernel=0x`${CROSS}nm "$ofile" \ + system_reset_kernel=0x`${CROSS}nm "$ofile".elf \ | grep ' __system_reset_kernel$' \ | cut -d' ' -f1` system_reset_kernel=`printf "%d" $system_reset_kernel` @@ -289,15 +282,23 @@ ps3) rm -f "$object/otheros.bld" - ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" + msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ + skip=$overlay_dest seek=$system_reset_kernel \ + count=$overlay_size bs=1 2>&1) - dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ - skip=$overlay_dest seek=$system_reset_kernel \ - count=$overlay_size bs=1 + if [ $? -ne "0" ]; then + echo $msg + exit 1 + fi + + msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ + skip=$system_reset_overlay seek=$overlay_dest \ + count=$overlay_size bs=1 2>&1) - dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ - skip=$system_reset_overlay seek=$overlay_dest \ - count=$overlay_size bs=1 + if [ $? -ne "0" ]; then + echo $msg + exit 2 + fi gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld" ;; diff --git a/trunk/arch/powerpc/configs/pasemi_defconfig b/trunk/arch/powerpc/configs/pasemi_defconfig index 78c968aade4e..1ccf3ed7693e 100644 --- a/trunk/arch/powerpc/configs/pasemi_defconfig +++ b/trunk/arch/powerpc/configs/pasemi_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc2 -# Tue Nov 6 23:23:50 2007 +# Linux kernel version: 2.6.23-rc4 +# Thu Aug 30 16:40:47 2007 # CONFIG_PPC64=y @@ -10,7 +10,6 @@ CONFIG_PPC64=y # CONFIG_POWER4_ONLY=y CONFIG_POWER4=y -# CONFIG_TUNE_CELL is not set CONFIG_PPC_FPU=y CONFIG_ALTIVEC=y CONFIG_PPC_STD_MMU=y @@ -19,13 +18,8 @@ CONFIG_PPC_MM_SLICES=y CONFIG_SMP=y CONFIG_NR_CPUS=2 CONFIG_64BIT=y -CONFIG_WORD_SIZE=64 CONFIG_PPC_MERGE=y CONFIG_MMU=y -CONFIG_GENERIC_CMOS_UPDATE=y -CONFIG_GENERIC_TIME=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_HARDIRQS=y CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y @@ -71,10 +65,7 @@ CONFIG_SYSVIPC_SYSCTL=y # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=17 -# CONFIG_CGROUPS is not set -CONFIG_FAIR_GROUP_SCHED=y -CONFIG_FAIR_USER_SCHED=y -# CONFIG_FAIR_CGROUP_SCHED is not set +# CONFIG_CPUSETS is not set CONFIG_SYSFS_DEPRECATED=y # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -95,6 +86,7 @@ CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_VM_EVENT_COUNTERS=y @@ -115,15 +107,14 @@ CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y # CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_BLK_DEV_BSG is not set -CONFIG_BLOCK_COMPAT=y # # IO Schedulers # CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_DEADLINE is not set # CONFIG_DEFAULT_CFQ is not set @@ -134,6 +125,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # Platform support # CONFIG_PPC_MULTIPLATFORM=y +# CONFIG_EMBEDDED6xx is not set # CONFIG_PPC_82xx is not set # CONFIG_PPC_83xx is not set # CONFIG_PPC_86xx is not set @@ -149,7 +141,6 @@ CONFIG_PPC_PASEMI=y # PA Semi PWRficient options # CONFIG_PPC_PASEMI_IOMMU=y -# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set CONFIG_PPC_PASEMI_MDIO=y CONFIG_ELECTRA_IDE=y # CONFIG_PPC_CELLEB is not set @@ -165,52 +156,29 @@ CONFIG_MPIC=y # CONFIG_U3_DART is not set # CONFIG_PPC_RTAS is not set # CONFIG_MMIO_NVRAM is not set -CONFIG_MPIC_BROKEN_REGREAD=y # CONFIG_PPC_MPC106 is not set # CONFIG_PPC_970_NAP is not set # CONFIG_PPC_INDIRECT_IO is not set # CONFIG_GENERIC_IOMAP is not set -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=y -# CONFIG_CPU_FREQ_STAT_DETAILS is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set - -# -# CPU Frequency drivers -# -CONFIG_PPC_PASEMI_CPUFREQ=y +# CONFIG_CPU_FREQ is not set # CONFIG_CPM2 is not set # CONFIG_FSL_ULI1575 is not set # # Kernel options # -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -# CONFIG_HZ_100 is not set +CONFIG_HZ_100=y # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set -CONFIG_HZ_1000=y -CONFIG_HZ=1000 +# CONFIG_HZ_1000 is not set +CONFIG_HZ=100 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set -# CONFIG_PREEMPT_BKL is not set +CONFIG_PREEMPT_BKL=y CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set -CONFIG_FORCE_MAX_ZONEORDER=9 +CONFIG_FORCE_MAX_ZONEORDER=13 CONFIG_IOMMU_VMERGE=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # CONFIG_KEXEC is not set @@ -228,13 +196,12 @@ CONFIG_FLATMEM_MANUAL=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_RESOURCES_64BIT=y CONFIG_ZONE_DMA_FLAG=1 CONFIG_BOUNCE=y -CONFIG_PPC_HAS_HASH_64K=y -CONFIG_PPC_64K_PAGES=y +# CONFIG_PPC_HAS_HASH_64K is not set +# CONFIG_PPC_64K_PAGES is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set @@ -255,8 +222,11 @@ CONFIG_PCI_SYSCALL=y # CONFIG_PCIEPORTBUS is not set CONFIG_ARCH_SUPPORTS_MSI=y # CONFIG_PCI_MSI is not set -CONFIG_PCI_LEGACY=y # CONFIG_PCI_DEBUG is not set + +# +# PCCARD (PCMCIA/CardBus) support +# CONFIG_PCCARD=y CONFIG_PCMCIA_DEBUG=y CONFIG_PCMCIA=y @@ -270,7 +240,6 @@ CONFIG_CARDBUS=y # CONFIG_YENTA is not set # CONFIG_PD6729 is not set # CONFIG_I82092 is not set -# CONFIG_ELECTRA_CF is not set # CONFIG_HOTPLUG_PCI is not set CONFIG_KERNEL_START=0xc000000000000000 @@ -286,7 +255,7 @@ CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y CONFIG_XFRM=y -CONFIG_XFRM_USER=y +# CONFIG_XFRM_USER is not set # CONFIG_XFRM_SUB_POLICY is not set # CONFIG_XFRM_MIGRATE is not set CONFIG_NET_KEY=y @@ -312,7 +281,6 @@ CONFIG_INET_TUNNEL=y CONFIG_INET_XFRM_MODE_TRANSPORT=y CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_LRO=y CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -338,6 +306,10 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_LAPB 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 # @@ -366,7 +338,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # # Generic Driver Options # -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y @@ -390,7 +361,6 @@ CONFIG_MTD_BLOCK=y # CONFIG_INFTL is not set # CONFIG_RFD_FTL is not set # CONFIG_SSFDC is not set -# CONFIG_MTD_OOPS is not set # # RAM/ROM/Flash chip drivers @@ -415,7 +385,6 @@ CONFIG_MTD_CFI_I2=y # Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_INTEL_VR_NOR is not set # CONFIG_MTD_PLATRAM is not set # @@ -433,15 +402,7 @@ CONFIG_MTD_PHRAM=y # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set # CONFIG_MTD_DOC2001PLUS is not set -CONFIG_MTD_NAND=y -# CONFIG_MTD_NAND_VERIFY_WRITE is not set -# CONFIG_MTD_NAND_ECC_SMC is not set -# CONFIG_MTD_NAND_MUSEUM_IDS is not set -CONFIG_MTD_NAND_IDS=y -# CONFIG_MTD_NAND_DISKONCHIP is not set -# CONFIG_MTD_NAND_CAFE is not set -# CONFIG_MTD_NAND_PLATFORM is not set -# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_NAND is not set # CONFIG_MTD_ONENAND is not set # @@ -494,42 +455,10 @@ CONFIG_IDE_PROC_FS=y # IDE chipset support/bugfixes # # CONFIG_IDE_GENERIC is not set -# CONFIG_BLK_DEV_PLATFORM is not set - -# -# PCI IDE chipsets support -# +# CONFIG_BLK_DEV_IDEPCI is not set # CONFIG_IDEPCI_PCIBUS_ORDER is not set -# CONFIG_BLK_DEV_GENERIC is not set -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_AEC62XX is not set -# CONFIG_BLK_DEV_ALI15X3 is not set -# CONFIG_BLK_DEV_AMD74XX is not set -# CONFIG_BLK_DEV_CMD64X is not set -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 is not set -# CONFIG_BLK_DEV_CS5520 is not set -# CONFIG_BLK_DEV_CS5530 is not set -# CONFIG_BLK_DEV_HPT34X is not set -# CONFIG_BLK_DEV_HPT366 is not set -# CONFIG_BLK_DEV_JMICRON is not set -# CONFIG_BLK_DEV_SC1200 is not set -# CONFIG_BLK_DEV_PIIX is not set -# CONFIG_BLK_DEV_IT8213 is not set -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -# CONFIG_BLK_DEV_PDC202XX_OLD is not set -# CONFIG_BLK_DEV_PDC202XX_NEW is not set -# CONFIG_BLK_DEV_SVWKS is not set -# CONFIG_BLK_DEV_SIIMAGE is not set -# CONFIG_BLK_DEV_SL82C105 is not set -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set -# CONFIG_BLK_DEV_TC86C001 is not set # CONFIG_IDE_ARM is not set # CONFIG_BLK_DEV_IDEDMA is not set -CONFIG_IDE_ARCH_OBSOLETE_INIT=y # CONFIG_BLK_DEV_HD is not set # @@ -569,11 +498,10 @@ CONFIG_SCSI_WAIT_SCAN=m # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_ISCSI_ATTRS is not set # CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set CONFIG_SCSI_LOWLEVEL=y # CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set -# CONFIG_SCSI_3W_9XXX is not set +CONFIG_BLK_DEV_3W_XXXX_RAID=y +CONFIG_SCSI_3W_9XXX=y # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set @@ -646,10 +574,9 @@ CONFIG_ATA_GENERIC=y # CONFIG_PATA_OLDPIIX is not set # CONFIG_PATA_NETCELL is not set # CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_NS87415 is not set # CONFIG_PATA_OPTI is not set # CONFIG_PATA_OPTIDMA is not set -CONFIG_PATA_PCMCIA=y +# CONFIG_PATA_PCMCIA is not set # CONFIG_PATA_PDC_OLD is not set # CONFIG_PATA_RADISYS is not set # CONFIG_PATA_RZ1000 is not set @@ -662,13 +589,41 @@ CONFIG_PATA_PCMCIA=y # CONFIG_PATA_WINBOND is not set CONFIG_PATA_PLATFORM=y # CONFIG_MD is not set + +# +# Fusion MPT device support +# # CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support # # CONFIG_FIREWIRE is not set -# CONFIG_IEEE1394 is not set +CONFIG_IEEE1394=y + +# +# Subsystem Options +# +# CONFIG_IEEE1394_VERBOSEDEBUG is not set + +# +# Controllers +# +CONFIG_IEEE1394_PCILYNX=y +CONFIG_IEEE1394_OHCI1394=y + +# +# Protocols +# +# CONFIG_IEEE1394_VIDEO1394 is not set +CONFIG_IEEE1394_SBP2=y +# CONFIG_IEEE1394_ETH1394_ROM_ENTRY is not set +# CONFIG_IEEE1394_ETH1394 is not set +# CONFIG_IEEE1394_DV1394 is not set +CONFIG_IEEE1394_RAWIO=y # CONFIG_I2O is not set # CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y @@ -678,8 +633,6 @@ CONFIG_DUMMY=y # CONFIG_MACVLAN is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_VETH is not set -# CONFIG_IP1000 is not set # CONFIG_ARCNET is not set CONFIG_PHYLIB=y @@ -696,7 +649,6 @@ CONFIG_MARVELL_PHY=y # CONFIG_BROADCOM_PHY is not set # CONFIG_ICPLUS_PHY is not set # CONFIG_FIXED_PHY is not set -# CONFIG_MDIO_BITBANG is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y # CONFIG_HAPPYMEAL is not set @@ -705,16 +657,13 @@ CONFIG_MII=y # CONFIG_NET_VENDOR_3COM is not set # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set -# CONFIG_IBM_NEW_EMAC_ZMII is not set -# CONFIG_IBM_NEW_EMAC_RGMII is not set -# CONFIG_IBM_NEW_EMAC_TAH is not set -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set @@ -733,7 +682,6 @@ CONFIG_NETDEV_1000=y CONFIG_E1000=y CONFIG_E1000_NAPI=y # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -# CONFIG_E1000E is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set @@ -741,7 +689,6 @@ CONFIG_E1000_NAPI=y # CONFIG_SIS190 is not set # CONFIG_SKGE is not set # CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set # CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y # CONFIG_BNX2 is not set @@ -750,15 +697,12 @@ CONFIG_TIGON3=y CONFIG_NETDEV_10000=y # CONFIG_CHELSIO_T1 is not set # CONFIG_CHELSIO_T3 is not set -# CONFIG_IXGBE is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set # CONFIG_MYRI10GE is not set # CONFIG_NETXEN_NIC is not set -# CONFIG_NIU is not set CONFIG_PASEMI_MAC=y # CONFIG_MLX4_CORE is not set -# CONFIG_TEHUTI is not set # CONFIG_TR is not set # @@ -805,6 +749,7 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 CONFIG_INPUT_JOYDEV=y +# CONFIG_INPUT_TSDEV is not set CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_EVBUG is not set @@ -865,12 +810,15 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=4 # CONFIG_IPMI_HANDLER is not set +# CONFIG_WATCHDOG is not set CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_PASEMI=y CONFIG_GEN_RTC=y CONFIG_GEN_RTC_X=y # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set # # PCMCIA character devices @@ -948,6 +896,8 @@ CONFIG_SENSORS_EEPROM=y # CONFIG_POWER_SUPPLY is not set CONFIG_HWMON=y CONFIG_HWMON_VID=y +# CONFIG_SENSORS_ABITUGURU is not set +# CONFIG_SENSORS_ABITUGURU3 is not set # CONFIG_SENSORS_AD7418 is not set # CONFIG_SENSORS_ADM1021 is not set # CONFIG_SENSORS_ADM1025 is not set @@ -955,12 +905,12 @@ CONFIG_HWMON_VID=y # CONFIG_SENSORS_ADM1029 is not set # CONFIG_SENSORS_ADM1031 is not set # CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ASB100 is not set # CONFIG_SENSORS_ATXP1 is not set # CONFIG_SENSORS_DS1621 is not set # CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_F71882FG is not set -# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_FSCHER is not set +# CONFIG_SENSORS_FSCPOS is not set # CONFIG_SENSORS_GL518SM is not set # CONFIG_SENSORS_GL520SM is not set # CONFIG_SENSORS_IT87 is not set @@ -996,13 +946,6 @@ CONFIG_SENSORS_LM90=y # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set # CONFIG_HWMON_DEBUG_CHIP is not set -# CONFIG_WATCHDOG is not set - -# -# Sonics Silicon Backplane -# -CONFIG_SSB_POSSIBLE=y -# CONFIG_SSB is not set # # Multifunction device drivers @@ -1020,14 +963,14 @@ CONFIG_DAB=y # # Graphics support # -# CONFIG_AGP is not set -CONFIG_DRM=y -# CONFIG_DRM_TDFX is not set -# CONFIG_DRM_R128 is not set -CONFIG_DRM_RADEON=y -# CONFIG_DRM_MGA is not set -# CONFIG_DRM_VIA is not set -# CONFIG_DRM_SAVAGE is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_BACKLIGHT_CLASS_DEVICE=y + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set CONFIG_VGASTATE=y # CONFIG_VIDEO_OUTPUT_CONTROL is not set CONFIG_FB=y @@ -1036,7 +979,6 @@ CONFIG_FB_DDC=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set # CONFIG_FB_SYS_FILLRECT is not set # CONFIG_FB_SYS_COPYAREA is not set # CONFIG_FB_SYS_IMAGEBLIT is not set @@ -1084,15 +1026,6 @@ CONFIG_FB_RADEON_BACKLIGHT=y # CONFIG_FB_PM3 is not set # CONFIG_FB_IBM_GXT4500 is not set # CONFIG_FB_VIRTUAL is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_LCD_CLASS_DEVICE is not set -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_CORGI is not set - -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set # # Console display driver support @@ -1245,7 +1178,6 @@ CONFIG_SND_USB_USX2Y=y CONFIG_HID_SUPPORT=y CONFIG_HID=y # CONFIG_HID_DEBUG is not set -# CONFIG_HIDRAW is not set # # USB Input Devices @@ -1396,7 +1328,6 @@ CONFIG_RTC_INTF_DEV=y # I2C RTC drivers # CONFIG_RTC_DRV_DS1307=y -# CONFIG_RTC_DRV_DS1374 is not set # CONFIG_RTC_DRV_DS1672 is not set # CONFIG_RTC_DRV_MAX6900 is not set # CONFIG_RTC_DRV_RS5C372 is not set @@ -1425,6 +1356,19 @@ CONFIG_RTC_DRV_DS1307=y # on-CPU RTC drivers # +# +# DMA Engine support +# +# CONFIG_DMA_ENGINE is not set + +# +# DMA Clients +# + +# +# DMA Devices +# + # # Userspace I/O # @@ -1444,6 +1388,7 @@ CONFIG_EXT3_FS_XATTR=y # CONFIG_EXT3_FS_SECURITY is not set # CONFIG_EXT4DEV_FS is not set CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set @@ -1491,6 +1436,7 @@ CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y +CONFIG_RAMFS=y CONFIG_CONFIGFS_FS=y # @@ -1503,43 +1449,30 @@ CONFIG_CONFIGFS_FS=y # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_FS_WBUF_VERIFY is not set -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_FS_XATTR is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -# CONFIG_JFFS2_LZO is not set -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y + +# +# Network File Systems +# CONFIG_NFS_FS=y CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set # CONFIG_NFS_V4 is not set # CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y +# CONFIG_NFSD is not set CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y # CONFIG_SUNRPC_BIND34 is not set -CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set @@ -1568,6 +1501,10 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_KARMA_PARTITION is not set # CONFIG_EFI_PARTITION is not set # CONFIG_SYSV68_PARTITION is not set + +# +# Native Language Support +# CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y @@ -1608,6 +1545,10 @@ CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set + +# +# Distributed Lock Manager +# # CONFIG_DLM is not set # CONFIG_UCC_SLOW is not set @@ -1620,24 +1561,23 @@ CONFIG_CRC_CCITT=y # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y # CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y +# CONFIG_LIBCRC32C is not set CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y -CONFIG_INSTRUMENTATION=y + +# +# Instrumentation Support +# CONFIG_PROFILING=y CONFIG_OPROFILE=y # CONFIG_KPROBES is not set -# CONFIG_MARKERS is not set # # Kernel hacking # # CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set @@ -1646,7 +1586,7 @@ CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_SHIRQ is not set CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHED_DEBUG is not set +CONFIG_SCHED_DEBUG=y # CONFIG_SCHEDSTATS is not set # CONFIG_TIMER_STATS is not set # CONFIG_SLUB_DEBUG_ON is not set @@ -1661,12 +1601,9 @@ CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_SG is not set # CONFIG_FORCED_INLINING is not set -# CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_FAULT_INJECTION is not set -# CONFIG_SAMPLES is not set # CONFIG_DEBUG_STACKOVERFLOW is not set # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_PAGEALLOC is not set @@ -1683,7 +1620,6 @@ CONFIG_XMON_DISASSEMBLY=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set -# CONFIG_SECURITY_FILE_CAPABILITIES is not set CONFIG_CRYPTO=y CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_BLKCIPHER=y @@ -1692,38 +1628,34 @@ CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_HMAC=y # CONFIG_CRYPTO_XCBC is not set # CONFIG_CRYPTO_NULL is not set -CONFIG_CRYPTO_MD4=y +# CONFIG_CRYPTO_MD4 is not set CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA512=y +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set # CONFIG_CRYPTO_WP512 is not set # CONFIG_CRYPTO_TGR192 is not set # CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_ECB is not set +CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_PCBC is not set +CONFIG_CRYPTO_PCBC=m # CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_XTS is not set # CONFIG_CRYPTO_CRYPTD is not set CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_FCRYPT is not set -CONFIG_CRYPTO_BLOWFISH=y +# CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set # CONFIG_CRYPTO_SERPENT is not set -CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES is not set # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_KHAZAD is not set # CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_SEED is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_CAMELLIA is not set # CONFIG_CRYPTO_TEST is not set -# CONFIG_CRYPTO_AUTHENC is not set -CONFIG_CRYPTO_HW=y -# CONFIG_PPC_CLOCK is not set +# CONFIG_CRYPTO_HW is not set diff --git a/trunk/arch/powerpc/configs/ppc64_defconfig b/trunk/arch/powerpc/configs/ppc64_defconfig index 3e90c835fe12..05582af50c5b 100644 --- a/trunk/arch/powerpc/configs/ppc64_defconfig +++ b/trunk/arch/powerpc/configs/ppc64_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc2 -# Tue Nov 6 23:43:56 2007 +# Linux kernel version: 2.6.23-rc4 +# Thu Aug 30 16:47:09 2007 # CONFIG_PPC64=y @@ -11,7 +11,6 @@ CONFIG_PPC64=y # CONFIG_POWER4_ONLY is not set CONFIG_POWER3=y CONFIG_POWER4=y -# CONFIG_TUNE_CELL is not set CONFIG_PPC_FPU=y CONFIG_ALTIVEC=y CONFIG_PPC_STD_MMU=y @@ -20,13 +19,8 @@ CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_SMP=y CONFIG_NR_CPUS=32 CONFIG_64BIT=y -CONFIG_WORD_SIZE=64 CONFIG_PPC_MERGE=y CONFIG_MMU=y -CONFIG_GENERIC_CMOS_UPDATE=y -CONFIG_GENERIC_TIME=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_HARDIRQS=y CONFIG_IRQ_PER_CPU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y @@ -78,15 +72,8 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# CONFIG_CGROUP_NS is not set -# CONFIG_CGROUP_CPUACCT is not set CONFIG_CPUSETS=y -CONFIG_FAIR_GROUP_SCHED=y -CONFIG_FAIR_USER_SCHED=y -# CONFIG_FAIR_CGROUP_SCHED is not set CONFIG_SYSFS_DEPRECATED=y -CONFIG_PROC_PID_CPUSET=y CONFIG_RELAY=y CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" @@ -106,6 +93,7 @@ CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_VM_EVENT_COUNTERS=y @@ -126,7 +114,6 @@ CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y CONFIG_BLK_DEV_IO_TRACE=y CONFIG_BLK_DEV_BSG=y -CONFIG_BLOCK_COMPAT=y # # IO Schedulers @@ -145,6 +132,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # Platform support # CONFIG_PPC_MULTIPLATFORM=y +# CONFIG_EMBEDDED6xx is not set # CONFIG_PPC_82xx is not set # CONFIG_PPC_83xx is not set # CONFIG_PPC_86xx is not set @@ -167,15 +155,7 @@ CONFIG_VIOPATH=y CONFIG_PPC_PMAC=y CONFIG_PPC_PMAC64=y CONFIG_PPC_MAPLE=y -CONFIG_PPC_PASEMI=y - -# -# PA Semi PWRficient options -# -CONFIG_PPC_PASEMI_IOMMU=y -# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set -CONFIG_PPC_PASEMI_MDIO=y -CONFIG_ELECTRA_IDE=y +# CONFIG_PPC_PASEMI is not set CONFIG_PPC_CELLEB=y # CONFIG_PPC_PS3 is not set CONFIG_PPC_CELL=y @@ -208,7 +188,6 @@ CONFIG_RTAS_FLASH=m CONFIG_PPC_PMI=m CONFIG_MMIO_NVRAM=y CONFIG_MPIC_U3_HT_IRQS=y -CONFIG_MPIC_BROKEN_REGREAD=y CONFIG_IBMVIO=y # CONFIG_IBMEBUS is not set # CONFIG_PPC_MPC106 is not set @@ -222,8 +201,6 @@ CONFIG_CPU_FREQ_STAT=y # CONFIG_CPU_FREQ_STAT_DETAILS is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y @@ -234,7 +211,6 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y # CPU Frequency drivers # CONFIG_CPU_FREQ_PMAC64=y -CONFIG_PPC_PASEMI_CPUFREQ=y # CONFIG_CPM2 is not set CONFIG_AXON_RAM=m # CONFIG_FSL_ULI1575 is not set @@ -278,8 +254,6 @@ CONFIG_SPARSEMEM=y CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SPARSEMEM_VMEMMAP=y CONFIG_MEMORY_HOTPLUG=y CONFIG_MEMORY_HOTPLUG_SPARSE=y CONFIG_SPLIT_PTLOCK_CPUS=4 @@ -294,7 +268,6 @@ CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set # CONFIG_PM is not set CONFIG_SUSPEND_SMP_POSSIBLE=y -CONFIG_HIBERNATION_SMP_POSSIBLE=y CONFIG_SECCOMP=y # CONFIG_WANT_DEVICE_TREE is not set CONFIG_ISA_DMA_API=y @@ -311,22 +284,12 @@ CONFIG_PCI_SYSCALL=y # CONFIG_PCIEPORTBUS is not set CONFIG_ARCH_SUPPORTS_MSI=y CONFIG_PCI_MSI=y -CONFIG_PCI_LEGACY=y # CONFIG_PCI_DEBUG is not set -CONFIG_PCCARD=y -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_CARDBUS=y # -# PC-card bridges +# PCCARD (PCMCIA/CardBus) support # -# CONFIG_YENTA is not set -# CONFIG_PD6729 is not set -# CONFIG_I82092 is not set -CONFIG_ELECTRA_CF=y +# CONFIG_PCCARD is not set CONFIG_HOTPLUG_PCI=m # CONFIG_HOTPLUG_PCI_FAKE is not set # CONFIG_HOTPLUG_PCI_CPCI is not set @@ -356,10 +319,7 @@ CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set +# CONFIG_IP_PNP is not set CONFIG_NET_IPIP=y # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set @@ -373,7 +333,6 @@ CONFIG_INET_TUNNEL=y CONFIG_INET_XFRM_MODE_TRANSPORT=y CONFIG_INET_XFRM_MODE_TUNNEL=y CONFIG_INET_XFRM_MODE_BEET=y -# CONFIG_INET_LRO is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set @@ -445,7 +404,6 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m CONFIG_NETFILTER_XT_MATCH_STATISTIC=m CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=m -# CONFIG_NETFILTER_XT_MATCH_TIME is not set CONFIG_NETFILTER_XT_MATCH_U32=m CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m @@ -507,6 +465,10 @@ CONFIG_LLC=y # CONFIG_LAPB 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=y @@ -536,7 +498,6 @@ CONFIG_NET_CLS_ROUTE=y # # Generic Driver Options # -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y @@ -578,8 +539,6 @@ CONFIG_BLK_DEV_IDE=y # CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_BLK_DEV_IDECS is not set -# CONFIG_BLK_DEV_DELKIN is not set CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set @@ -591,11 +550,6 @@ CONFIG_IDE_PROC_FS=y # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_PLATFORM is not set - -# -# PCI IDE chipsets support -# CONFIG_BLK_DEV_IDEPCI=y CONFIG_IDEPCI_SHARE_IRQ=y CONFIG_IDEPCI_PCIBUS_ORDER=y @@ -603,6 +557,8 @@ CONFIG_IDEPCI_PCIBUS_ORDER=y CONFIG_BLK_DEV_GENERIC=y # CONFIG_BLK_DEV_OPTI621 is not set CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +# CONFIG_IDEDMA_ONLYDISK is not set # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set CONFIG_BLK_DEV_AMD74XX=y @@ -634,7 +590,7 @@ CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y CONFIG_BLK_DEV_IDEDMA_PMAC=y # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y -CONFIG_IDE_ARCH_OBSOLETE_INIT=y +# CONFIG_IDEDMA_IVB is not set # CONFIG_BLK_DEV_HD is not set # @@ -675,7 +631,6 @@ CONFIG_SCSI_FC_ATTRS=y CONFIG_SCSI_ISCSI_ATTRS=m # CONFIG_SCSI_SAS_ATTRS is not set # CONFIG_SCSI_SAS_LIBSAS is not set -CONFIG_SCSI_SRP_ATTRS=y CONFIG_SCSI_LOWLEVEL=y # CONFIG_ISCSI_TCP is not set # CONFIG_BLK_DEV_3W_XXXX_RAID is not set @@ -716,20 +671,19 @@ CONFIG_SCSI_LPFC=m # CONFIG_SCSI_DC390T is not set CONFIG_SCSI_DEBUG=m # CONFIG_SCSI_SRP is not set -# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set CONFIG_ATA=y CONFIG_ATA_NONSTANDARD=y # CONFIG_SATA_AHCI is not set CONFIG_SATA_SVW=y # CONFIG_ATA_PIIX is not set -CONFIG_SATA_MV=y +# CONFIG_SATA_MV is not set # CONFIG_SATA_NV is not set # CONFIG_PDC_ADMA is not set # CONFIG_SATA_QSTOR is not set # CONFIG_SATA_PROMISE is not set # CONFIG_SATA_SX4 is not set # CONFIG_SATA_SIL is not set -CONFIG_SATA_SIL24=y +# CONFIG_SATA_SIL24 is not set # CONFIG_SATA_SIS is not set # CONFIG_SATA_ULI is not set # CONFIG_SATA_VIA is not set @@ -759,10 +713,8 @@ CONFIG_SATA_SIL24=y # CONFIG_PATA_OLDPIIX is not set # CONFIG_PATA_NETCELL is not set # CONFIG_PATA_NS87410 is not set -# CONFIG_PATA_NS87415 is not set # CONFIG_PATA_OPTI is not set # CONFIG_PATA_OPTIDMA is not set -CONFIG_PATA_PCMCIA=y # CONFIG_PATA_PDC_OLD is not set # CONFIG_PATA_RADISYS is not set # CONFIG_PATA_RZ1000 is not set @@ -773,7 +725,6 @@ CONFIG_PATA_PCMCIA=y # CONFIG_PATA_SIS is not set # CONFIG_PATA_VIA is not set CONFIG_PATA_WINBOND=y -CONFIG_PATA_PLATFORM=y CONFIG_PATA_SCC=y CONFIG_MD=y CONFIG_BLK_DEV_MD=y @@ -794,10 +745,15 @@ CONFIG_DM_ZERO=m CONFIG_DM_MULTIPATH=m CONFIG_DM_MULTIPATH_EMC=m # CONFIG_DM_MULTIPATH_RDAC is not set -# CONFIG_DM_MULTIPATH_HP is not set # CONFIG_DM_DELAY is not set -# CONFIG_DM_UEVENT is not set + +# +# Fusion MPT device support +# # CONFIG_FUSION is not set +# CONFIG_FUSION_SPI is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set # # IEEE 1394 (FireWire) support @@ -844,15 +800,13 @@ CONFIG_BONDING=m # CONFIG_MACVLAN is not set # CONFIG_EQUALIZER is not set CONFIG_TUN=m -# CONFIG_VETH is not set -# CONFIG_IP1000 is not set # CONFIG_ARCNET is not set -CONFIG_PHYLIB=y +CONFIG_PHYLIB=m # # MII PHY device drivers # -CONFIG_MARVELL_PHY=y +CONFIG_MARVELL_PHY=m # CONFIG_DAVICOM_PHY is not set # CONFIG_QSEMI_PHY is not set # CONFIG_LXT_PHY is not set @@ -864,9 +818,6 @@ CONFIG_BROADCOM_PHY=m CONFIG_FIXED_PHY=m CONFIG_FIXED_MII_10_FDX=y CONFIG_FIXED_MII_100_FDX=y -# CONFIG_FIXED_MII_1000_FDX is not set -CONFIG_FIXED_MII_AMNT=1 -# CONFIG_MDIO_BITBANG is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y # CONFIG_HAPPYMEAL is not set @@ -878,11 +829,6 @@ CONFIG_VORTEX=y # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set CONFIG_IBMVETH=m -# CONFIG_IBM_NEW_EMAC is not set -CONFIG_IBM_NEW_EMAC_ZMII=y -CONFIG_IBM_NEW_EMAC_RGMII=y -CONFIG_IBM_NEW_EMAC_TAH=y -CONFIG_IBM_NEW_EMAC_EMAC4=y CONFIG_NET_PCI=y CONFIG_PCNET32=y # CONFIG_PCNET32_NAPI is not set @@ -890,6 +836,7 @@ CONFIG_PCNET32=y # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set CONFIG_E100=y # CONFIG_FEALNX is not set @@ -909,7 +856,6 @@ CONFIG_ACENIC_OMIT_TIGON_I=y CONFIG_E1000=y # CONFIG_E1000_NAPI is not set # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -# CONFIG_E1000E is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set @@ -917,7 +863,6 @@ CONFIG_E1000=y # CONFIG_SIS190 is not set # CONFIG_SKGE is not set # CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set # CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y # CONFIG_BNX2 is not set @@ -927,16 +872,13 @@ CONFIG_SPIDER_NET=m CONFIG_NETDEV_10000=y # CONFIG_CHELSIO_T1 is not set # CONFIG_CHELSIO_T3 is not set -# CONFIG_IXGBE is not set CONFIG_IXGB=m # CONFIG_IXGB_NAPI is not set # CONFIG_S2IO is not set # CONFIG_MYRI10GE is not set # CONFIG_NETXEN_NIC is not set -# CONFIG_NIU is not set -CONFIG_PASEMI_MAC=y +CONFIG_PASEMI_MAC=m # CONFIG_MLX4_CORE is not set -# CONFIG_TEHUTI is not set CONFIG_TR=y CONFIG_IBMOL=y # CONFIG_3C359 is not set @@ -957,7 +899,6 @@ CONFIG_IBMOL=y # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET_MII is not set # CONFIG_USB_USBNET is not set -# CONFIG_NET_PCMCIA is not set # CONFIG_WAN is not set CONFIG_ISERIES_VETH=m # CONFIG_FDDI is not set @@ -977,7 +918,6 @@ CONFIG_SLHC=m # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set CONFIG_NETCONSOLE=y -# CONFIG_NETCONSOLE_DYNAMIC is not set CONFIG_NETPOLL=y CONFIG_NETPOLL_TRAP=y CONFIG_NET_POLL_CONTROLLER=y @@ -999,6 +939,7 @@ CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set CONFIG_INPUT_EVDEV=m # CONFIG_INPUT_EVBUG is not set @@ -1061,7 +1002,6 @@ CONFIG_HW_CONSOLE=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_PCI=y -# CONFIG_SERIAL_8250_CS is not set CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set @@ -1089,18 +1029,14 @@ CONFIG_HVC_RTAS=y CONFIG_HVC_BEAT=y CONFIG_HVCS=m # CONFIG_IPMI_HANDLER is not set +# CONFIG_WATCHDOG is not set # CONFIG_HW_RANDOM is not set CONFIG_GEN_RTC=y # CONFIG_GEN_RTC_X is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -# CONFIG_CARDMAN_4000 is not set -# CONFIG_CARDMAN_4040 is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 # CONFIG_HANGCHECK_TIMER is not set @@ -1132,7 +1068,6 @@ CONFIG_I2C_POWERMAC=y # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set -CONFIG_I2C_PASEMI=y # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set # CONFIG_I2C_SIMTEC is not set @@ -1171,13 +1106,6 @@ CONFIG_I2C_PASEMI=y # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set # CONFIG_HWMON is not set -# CONFIG_WATCHDOG is not set - -# -# Sonics Silicon Backplane -# -CONFIG_SSB_POSSIBLE=y -# CONFIG_SSB is not set # # Multifunction device drivers @@ -1194,8 +1122,18 @@ CONFIG_SSB_POSSIBLE=y # # Graphics support # -# CONFIG_AGP is not set -# CONFIG_DRM is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y + +# +# Display device support +# +CONFIG_DISPLAY_SUPPORT=y + +# +# Display hardware drivers +# # CONFIG_VGASTATE is not set CONFIG_VIDEO_OUTPUT_CONTROL=m CONFIG_FB=y @@ -1204,7 +1142,6 @@ CONFIG_FB_DDC=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set # CONFIG_FB_SYS_FILLRECT is not set # CONFIG_FB_SYS_COPYAREA is not set # CONFIG_FB_SYS_IMAGEBLIT is not set @@ -1255,19 +1192,6 @@ CONFIG_FB_RADEON_BACKLIGHT=y # CONFIG_FB_PM3 is not set CONFIG_FB_IBM_GXT4500=y # CONFIG_FB_VIRTUAL is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_CORGI is not set - -# -# Display device support -# -CONFIG_DISPLAY_SUPPORT=y - -# -# Display hardware drivers -# # # Console display driver support @@ -1408,12 +1332,6 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m # CONFIG_SND_USB_USX2Y is not set # CONFIG_SND_USB_CAIAQ is not set -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - # # System on Chip audio support # @@ -1430,7 +1348,6 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m CONFIG_HID_SUPPORT=y CONFIG_HID=y # CONFIG_HID_DEBUG is not set -# CONFIG_HIDRAW is not set # # USB Input Devices @@ -1572,53 +1489,19 @@ CONFIG_EDAC=y # # CONFIG_EDAC_DEBUG is not set CONFIG_EDAC_MM_EDAC=y -CONFIG_EDAC_PASEMI=y -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -# CONFIG_RTC_DEBUG is not set - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -CONFIG_RTC_DRV_DS1307=y -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_CLASS is not set # -# SPI RTC drivers +# DMA Engine support # +# CONFIG_DMA_ENGINE is not set # -# Platform RTC drivers +# DMA Clients # -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_V3020 is not set # -# on-CPU RTC drivers +# DMA Devices # # @@ -1702,6 +1585,7 @@ CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y +CONFIG_RAMFS=y # CONFIG_CONFIGFS_FS is not set # @@ -1720,7 +1604,10 @@ CONFIG_CRAMFS=y # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y + +# +# Network File Systems +# CONFIG_NFS_FS=y CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y @@ -1732,7 +1619,6 @@ CONFIG_NFSD_V3=y CONFIG_NFSD_V3_ACL=y CONFIG_NFSD_V4=y CONFIG_NFSD_TCP=y -CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=m @@ -1740,7 +1626,6 @@ CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y -CONFIG_SUNRPC_XPRT_RDMA=m # CONFIG_SUNRPC_BIND34 is not set CONFIG_RPCSEC_GSS_KRB5=y CONFIG_RPCSEC_GSS_SPKM3=m @@ -1777,6 +1662,10 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_KARMA_PARTITION is not set # CONFIG_EFI_PARTITION is not set # CONFIG_SYSV68_PARTITION is not set + +# +# Native Language Support +# CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y @@ -1817,6 +1706,10 @@ CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m CONFIG_NLS_UTF8=m + +# +# Distributed Lock Manager +# # CONFIG_DLM is not set # CONFIG_UCC_SLOW is not set @@ -1840,17 +1733,18 @@ CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y -CONFIG_INSTRUMENTATION=y + +# +# Instrumentation Support +# CONFIG_PROFILING=y CONFIG_OPROFILE=y # CONFIG_KPROBES is not set -# CONFIG_MARKERS is not set # # Kernel hacking # # CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set @@ -1874,12 +1768,9 @@ CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_SG is not set CONFIG_FORCED_INLINING=y -# CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_FAULT_INJECTION is not set -# CONFIG_SAMPLES is not set CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_STACK_USAGE=y # CONFIG_DEBUG_PAGEALLOC is not set @@ -1889,7 +1780,6 @@ CONFIG_XMON=y # CONFIG_XMON_DEFAULT is not set CONFIG_XMON_DISASSEMBLY=y CONFIG_IRQSTACKS=y -# CONFIG_VIRQ_DEBUG is not set CONFIG_BOOTX_TEXT=y # CONFIG_PPC_EARLY_DEBUG is not set @@ -1898,7 +1788,6 @@ CONFIG_BOOTX_TEXT=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set -# CONFIG_SECURITY_FILE_CAPABILITIES is not set CONFIG_XOR_BLOCKS=y CONFIG_ASYNC_CORE=y CONFIG_ASYNC_MEMCPY=y @@ -1923,7 +1812,6 @@ CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_PCBC=m # CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_XTS is not set # CONFIG_CRYPTO_CRYPTD is not set CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_FCRYPT is not set @@ -1938,12 +1826,9 @@ CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_KHAZAD=m CONFIG_CRYPTO_ANUBIS=m -# CONFIG_CRYPTO_SEED is not set CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m CONFIG_CRYPTO_CRC32C=m # CONFIG_CRYPTO_CAMELLIA is not set CONFIG_CRYPTO_TEST=m -# CONFIG_CRYPTO_AUTHENC is not set # CONFIG_CRYPTO_HW is not set -# CONFIG_PPC_CLOCK is not set diff --git a/trunk/arch/powerpc/kernel/cputable.c b/trunk/arch/powerpc/kernel/cputable.c index 9ed351f3c966..d3fb7d0c6c1c 100644 --- a/trunk/arch/powerpc/kernel/cputable.c +++ b/trunk/arch/powerpc/kernel/cputable.c @@ -1104,16 +1104,6 @@ static struct cpu_spec __initdata cpu_specs[] = { { .pvr_mask = 0xf0000fff, .pvr_value = 0x40000850, - .cpu_name = "440GR Rev. A", - .cpu_features = CPU_FTRS_44X, - .cpu_user_features = COMMON_USER_BOOKE, - .icache_bsize = 32, - .dcache_bsize = 32, - .platform = "ppc440", - }, - { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */ - .pvr_mask = 0xf0000fff, - .pvr_value = 0x40000858, .cpu_name = "440EP Rev. A", .cpu_features = CPU_FTRS_44X, .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, @@ -1125,16 +1115,6 @@ static struct cpu_spec __initdata cpu_specs[] = { { .pvr_mask = 0xf0000fff, .pvr_value = 0x400008d3, - .cpu_name = "440GR Rev. B", - .cpu_features = CPU_FTRS_44X, - .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, - .icache_bsize = 32, - .dcache_bsize = 32, - .platform = "ppc440", - }, - { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */ - .pvr_mask = 0xf0000fff, - .pvr_value = 0x400008db, .cpu_name = "440EP Rev. B", .cpu_features = CPU_FTRS_44X, .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, @@ -1143,26 +1123,26 @@ static struct cpu_spec __initdata cpu_specs[] = { .cpu_setup = __setup_cpu_440ep, .platform = "ppc440", }, - { /* 440GRX */ + { /* 440EPX */ .pvr_mask = 0xf0000ffb, .pvr_value = 0x200008D0, - .cpu_name = "440GRX", + .cpu_name = "440EPX", .cpu_features = CPU_FTRS_44X, - .cpu_user_features = COMMON_USER_BOOKE, + .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, .icache_bsize = 32, .dcache_bsize = 32, - .cpu_setup = __setup_cpu_440grx, + .cpu_setup = __setup_cpu_440epx, .platform = "ppc440", }, - { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */ + { /* 440GRX */ .pvr_mask = 0xf0000ffb, .pvr_value = 0x200008D8, - .cpu_name = "440EPX", + .cpu_name = "440GRX", .cpu_features = CPU_FTRS_44X, - .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, + .cpu_user_features = COMMON_USER_BOOKE, .icache_bsize = 32, .dcache_bsize = 32, - .cpu_setup = __setup_cpu_440epx, + .cpu_setup = __setup_cpu_440grx, .platform = "ppc440", }, { /* 440GP Rev. B */ diff --git a/trunk/arch/powerpc/kernel/entry_32.S b/trunk/arch/powerpc/kernel/entry_32.S index a7572cf464bd..21d889e63e87 100644 --- a/trunk/arch/powerpc/kernel/entry_32.S +++ b/trunk/arch/powerpc/kernel/entry_32.S @@ -244,13 +244,6 @@ syscall_exit_cont: andis. r10,r0,DBCR0_IC@h bnel- load_dbcr0 #endif -#ifdef CONFIG_44x - lis r4,icache_44x_need_flush@ha - lwz r5,icache_44x_need_flush@l(r4) - cmplwi cr0,r5,0 - bne- 2f -1: -#endif /* CONFIG_44x */ stwcx. r0,0,r1 /* to clear the reservation */ lwz r4,_LINK(r1) lwz r5,_CCR(r1) @@ -265,12 +258,6 @@ syscall_exit_cont: mtspr SPRN_SRR1,r8 SYNC RFI -#ifdef CONFIG_44x -2: li r7,0 - iccci r0,r0 - stw r7,icache_44x_need_flush@l(r4) - b 1b -#endif /* CONFIG_44x */ 66: li r3,-ENOSYS b ret_from_syscall @@ -696,16 +683,6 @@ resume_kernel: /* interrupts are hard-disabled at this point */ restore: -#ifdef CONFIG_44x - lis r4,icache_44x_need_flush@ha - lwz r5,icache_44x_need_flush@l(r4) - cmplwi cr0,r5,0 - beq+ 1f - li r6,0 - iccci r0,r0 - stw r6,icache_44x_need_flush@l(r4) -1: -#endif /* CONFIG_44x */ lwz r0,GPR0(r1) lwz r2,GPR2(r1) REST_4GPRS(3, r1) diff --git a/trunk/arch/powerpc/kernel/head_64.S b/trunk/arch/powerpc/kernel/head_64.S index c34986835a4e..97c5857faf00 100644 --- a/trunk/arch/powerpc/kernel/head_64.S +++ b/trunk/arch/powerpc/kernel/head_64.S @@ -904,7 +904,7 @@ handle_page_fault: */ 12: bl .save_nvgprs addi r3,r1,STACK_FRAME_OVERHEAD - ld r4,_DAR(r1) + lwz r4,_DAR(r1) bl .low_hash_fault b .ret_from_except diff --git a/trunk/arch/powerpc/kernel/idle.c b/trunk/arch/powerpc/kernel/idle.c index c3cf0e8f3ac1..abd2957fe537 100644 --- a/trunk/arch/powerpc/kernel/idle.c +++ b/trunk/arch/powerpc/kernel/idle.c @@ -122,7 +122,7 @@ static ctl_table powersave_nap_sysctl_root[] = { { .ctl_name = CTL_KERN, .procname = "kernel", - .mode = 0555, + .mode = 0755, .child = powersave_nap_ctl_table, }, {} diff --git a/trunk/arch/powerpc/kernel/misc_32.S b/trunk/arch/powerpc/kernel/misc_32.S index 8b642ab26d37..8533de50347d 100644 --- a/trunk/arch/powerpc/kernel/misc_32.S +++ b/trunk/arch/powerpc/kernel/misc_32.S @@ -288,16 +288,7 @@ _GLOBAL(_tlbia) */ _GLOBAL(_tlbie) #if defined(CONFIG_40x) - /* We run the search with interrupts disabled because we have to change - * the PID and I don't want to preempt when that happens. - */ - mfmsr r5 - mfspr r6,SPRN_PID - wrteei 0 - mtspr SPRN_PID,r4 tlbsx. r3, 0, r3 - mtspr SPRN_PID,r6 - wrtee r5 bne 10f sync /* There are only 64 TLB entries, so r3 < 64, which means bit 25 is clear. @@ -306,23 +297,23 @@ _GLOBAL(_tlbie) tlbwe r3, r3, TLB_TAG isync 10: - #elif defined(CONFIG_44x) - mfspr r5,SPRN_MMUCR - rlwimi r5,r4,0,24,31 /* Set TID */ + mfspr r4,SPRN_MMUCR + mfspr r5,SPRN_PID /* Get PID */ + rlwimi r4,r5,0,24,31 /* Set TID */ /* We have to run the search with interrupts disabled, even critical * and debug interrupts (in fact the only critical exceptions we have * are debug and machine check). Otherwise an interrupt which causes * a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */ - mfmsr r4 + mfmsr r5 lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l - andc r6,r4,r6 + andc r6,r5,r6 mtmsr r6 - mtspr SPRN_MMUCR,r5 + mtspr SPRN_MMUCR,r4 tlbsx. r3, 0, r3 - mtmsr r4 + mtmsr r5 bne 10f sync /* There are only 64 TLB entries, so r3 < 64, @@ -543,21 +534,12 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) addi r3,r3,L1_CACHE_BYTES bdnz 0b sync -#ifndef CONFIG_44x - /* We don't flush the icache on 44x. Those have a virtual icache - * and we don't have access to the virtual address here (it's - * not the page vaddr but where it's mapped in user space). The - * flushing of the icache on these is handled elsewhere, when - * a change in the address space occurs, before returning to - * user space - */ mtctr r4 1: icbi 0,r6 addi r6,r6,L1_CACHE_BYTES bdnz 1b sync isync -#endif /* CONFIG_44x */ blr /* diff --git a/trunk/arch/powerpc/kernel/prom.c b/trunk/arch/powerpc/kernel/prom.c index acc0d247d3c3..9f329a8928ea 100644 --- a/trunk/arch/powerpc/kernel/prom.c +++ b/trunk/arch/powerpc/kernel/prom.c @@ -697,18 +697,6 @@ static int __init early_init_dt_scan_cpus(unsigned long node, prop = of_get_flat_dt_prop(node, "cpu-version", NULL); if (prop && (*prop & 0xff000000) == 0x0f000000) identify_cpu(0, *prop); -#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU) - /* - * Since 440GR(x)/440EP(x) processors have the same pvr, - * we check the node path and set bit 28 in the cur_cpu_spec - * pvr for EP(x) processor version. This bit is always 0 in - * the "real" pvr. Then we call identify_cpu again with - * the new logical pvr to enable FPU support. - */ - if (strstr(uname, "440EP")) { - identify_cpu(0, cur_cpu_spec->pvr_value | 0x8); - } -#endif } check_cpu_feature_properties(node); diff --git a/trunk/arch/powerpc/kernel/prom_init.c b/trunk/arch/powerpc/kernel/prom_init.c index 1add6efdb315..1db10f70ae69 100644 --- a/trunk/arch/powerpc/kernel/prom_init.c +++ b/trunk/arch/powerpc/kernel/prom_init.c @@ -1244,7 +1244,7 @@ static void __init prom_initialize_tce_table(void) local_alloc_bottom = base; /* It seems OF doesn't null-terminate the path :-( */ - memset(path, 0, PROM_SCRATCH_SIZE); + memset(path, 0, sizeof(path)); /* Call OF to setup the TCE hardware */ if (call_prom("package-to-path", 3, 1, node, path, PROM_SCRATCH_SIZE-1) == PROM_ERROR) { diff --git a/trunk/arch/powerpc/kernel/setup_64.c b/trunk/arch/powerpc/kernel/setup_64.c index 3b1529c103ef..ede77dbbd4df 100644 --- a/trunk/arch/powerpc/kernel/setup_64.c +++ b/trunk/arch/powerpc/kernel/setup_64.c @@ -291,16 +291,23 @@ static void __init initialize_cache_info(void) if ( num_cpus == 1 ) { const u32 *sizep, *lsizep; u32 size, lsize; + const char *dc, *ic; + + /* Then read cache informations */ + if (machine_is(powermac)) { + dc = "d-cache-block-size"; + ic = "i-cache-block-size"; + } else { + dc = "d-cache-line-size"; + ic = "i-cache-line-size"; + } size = 0; lsize = cur_cpu_spec->dcache_bsize; sizep = of_get_property(np, "d-cache-size", NULL); if (sizep != NULL) size = *sizep; - lsizep = of_get_property(np, "d-cache-block-size", NULL); - /* fallback if block size missing */ - if (lsizep == NULL) - lsizep = of_get_property(np, "d-cache-line-size", NULL); + lsizep = of_get_property(np, dc, NULL); if (lsizep != NULL) lsize = *lsizep; if (sizep == 0 || lsizep == 0) @@ -317,9 +324,7 @@ static void __init initialize_cache_info(void) sizep = of_get_property(np, "i-cache-size", NULL); if (sizep != NULL) size = *sizep; - lsizep = of_get_property(np, "i-cache-block-size", NULL); - if (lsizep == NULL) - lsizep = of_get_property(np, "i-cache-line-size", NULL); + lsizep = of_get_property(np, ic, NULL); if (lsizep != NULL) lsize = *lsizep; if (sizep == 0 || lsizep == 0) diff --git a/trunk/arch/powerpc/kernel/swsusp_32.S b/trunk/arch/powerpc/kernel/swsusp_32.S index 77fc76607ab2..69e8f86aa4f8 100644 --- a/trunk/arch/powerpc/kernel/swsusp_32.S +++ b/trunk/arch/powerpc/kernel/swsusp_32.S @@ -133,12 +133,10 @@ _GLOBAL(swsusp_arch_suspend) /* Resume code */ _GLOBAL(swsusp_arch_resume) -#ifdef CONFIG_ALTIVEC /* Stop pending alitvec streams and memory accesses */ BEGIN_FTR_SECTION DSSALL END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) -#endif sync /* Disable MSR:DR to make sure we don't take a TLB or diff --git a/trunk/arch/powerpc/kernel/time.c b/trunk/arch/powerpc/kernel/time.c index 99ebcd3884d2..9eb3284deac4 100644 --- a/trunk/arch/powerpc/kernel/time.c +++ b/trunk/arch/powerpc/kernel/time.c @@ -586,7 +586,7 @@ void timer_interrupt(struct pt_regs * regs) /* not time for this event yet */ now = per_cpu(decrementer_next_tb, cpu) - now; if (now <= DECREMENTER_MAX) - set_dec((int)now); + set_dec((unsigned int)now - 1); return; } old_regs = set_irq_regs(regs); @@ -611,6 +611,8 @@ void timer_interrupt(struct pt_regs * regs) if (evt->event_handler) evt->event_handler(evt); + else + evt->set_next_event(DECREMENTER_MAX, evt); #ifdef CONFIG_PPC_ISERIES if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending()) @@ -834,6 +836,9 @@ static int decrementer_set_next_event(unsigned long evt, struct clock_event_device *dev) { __get_cpu_var(decrementer_next_tb) = get_tb_or_rtc() + evt; + /* The decrementer interrupts on the 0 -> -1 transition */ + if (evt) + --evt; set_dec(evt); return 0; } @@ -866,8 +871,7 @@ void init_decrementer_clockevent(void) decrementer_clockevent.shift); decrementer_clockevent.max_delta_ns = clockevent_delta2ns(DECREMENTER_MAX, &decrementer_clockevent); - decrementer_clockevent.min_delta_ns = - clockevent_delta2ns(2, &decrementer_clockevent); + decrementer_clockevent.min_delta_ns = 1000; register_decrementer_clockevent(cpu); } diff --git a/trunk/arch/powerpc/kernel/vmlinux.lds.S b/trunk/arch/powerpc/kernel/vmlinux.lds.S index f66fa5d966b0..823a8cbd60b5 100644 --- a/trunk/arch/powerpc/kernel/vmlinux.lds.S +++ b/trunk/arch/powerpc/kernel/vmlinux.lds.S @@ -37,10 +37,11 @@ SECTIONS ALIGN_FUNCTION(); *(.text.head) _text = .; - *(.text .fixup .text.init.refok .exit.text.refok) + TEXT_TEXT SCHED_TEXT LOCK_TEXT KPROBES_TEXT + *(.fixup) #ifdef CONFIG_PPC32 *(.got1) diff --git a/trunk/arch/powerpc/mm/40x_mmu.c b/trunk/arch/powerpc/mm/40x_mmu.c index 3899ea97fbdf..e067df836be2 100644 --- a/trunk/arch/powerpc/mm/40x_mmu.c +++ b/trunk/arch/powerpc/mm/40x_mmu.c @@ -98,12 +98,13 @@ unsigned long __init mmu_mapin_ram(void) v = KERNELBASE; p = PPC_MEMSTART; - s = total_lowmem; + s = 0; - if (__map_without_ltlbs) - return 0; + if (__map_without_ltlbs) { + return s; + } - while (s >= LARGE_PAGE_SIZE_16M) { + while (s <= (total_lowmem - LARGE_PAGE_SIZE_16M)) { pmd_t *pmdp; unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; @@ -115,10 +116,10 @@ unsigned long __init mmu_mapin_ram(void) v += LARGE_PAGE_SIZE_16M; p += LARGE_PAGE_SIZE_16M; - s -= LARGE_PAGE_SIZE_16M; + s += LARGE_PAGE_SIZE_16M; } - while (s >= LARGE_PAGE_SIZE_4M) { + while (s <= (total_lowmem - LARGE_PAGE_SIZE_4M)) { pmd_t *pmdp; unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; @@ -127,8 +128,8 @@ unsigned long __init mmu_mapin_ram(void) v += LARGE_PAGE_SIZE_4M; p += LARGE_PAGE_SIZE_4M; - s -= LARGE_PAGE_SIZE_4M; + s += LARGE_PAGE_SIZE_4M; } - return total_lowmem - s; + return s; } diff --git a/trunk/arch/powerpc/mm/44x_mmu.c b/trunk/arch/powerpc/mm/44x_mmu.c index 04dc08798d3d..c3df50476539 100644 --- a/trunk/arch/powerpc/mm/44x_mmu.c +++ b/trunk/arch/powerpc/mm/44x_mmu.c @@ -35,7 +35,6 @@ */ unsigned int tlb_44x_index; /* = 0 */ unsigned int tlb_44x_hwater = PPC44x_TLB_SIZE - 1 - PPC44x_EARLY_TLBS; -int icache_44x_need_flush; /* * "Pins" a 256MB TLB entry in AS0 for kernel lowmem diff --git a/trunk/arch/powerpc/mm/fault.c b/trunk/arch/powerpc/mm/fault.c index 8135da06e0a4..a18fda361cc0 100644 --- a/trunk/arch/powerpc/mm/fault.c +++ b/trunk/arch/powerpc/mm/fault.c @@ -309,7 +309,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address, set_bit(PG_arch_1, &page->flags); } pte_update(ptep, 0, _PAGE_HWEXEC); - _tlbie(address, mm->context.id); + _tlbie(address); pte_unmap_unlock(ptep, ptl); up_read(&mm->mmap_sem); return 0; diff --git a/trunk/arch/powerpc/mm/hash_low_64.S b/trunk/arch/powerpc/mm/hash_low_64.S index e935edd6b72b..ad253b959030 100644 --- a/trunk/arch/powerpc/mm/hash_low_64.S +++ b/trunk/arch/powerpc/mm/hash_low_64.S @@ -331,7 +331,7 @@ htab_pte_insert_failure: *****************************************************************************/ /* _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid, - * pte_t *ptep, unsigned long trap, int local, int ssize) + * pte_t *ptep, unsigned long trap, int local) */ /* @@ -557,8 +557,7 @@ htab_inval_old_hpte: mr r4,r31 /* PTE.pte */ li r5,0 /* PTE.hidx */ li r6,MMU_PAGE_64K /* psize */ - ld r7,STK_PARM(r9)(r1) /* ssize */ - ld r8,STK_PARM(r8)(r1) /* local */ + ld r7,STK_PARM(r8)(r1) /* local */ bl .flush_hash_page b htab_insert_pte diff --git a/trunk/arch/powerpc/mm/hash_utils_64.c b/trunk/arch/powerpc/mm/hash_utils_64.c index f09730bf3a33..c78dc912411f 100644 --- a/trunk/arch/powerpc/mm/hash_utils_64.c +++ b/trunk/arch/powerpc/mm/hash_utils_64.c @@ -51,7 +51,6 @@ #include #include #include -#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -792,7 +791,8 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap) } if (user_region) { if (psize != get_paca()->context.user_psize) { - get_paca()->context = mm->context; + get_paca()->context.user_psize = + mm->context.user_psize; slb_flush_and_rebolt(); } } else if (get_paca()->vmalloc_sllp != @@ -885,9 +885,6 @@ void hash_preload(struct mm_struct *mm, unsigned long ea, local_irq_restore(flags); } -/* WARNING: This is called from hash_low_64.S, if you change this prototype, - * do not forget to update the assembly call site ! - */ void flush_hash_page(unsigned long va, real_pte_t pte, int psize, int ssize, int local) { diff --git a/trunk/arch/powerpc/mm/mmu_decl.h b/trunk/arch/powerpc/mm/mmu_decl.h index eb3a732e91db..c94a64fd3c01 100644 --- a/trunk/arch/powerpc/mm/mmu_decl.h +++ b/trunk/arch/powerpc/mm/mmu_decl.h @@ -61,12 +61,12 @@ extern unsigned long total_lowmem; #define mmu_mapin_ram() (0UL) #elif defined(CONFIG_4xx) -#define flush_HPTE(pid, va, pg) _tlbie(va, pid) +#define flush_HPTE(X, va, pg) _tlbie(va) extern void MMU_init_hw(void); extern unsigned long mmu_mapin_ram(void); #elif defined(CONFIG_FSL_BOOKE) -#define flush_HPTE(pid, va, pg) _tlbie(va, pid) +#define flush_HPTE(X, va, pg) _tlbie(va) extern void MMU_init_hw(void); extern unsigned long mmu_mapin_ram(void); extern void adjust_total_lowmem(void); diff --git a/trunk/arch/powerpc/mm/slb.c b/trunk/arch/powerpc/mm/slb.c index 27922dff8b94..bbd2c512ee05 100644 --- a/trunk/arch/powerpc/mm/slb.c +++ b/trunk/arch/powerpc/mm/slb.c @@ -25,7 +25,6 @@ #include #include #include -#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) @@ -149,35 +148,6 @@ void slb_vmalloc_update(void) slb_flush_and_rebolt(); } -/* Helper function to compare esids. There are four cases to handle. - * 1. The system is not 1T segment size capable. Use the GET_ESID compare. - * 2. The system is 1T capable, both addresses are < 1T, use the GET_ESID compare. - * 3. The system is 1T capable, only one of the two addresses is > 1T. This is not a match. - * 4. The system is 1T capable, both addresses are > 1T, use the GET_ESID_1T macro to compare. - */ -static inline int esids_match(unsigned long addr1, unsigned long addr2) -{ - int esid_1t_count; - - /* System is not 1T segment size capable. */ - if (!cpu_has_feature(CPU_FTR_1T_SEGMENT)) - return (GET_ESID(addr1) == GET_ESID(addr2)); - - esid_1t_count = (((addr1 >> SID_SHIFT_1T) != 0) + - ((addr2 >> SID_SHIFT_1T) != 0)); - - /* both addresses are < 1T */ - if (esid_1t_count == 0) - return (GET_ESID(addr1) == GET_ESID(addr2)); - - /* One address < 1T, the other > 1T. Not a match */ - if (esid_1t_count == 1) - return 0; - - /* Both addresses are > 1T. */ - return (GET_ESID_1T(addr1) == GET_ESID_1T(addr2)); -} - /* Flush all user entries from the segment table of the current processor. */ void switch_slb(struct task_struct *tsk, struct mm_struct *mm) { @@ -223,14 +193,15 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm) return; slb_allocate(pc); - if (esids_match(pc,stack)) + if (GET_ESID(pc) == GET_ESID(stack)) return; if (is_kernel_addr(stack)) return; slb_allocate(stack); - if (esids_match(pc,unmapped_base) || esids_match(stack,unmapped_base)) + if ((GET_ESID(pc) == GET_ESID(unmapped_base)) + || (GET_ESID(stack) == GET_ESID(unmapped_base))) return; if (is_kernel_addr(unmapped_base)) diff --git a/trunk/arch/powerpc/platforms/cell/interrupt.c b/trunk/arch/powerpc/platforms/cell/interrupt.c index 04f74f9f9ab6..151fd8b82d63 100644 --- a/trunk/arch/powerpc/platforms/cell/interrupt.c +++ b/trunk/arch/powerpc/platforms/cell/interrupt.c @@ -158,18 +158,6 @@ static unsigned int iic_get_irq(void) return virq; } -void iic_setup_cpu(void) -{ - out_be64(&__get_cpu_var(iic).regs->prio, 0xff); -} - -u8 iic_get_target_id(int cpu) -{ - return per_cpu(iic, cpu).target_id; -} - -EXPORT_SYMBOL_GPL(iic_get_target_id); - #ifdef CONFIG_SMP /* Use the highest interrupt priorities for IPI */ @@ -178,17 +166,29 @@ static inline int iic_ipi_to_irq(int ipi) return IIC_IRQ_TYPE_IPI + 0xf - ipi; } +void iic_setup_cpu(void) +{ + out_be64(&__get_cpu_var(iic).regs->prio, 0xff); +} + void iic_cause_IPI(int cpu, int mesg) { out_be64(&per_cpu(iic, cpu).regs->generate, (0xf - mesg) << 4); } +u8 iic_get_target_id(int cpu) +{ + return per_cpu(iic, cpu).target_id; +} +EXPORT_SYMBOL_GPL(iic_get_target_id); + struct irq_host *iic_get_irq_host(int node) { return iic_host; } EXPORT_SYMBOL_GPL(iic_get_irq_host); + static irqreturn_t iic_ipi_action(int irq, void *dev_id) { int ipi = (int)(long)dev_id; diff --git a/trunk/arch/powerpc/platforms/cell/smp.c b/trunk/arch/powerpc/platforms/cell/smp.c index e4438456c867..1c0acbad7425 100644 --- a/trunk/arch/powerpc/platforms/cell/smp.c +++ b/trunk/arch/powerpc/platforms/cell/smp.c @@ -44,7 +44,6 @@ #include #include "interrupt.h" -#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) diff --git a/trunk/arch/powerpc/platforms/celleb/setup.c b/trunk/arch/powerpc/platforms/celleb/setup.c index ddfb35ae741f..1769d755eff3 100644 --- a/trunk/arch/powerpc/platforms/celleb/setup.c +++ b/trunk/arch/powerpc/platforms/celleb/setup.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/iseries/irq.h b/trunk/arch/powerpc/platforms/iseries/irq.h index a1c236074034..69f1b437fc7b 100644 --- a/trunk/arch/powerpc/platforms/iseries/irq.h +++ b/trunk/arch/powerpc/platforms/iseries/irq.h @@ -1,13 +1,9 @@ #ifndef _ISERIES_IRQ_H #define _ISERIES_IRQ_H -#ifdef CONFIG_PCI extern void iSeries_init_IRQ(void); extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, u32); extern void iSeries_activate_IRQs(void); -#else -#define iSeries_init_IRQ NULL -#endif extern unsigned int iSeries_get_irq(void); #endif /* _ISERIES_IRQ_H */ diff --git a/trunk/arch/powerpc/platforms/iseries/setup.c b/trunk/arch/powerpc/platforms/iseries/setup.c index 0877a8834110..37ae07ee54a9 100644 --- a/trunk/arch/powerpc/platforms/iseries/setup.c +++ b/trunk/arch/powerpc/platforms/iseries/setup.c @@ -617,6 +617,10 @@ static void iseries_dedicated_idle(void) } } +#ifndef CONFIG_PCI +void __init iSeries_init_IRQ(void) { } +#endif + static void __iomem *iseries_ioremap(phys_addr_t address, unsigned long size, unsigned long flags) { diff --git a/trunk/arch/powerpc/platforms/iseries/vio.c b/trunk/arch/powerpc/platforms/iseries/vio.c index be06cfd9fa3d..d6435b03971f 100644 --- a/trunk/arch/powerpc/platforms/iseries/vio.c +++ b/trunk/arch/powerpc/platforms/iseries/vio.c @@ -523,16 +523,15 @@ static void __init get_viotape_info(struct device_node *vio_root) static int __init iseries_vio_init(void) { struct device_node *vio_root; - int ret = -ENODEV; if (!firmware_has_feature(FW_FEATURE_ISERIES)) - goto out; + return -ENODEV; iommu_vio_init(); vio_root = of_find_node_by_path("/vdevice"); if (!vio_root) - goto out; + return -ENODEV; if (viopath_hostLp == HvLpIndexInvalid) { vio_set_hostlp(); @@ -545,11 +544,10 @@ static int __init iseries_vio_init(void) get_viocd_info(vio_root); get_viotape_info(vio_root); - ret = 0; + return 0; put_node: of_node_put(vio_root); - out: - return ret; + return -ENODEV; } arch_initcall(iseries_vio_init); diff --git a/trunk/arch/powerpc/platforms/pseries/eeh.c b/trunk/arch/powerpc/platforms/pseries/eeh.c index fb3d636e088b..22322b35a0ff 100644 --- a/trunk/arch/powerpc/platforms/pseries/eeh.c +++ b/trunk/arch/powerpc/platforms/pseries/eeh.c @@ -186,11 +186,6 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg); printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg); - if (!dev) { - printk(KERN_WARNING "EEH: no PCI device for this of node\n"); - return n; - } - /* Gather bridge-specific registers */ if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) { rtas_read_config(pdn, PCI_SEC_STATUS, 2, &cfg); @@ -203,7 +198,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) } /* Dump out the PCI-X command and status regs */ - cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); + cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_PCIX); if (cap) { rtas_read_config(pdn, cap, 4, &cfg); n += scnprintf(buf+n, len-n, "pcix-cmd:%x\n", cfg); @@ -215,7 +210,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) } /* If PCI-E capable, dump PCI-E cap 10, and the AER */ - cap = pci_find_capability(dev, PCI_CAP_ID_EXP); + cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_EXP); if (cap) { n += scnprintf(buf+n, len-n, "pci-e cap10:\n"); printk(KERN_WARNING @@ -227,7 +222,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); } - cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); + cap = pci_find_ext_capability(pdn->pcidev, PCI_EXT_CAP_ID_ERR); if (cap) { n += scnprintf(buf+n, len-n, "pci-e AER:\n"); printk(KERN_WARNING @@ -323,7 +318,7 @@ eeh_wait_for_slot_status(struct pci_dn *pdn, int max_wait_msecs) if (rets[2] == 0) return -1; /* permanently unavailable */ - if (max_wait_msecs <= 0) break; + if (max_wait_msecs <= 0) return -1; mwait = rets[2]; if (mwait <= 0) { diff --git a/trunk/arch/powerpc/platforms/pseries/eeh_driver.c b/trunk/arch/powerpc/platforms/pseries/eeh_driver.c index 57e025e84ab4..15e015ef6865 100644 --- a/trunk/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/trunk/arch/powerpc/platforms/pseries/eeh_driver.c @@ -105,18 +105,17 @@ static void eeh_report_error(struct pci_dev *dev, void *userdata) return; rc = driver->err_handler->error_detected (dev, pci_channel_io_frozen); - - /* A driver that needs a reset trumps all others */ - if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; if (*res == PCI_ERS_RESULT_NONE) *res = rc; + if (*res == PCI_ERS_RESULT_DISCONNECT && + rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; } /** * eeh_report_mmio_enabled - tell drivers that MMIO has been enabled * - * Tells each device driver that IO ports, MMIO and config space I/O - * are now enabled. Collects up and merges the device driver responses. - * Cumulative response passed back in "userdata". + * Report an EEH error to each device driver, collect up and + * merge the device driver responses. Cumulative response + * passed back in "userdata". */ static void eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata) @@ -124,16 +123,17 @@ static void eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata) enum pci_ers_result rc, *res = userdata; struct pci_driver *driver = dev->driver; + // dev->error_state = pci_channel_mmio_enabled; + if (!driver || !driver->err_handler || !driver->err_handler->mmio_enabled) return; rc = driver->err_handler->mmio_enabled (dev); - - /* A driver that needs a reset trumps all others */ - if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; if (*res == PCI_ERS_RESULT_NONE) *res = rc; + if (*res == PCI_ERS_RESULT_DISCONNECT && + rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; } /** diff --git a/trunk/arch/powerpc/platforms/pseries/firmware.c b/trunk/arch/powerpc/platforms/pseries/firmware.c index b765b7c77b65..8b18a1c40092 100644 --- a/trunk/arch/powerpc/platforms/pseries/firmware.c +++ b/trunk/arch/powerpc/platforms/pseries/firmware.c @@ -25,7 +25,6 @@ #include #include -#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) diff --git a/trunk/arch/powerpc/platforms/pseries/msi.c b/trunk/arch/powerpc/platforms/pseries/msi.c index f15222bbe136..2793a1b100e6 100644 --- a/trunk/arch/powerpc/platforms/pseries/msi.c +++ b/trunk/arch/powerpc/platforms/pseries/msi.c @@ -171,7 +171,6 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) struct pci_dn *pdn; int hwirq, virq, i, rc; struct msi_desc *entry; - struct msi_msg msg; pdn = get_pdn(pdev); if (!pdn) @@ -214,11 +213,6 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) dev_dbg(&pdev->dev, "rtas_msi: allocated virq %d\n", virq); set_irq_msi(virq, entry); - - /* Read config space back so we can restore after reset */ - read_msi_msg(virq, &msg); - entry->msg = msg; - unmask_msi_irq(virq); } diff --git a/trunk/arch/powerpc/sysdev/i8259.c b/trunk/arch/powerpc/sysdev/i8259.c index 216c0f5680d2..7c1b27ac7d3c 100644 --- a/trunk/arch/powerpc/sysdev/i8259.c +++ b/trunk/arch/powerpc/sysdev/i8259.c @@ -137,7 +137,6 @@ static void i8259_unmask_irq(unsigned int irq_nr) static struct irq_chip i8259_pic = { .typename = " i8259 ", .mask = i8259_mask_irq, - .disable = i8259_mask_irq, .unmask = i8259_unmask_irq, .mask_ack = i8259_mask_and_ack_irq, }; diff --git a/trunk/arch/powerpc/sysdev/mv64x60_pci.c b/trunk/arch/powerpc/sysdev/mv64x60_pci.c index 6933f9c73b43..9b3baa7317d7 100644 --- a/trunk/arch/powerpc/sysdev/mv64x60_pci.c +++ b/trunk/arch/powerpc/sysdev/mv64x60_pci.c @@ -24,9 +24,8 @@ #define MV64X60_VAL_LEN_MAX 11 #define MV64X60_PCICFG_CPCI_HOTSWAP 0x68 -static ssize_t mv64x60_hs_reg_read(struct kobject *kobj, - struct bin_attribute *attr, char *buf, - loff_t off, size_t count) +static ssize_t mv64x60_hs_reg_read(struct kobject *kobj, char *buf, loff_t off, + size_t count) { struct pci_dev *phb; u32 v; @@ -45,9 +44,8 @@ static ssize_t mv64x60_hs_reg_read(struct kobject *kobj, return sprintf(buf, "0x%08x\n", v); } -static ssize_t mv64x60_hs_reg_write(struct kobject *kobj, - struct bin_attribute *attr, char *buf, - loff_t off, size_t count) +static ssize_t mv64x60_hs_reg_write(struct kobject *kobj, char *buf, loff_t off, + size_t count) { struct pci_dev *phb; u32 v; diff --git a/trunk/arch/ppc/kernel/entry.S b/trunk/arch/ppc/kernel/entry.S index b19bfef2034d..fba7ca17a67e 100644 --- a/trunk/arch/ppc/kernel/entry.S +++ b/trunk/arch/ppc/kernel/entry.S @@ -244,13 +244,6 @@ syscall_exit_cont: andis. r10,r0,DBCR0_IC@h bnel- load_dbcr0 #endif -#ifdef CONFIG_44x - lis r4,icache_44x_need_flush@ha - lwz r5,icache_44x_need_flush@l(r4) - cmplwi cr0,r5,0 - bne- 2f -1: -#endif /* CONFIG_44x */ stwcx. r0,0,r1 /* to clear the reservation */ lwz r4,_LINK(r1) lwz r5,_CCR(r1) @@ -265,12 +258,6 @@ syscall_exit_cont: mtspr SPRN_SRR1,r8 SYNC RFI -#ifdef CONFIG_44x -2: li r7,0 - iccci r0,r0 - stw r7,icache_44x_need_flush@l(r4) - b 1b -#endif /* CONFIG_44x */ 66: li r3,-ENOSYS b ret_from_syscall @@ -692,16 +679,6 @@ resume_kernel: /* interrupts are hard-disabled at this point */ restore: -#ifdef CONFIG_44x - lis r4,icache_44x_need_flush@ha - lwz r5,icache_44x_need_flush@l(r4) - cmplwi cr0,r5,0 - beq+ 1f - li r6,0 - iccci r0,r0 - stw r6,icache_44x_need_flush@l(r4) -1: -#endif /* CONFIG_44x */ lwz r0,GPR0(r1) lwz r2,GPR2(r1) REST_4GPRS(3, r1) diff --git a/trunk/arch/ppc/kernel/misc.S b/trunk/arch/ppc/kernel/misc.S index e0c850d85c53..a22e1f4d94c8 100644 --- a/trunk/arch/ppc/kernel/misc.S +++ b/trunk/arch/ppc/kernel/misc.S @@ -224,16 +224,7 @@ _GLOBAL(_tlbia) */ _GLOBAL(_tlbie) #if defined(CONFIG_40x) - /* We run the search with interrupts disabled because we have to change - * the PID and I don't want to preempt when that happens. - */ - mfmsr r5 - mfspr r6,SPRN_PID - wrteei 0 - mtspr SPRN_PID,r4 tlbsx. r3, 0, r3 - mtspr SPRN_PID,r6 - wrtee r5 bne 10f sync /* There are only 64 TLB entries, so r3 < 64, which means bit 25 is clear. @@ -243,21 +234,22 @@ _GLOBAL(_tlbie) isync 10: #elif defined(CONFIG_44x) - mfspr r5,SPRN_MMUCR - rlwimi r5,r4,0,24,31 /* Set TID */ + mfspr r4,SPRN_MMUCR + mfspr r5,SPRN_PID /* Get PID */ + rlwimi r4,r5,0,24,31 /* Set TID */ /* We have to run the search with interrupts disabled, even critical * and debug interrupts (in fact the only critical exceptions we have * are debug and machine check). Otherwise an interrupt which causes * a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */ - mfmsr r4 + mfmsr r5 lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l - andc r6,r4,r6 + andc r6,r5,r6 mtmsr r6 - mtspr SPRN_MMUCR,r5 + mtspr SPRN_MMUCR,r4 tlbsx. r3, 0, r3 - mtmsr r4 + mtmsr r5 bne 10f sync /* There are only 64 TLB entries, so r3 < 64, @@ -499,21 +491,12 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE) addi r3,r3,L1_CACHE_BYTES bdnz 0b sync -#ifndef CONFIG_44x - /* We don't flush the icache on 44x. Those have a virtual icache - * and we don't have access to the virtual address here (it's - * not the page vaddr but where it's mapped in user space). The - * flushing of the icache on these is handled elsewhere, when - * a change in the address space occurs, before returning to - * user space - */ mtctr r4 1: icbi 0,r6 addi r6,r6,L1_CACHE_BYTES bdnz 1b sync isync -#endif /* CONFIG_44x */ blr /* diff --git a/trunk/arch/ppc/mm/44x_mmu.c b/trunk/arch/ppc/mm/44x_mmu.c index 6536a25cfcb8..0a0a0487b334 100644 --- a/trunk/arch/ppc/mm/44x_mmu.c +++ b/trunk/arch/ppc/mm/44x_mmu.c @@ -61,7 +61,6 @@ extern char etext[], _stext[]; */ unsigned int tlb_44x_index = 0; unsigned int tlb_44x_hwater = 62; -int icache_44x_need_flush; /* * "Pins" a 256MB TLB entry in AS0 for kernel lowmem diff --git a/trunk/arch/ppc/mm/4xx_mmu.c b/trunk/arch/ppc/mm/4xx_mmu.c index ea785dbaac7c..838e09db71d9 100644 --- a/trunk/arch/ppc/mm/4xx_mmu.c +++ b/trunk/arch/ppc/mm/4xx_mmu.c @@ -99,12 +99,13 @@ unsigned long __init mmu_mapin_ram(void) v = KERNELBASE; p = PPC_MEMSTART; - s = total_lowmem; + s = 0; - if (__map_without_ltlbs) - return 0; + if (__map_without_ltlbs) { + return s; + } - while (s >= LARGE_PAGE_SIZE_16M) { + while (s <= (total_lowmem - LARGE_PAGE_SIZE_16M)) { pmd_t *pmdp; unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; @@ -116,10 +117,10 @@ unsigned long __init mmu_mapin_ram(void) v += LARGE_PAGE_SIZE_16M; p += LARGE_PAGE_SIZE_16M; - s -= LARGE_PAGE_SIZE_16M; + s += LARGE_PAGE_SIZE_16M; } - while (s >= LARGE_PAGE_SIZE_4M) { + while (s <= (total_lowmem - LARGE_PAGE_SIZE_4M)) { pmd_t *pmdp; unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; @@ -128,8 +129,8 @@ unsigned long __init mmu_mapin_ram(void) v += LARGE_PAGE_SIZE_4M; p += LARGE_PAGE_SIZE_4M; - s -= LARGE_PAGE_SIZE_4M; + s += LARGE_PAGE_SIZE_4M; } - return total_lowmem - s; + return s; } diff --git a/trunk/arch/ppc/mm/fault.c b/trunk/arch/ppc/mm/fault.c index 36c0e7529edb..254c23b755e6 100644 --- a/trunk/arch/ppc/mm/fault.c +++ b/trunk/arch/ppc/mm/fault.c @@ -227,7 +227,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address, set_bit(PG_arch_1, &page->flags); } pte_update(ptep, 0, _PAGE_HWEXEC); - _tlbie(address, mm->context.id); + _tlbie(address); pte_unmap_unlock(ptep, ptl); up_read(&mm->mmap_sem); return 0; diff --git a/trunk/arch/ppc/mm/mmu_decl.h b/trunk/arch/ppc/mm/mmu_decl.h index f1d4f2109a99..540f3292b229 100644 --- a/trunk/arch/ppc/mm/mmu_decl.h +++ b/trunk/arch/ppc/mm/mmu_decl.h @@ -54,12 +54,12 @@ extern unsigned int num_tlbcam_entries; #define mmu_mapin_ram() (0UL) #elif defined(CONFIG_4xx) -#define flush_HPTE(pid, va, pg) _tlbie(va, pid) +#define flush_HPTE(X, va, pg) _tlbie(va) extern void MMU_init_hw(void); extern unsigned long mmu_mapin_ram(void); #elif defined(CONFIG_FSL_BOOKE) -#define flush_HPTE(pid, va, pg) _tlbie(va, pid) +#define flush_HPTE(X, va, pg) _tlbie(va) extern void MMU_init_hw(void); extern unsigned long mmu_mapin_ram(void); extern void adjust_total_lowmem(void); diff --git a/trunk/arch/ppc/platforms/4xx/ebony.c b/trunk/arch/ppc/platforms/4xx/ebony.c index 453643a0eeea..05d7184d7e14 100644 --- a/trunk/arch/ppc/platforms/4xx/ebony.c +++ b/trunk/arch/ppc/platforms/4xx/ebony.c @@ -236,7 +236,7 @@ ebony_early_serial_map(void) gen550_init(0, &port); /* Purge TLB entry added in head_44x.S for early serial access */ - _tlbie(UART0_IO_BASE, 0); + _tlbie(UART0_IO_BASE); #endif port.membase = ioremap64(PPC440GP_UART1_ADDR, 8); diff --git a/trunk/arch/ppc/platforms/4xx/luan.c b/trunk/arch/ppc/platforms/4xx/luan.c index b79ebb8a3e6c..4b169610f154 100644 --- a/trunk/arch/ppc/platforms/4xx/luan.c +++ b/trunk/arch/ppc/platforms/4xx/luan.c @@ -230,14 +230,9 @@ luan_setup_hoses(void) /* Allocate hoses for PCIX1 and PCIX2 */ hose1 = pcibios_alloc_controller(); - if (!hose1) - return; - hose2 = pcibios_alloc_controller(); - if (!hose2) { - pcibios_free_controller(hose1); + if (!hose1 || !hose2) return; - } /* Setup PCIX1 */ hose1->first_busno = 0; diff --git a/trunk/arch/ppc/platforms/4xx/ocotea.c b/trunk/arch/ppc/platforms/4xx/ocotea.c index 28a712cd4800..fd0f971881d6 100644 --- a/trunk/arch/ppc/platforms/4xx/ocotea.c +++ b/trunk/arch/ppc/platforms/4xx/ocotea.c @@ -259,7 +259,7 @@ ocotea_early_serial_map(void) gen550_init(0, &port); /* Purge TLB entry added in head_44x.S for early serial access */ - _tlbie(UART0_IO_BASE, 0); + _tlbie(UART0_IO_BASE); #endif port.membase = ioremap64(PPC440GX_UART1_ADDR, 8); diff --git a/trunk/arch/ppc/platforms/4xx/taishan.c b/trunk/arch/ppc/platforms/4xx/taishan.c index f6a0c6650f33..888c492b4a45 100644 --- a/trunk/arch/ppc/platforms/4xx/taishan.c +++ b/trunk/arch/ppc/platforms/4xx/taishan.c @@ -316,7 +316,7 @@ taishan_early_serial_map(void) gen550_init(0, &port); /* Purge TLB entry added in head_44x.S for early serial access */ - _tlbie(UART0_IO_BASE, 0); + _tlbie(UART0_IO_BASE); #endif port.membase = ioremap64(PPC440GX_UART1_ADDR, 8); diff --git a/trunk/arch/ppc/syslib/i8259.c b/trunk/arch/ppc/syslib/i8259.c index 559f27c6aefe..1e5a00a4b5f5 100644 --- a/trunk/arch/ppc/syslib/i8259.c +++ b/trunk/arch/ppc/syslib/i8259.c @@ -127,7 +127,6 @@ static void i8259_unmask_irq(unsigned int irq_nr) static struct irq_chip i8259_pic = { .typename = " i8259 ", .mask = i8259_mask_irq, - .disable = i8259_mask_irq, .unmask = i8259_unmask_irq, .mask_ack = i8259_mask_and_ack_irq, }; diff --git a/trunk/arch/ppc/syslib/m8260_setup.c b/trunk/arch/ppc/syslib/m8260_setup.c index 46588fa94381..15f0d7323535 100644 --- a/trunk/arch/ppc/syslib/m8260_setup.c +++ b/trunk/arch/ppc/syslib/m8260_setup.c @@ -25,7 +25,6 @@ #include #include #include -#include #include "cpm2_pic.h" @@ -62,7 +61,7 @@ m8260_setup_arch(void) #endif identify_ppc_sys_by_name_and_id(BOARD_CHIP_NAME, - in_be32((void *)CPM_MAP_ADDR + CPM_IMMR_OFFSET)); + in_be32(CPM_MAP_ADDR + CPM_IMMR_OFFSET)); m82xx_board_setup(); } @@ -148,12 +147,12 @@ m8260_show_cpuinfo(struct seq_file *m) seq_printf(m, "vendor\t\t: %s\n" "machine\t\t: %s\n" "\n" - "mem size\t\t: 0x%08lx\n" - "console baud\t\t: %ld\n" + "mem size\t\t: 0x%08x\n" + "console baud\t\t: %d\n" "\n" - "core clock\t: %lu MHz\n" - "CPM clock\t: %lu MHz\n" - "bus clock\t: %lu MHz\n", + "core clock\t: %u MHz\n" + "CPM clock\t: %u MHz\n" + "bus clock\t: %u MHz\n", CPUINFO_VENDOR, CPUINFO_MACHINE, bp->bi_memsize, bp->bi_baudrate, bp->bi_intfreq / 1000000, bp->bi_cpmfreq / 1000000, bp->bi_busfreq / 1000000); diff --git a/trunk/arch/s390/kernel/early.c b/trunk/arch/s390/kernel/early.c index 8bf4ae1150be..e6289ee74ecd 100644 --- a/trunk/arch/s390/kernel/early.c +++ b/trunk/arch/s390/kernel/early.c @@ -200,13 +200,11 @@ static noinline __init void find_memory_chunks(unsigned long memsize) cc = __tprot(addr); while (cc == old_cc) { addr += CHUNK_INCR; - if (addr >= memsize) - break; + cc = __tprot(addr); #ifndef CONFIG_64BIT if (addr == ADDR2G) break; #endif - cc = __tprot(addr); } if (old_addr != addr && diff --git a/trunk/arch/s390/kernel/process.c b/trunk/arch/s390/kernel/process.c index 29f7884b4ffa..96492cf2d491 100644 --- a/trunk/arch/s390/kernel/process.c +++ b/trunk/arch/s390/kernel/process.c @@ -92,7 +92,6 @@ EXPORT_SYMBOL(unregister_idle_notifier); void do_monitor_call(struct pt_regs *regs, long interruption_code) { -#ifdef CONFIG_SMP struct s390_idle_data *idle; idle = &__get_cpu_var(s390_idle); @@ -100,7 +99,7 @@ void do_monitor_call(struct pt_regs *regs, long interruption_code) idle->idle_time += get_clock() - idle->idle_enter; idle->in_idle = 0; spin_unlock(&idle->lock); -#endif + /* disable monitor call class 0 */ __ctl_clear_bit(8, 15); @@ -115,9 +114,7 @@ extern void s390_handle_mcck(void); static void default_idle(void) { int cpu, rc; -#ifdef CONFIG_SMP struct s390_idle_data *idle; -#endif /* CPU is going idle. */ cpu = smp_processor_id(); @@ -154,14 +151,13 @@ static void default_idle(void) s390_handle_mcck(); return; } -#ifdef CONFIG_SMP + idle = &__get_cpu_var(s390_idle); spin_lock(&idle->lock); idle->idle_count++; idle->in_idle = 1; idle->idle_enter = get_clock(); spin_unlock(&idle->lock); -#endif trace_hardirqs_on(); /* Wait for external, I/O or machine check interrupt. */ __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | diff --git a/trunk/arch/s390/kernel/smp.c b/trunk/arch/s390/kernel/smp.c index b05ae8584258..1d97fe1c0e53 100644 --- a/trunk/arch/s390/kernel/smp.c +++ b/trunk/arch/s390/kernel/smp.c @@ -788,14 +788,14 @@ static ssize_t show_idle_time(struct sys_device *dev, char *buf) } new_time = idle->idle_time; spin_unlock_irq(&idle->lock); - return sprintf(buf, "%llu\n", new_time >> 12); + return sprintf(buf, "%llu us\n", new_time >> 12); } -static SYSDEV_ATTR(idle_time_us, 0444, show_idle_time, NULL); +static SYSDEV_ATTR(idle_time, 0444, show_idle_time, NULL); static struct attribute *cpu_attrs[] = { &attr_capability.attr, &attr_idle_count.attr, - &attr_idle_time_us.attr, + &attr_idle_time.attr, NULL, }; diff --git a/trunk/arch/s390/kernel/time.c b/trunk/arch/s390/kernel/time.c index a963fe81359e..48dae49bc1ec 100644 --- a/trunk/arch/s390/kernel/time.c +++ b/trunk/arch/s390/kernel/time.c @@ -307,7 +307,7 @@ static cycle_t read_tod_clock(void) static struct clocksource clocksource_tod = { .name = "tod", - .rating = 400, + .rating = 100, .read = read_tod_clock, .mask = -1ULL, .mult = 1000, diff --git a/trunk/arch/sparc/kernel/irq.c b/trunk/arch/sparc/kernel/irq.c index 01a6756ba371..e1e24f31aa54 100644 --- a/trunk/arch/sparc/kernel/irq.c +++ b/trunk/arch/sparc/kernel/irq.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/sparc64/kernel/ds.c b/trunk/arch/sparc64/kernel/ds.c index eeb5a2fc788d..9f472a79d37e 100644 --- a/trunk/arch/sparc64/kernel/ds.c +++ b/trunk/arch/sparc64/kernel/ds.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/sparc64/kernel/module.c b/trunk/arch/sparc64/kernel/module.c index 158484bf5999..579871527699 100644 --- a/trunk/arch/sparc64/kernel/module.c +++ b/trunk/arch/sparc64/kernel/module.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/sparc64/kernel/sys_sparc32.c b/trunk/arch/sparc64/kernel/sys_sparc32.c index 98c468803ce3..78caff926737 100644 --- a/trunk/arch/sparc64/kernel/sys_sparc32.c +++ b/trunk/arch/sparc64/kernel/sys_sparc32.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/sparc64/kernel/sys_sunos32.c b/trunk/arch/sparc64/kernel/sys_sunos32.c index cfc22d3fe54c..170d6ca8de6f 100644 --- a/trunk/arch/sparc64/kernel/sys_sunos32.c +++ b/trunk/arch/sparc64/kernel/sys_sunos32.c @@ -57,6 +57,7 @@ #include /* For SOCKET_I */ +#include #include #include diff --git a/trunk/arch/sparc64/kernel/time.c b/trunk/arch/sparc64/kernel/time.c index 4352ee4d8dac..a2cf955294c1 100644 --- a/trunk/arch/sparc64/kernel/time.c +++ b/trunk/arch/sparc64/kernel/time.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,7 @@ #include #include #include +#include #include DEFINE_SPINLOCK(mostek_lock); diff --git a/trunk/arch/um/Makefile b/trunk/arch/um/Makefile index 768a5d14b755..82c2ac48040d 100644 --- a/trunk/arch/um/Makefile +++ b/trunk/arch/um/Makefile @@ -70,12 +70,9 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) # in KBUILD_CFLAGS. Otherwise, it would cause ld to complain about the two different # errnos. # These apply to kernelspace only. -# -# strip leading and trailing whitespace to make the USER_CFLAGS removal of these -# defines more robust -KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ - -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES)) +KERNEL_DEFINES = -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \ + -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES) KBUILD_CFLAGS += $(KERNEL_DEFINES) KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,) diff --git a/trunk/arch/um/Makefile-i386 b/trunk/arch/um/Makefile-i386 index 67290117d909..b01dfb00e5f8 100644 --- a/trunk/arch/um/Makefile-i386 +++ b/trunk/arch/um/Makefile-i386 @@ -22,8 +22,8 @@ export LDFLAGS HOSTCFLAGS HOSTLDFLAGS UML_OBJCOPYFLAGS endif endif -KBUILD_CFLAGS += -DCONFIG_X86_32 -KBUILD_AFLAGS += -DCONFIG_X86_32 +CFLAGS += -DCONFIG_X86_32 +AFLAGS += -DCONFIG_X86_32 CONFIG_X86_32 := y export CONFIG_X86_32 diff --git a/trunk/arch/um/drivers/ubd_kern.c b/trunk/arch/um/drivers/ubd_kern.c index 7e6cdde62ead..e184b44b1011 100644 --- a/trunk/arch/um/drivers/ubd_kern.c +++ b/trunk/arch/um/drivers/ubd_kern.c @@ -705,7 +705,7 @@ static int ubd_add(int n, char **error_out) ubd_dev->size = ROUND_BLOCK(ubd_dev->size); INIT_LIST_HEAD(&ubd_dev->restart); - sg_init_table(ubd_dev->sg, MAX_SG); + sg_init_table(&ubd_dev->sg, MAX_SG); err = -ENOMEM; ubd_dev->queue = blk_init_queue(do_ubd_request, &ubd_dev->lock); diff --git a/trunk/arch/x86/boot/pmjump.S b/trunk/arch/x86/boot/pmjump.S index fa6bed1fac14..2e559233725a 100644 --- a/trunk/arch/x86/boot/pmjump.S +++ b/trunk/arch/x86/boot/pmjump.S @@ -28,19 +28,17 @@ * void protected_mode_jump(u32 entrypoint, u32 bootparams); */ protected_mode_jump: + xorl %ebx, %ebx # Flag to indicate this is a boot movl %edx, %esi # Pointer to boot_params table movl %eax, 2f # Patch ljmpl instruction + jmp 1f # Short jump to flush instruction q. +1: movw $__BOOT_DS, %cx - xorl %ebx, %ebx # Per the 32-bit boot protocol - xorl %ebp, %ebp # Per the 32-bit boot protocol - xorl %edi, %edi # Per the 32-bit boot protocol movl %cr0, %edx orb $1, %dl # Protected mode (PE) bit movl %edx, %cr0 - jmp 1f # Short jump to serialize on 386/486 -1: movw %cx, %ds movw %cx, %es diff --git a/trunk/arch/x86/lguest/boot.c b/trunk/arch/x86/lguest/boot.c index 92c56117eae5..a55b0902f9d3 100644 --- a/trunk/arch/x86/lguest/boot.c +++ b/trunk/arch/x86/lguest/boot.c @@ -93,7 +93,38 @@ struct lguest_data lguest_data = { }; static cycle_t clock_base; -/*G:037 async_hcall() is pretty simple: I'm quite proud of it really. We have a +/*G:035 Notice the lazy_hcall() above, rather than hcall(). This is our first + * real optimization trick! + * + * When lazy_mode is set, it means we're allowed to defer all hypercalls and do + * them as a batch when lazy_mode is eventually turned off. Because hypercalls + * are reasonably expensive, batching them up makes sense. For example, a + * large munmap might update dozens of page table entries: that code calls + * paravirt_enter_lazy_mmu(), does the dozen updates, then calls + * lguest_leave_lazy_mode(). + * + * So, when we're in lazy mode, we call async_hypercall() to store the call for + * future processing. When lazy mode is turned off we issue a hypercall to + * flush the stored calls. + */ +static void lguest_leave_lazy_mode(void) +{ + paravirt_leave_lazy(paravirt_get_lazy_mode()); + hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); +} + +static void lazy_hcall(unsigned long call, + unsigned long arg1, + unsigned long arg2, + unsigned long arg3) +{ + if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) + hcall(call, arg1, arg2, arg3); + else + async_hcall(call, arg1, arg2, arg3); +} + +/* async_hcall() is pretty simple: I'm quite proud of it really. We have a * ring buffer of stored hypercalls which the Host will run though next time we * do a normal hypercall. Each entry in the ring has 4 slots for the hypercall * arguments, and a "hcall_status" word which is 0 if the call is ready to go, @@ -103,8 +134,8 @@ static cycle_t clock_base; * full and we just make the hypercall directly. This has the nice side * effect of causing the Host to run all the stored calls in the ring buffer * which empties it for next time! */ -static void async_hcall(unsigned long call, unsigned long arg1, - unsigned long arg2, unsigned long arg3) +void async_hcall(unsigned long call, + unsigned long arg1, unsigned long arg2, unsigned long arg3) { /* Note: This code assumes we're uniprocessor. */ static unsigned int next_call; @@ -130,37 +161,7 @@ static void async_hcall(unsigned long call, unsigned long arg1, } local_irq_restore(flags); } - -/*G:035 Notice the lazy_hcall() above, rather than hcall(). This is our first - * real optimization trick! - * - * When lazy_mode is set, it means we're allowed to defer all hypercalls and do - * them as a batch when lazy_mode is eventually turned off. Because hypercalls - * are reasonably expensive, batching them up makes sense. For example, a - * large munmap might update dozens of page table entries: that code calls - * paravirt_enter_lazy_mmu(), does the dozen updates, then calls - * lguest_leave_lazy_mode(). - * - * So, when we're in lazy mode, we call async_hcall() to store the call for - * future processing. */ -static void lazy_hcall(unsigned long call, - unsigned long arg1, - unsigned long arg2, - unsigned long arg3) -{ - if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) - hcall(call, arg1, arg2, arg3); - else - async_hcall(call, arg1, arg2, arg3); -} - -/* When lazy mode is turned off reset the per-cpu lazy mode variable and then - * issue a hypercall to flush any stored calls. */ -static void lguest_leave_lazy_mode(void) -{ - paravirt_leave_lazy(paravirt_get_lazy_mode()); - hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); -} +/*:*/ /*G:033 * After that diversion we return to our first native-instruction diff --git a/trunk/block/cfq-iosched.c b/trunk/block/cfq-iosched.c index 0b4a47905575..e47a9309eb48 100644 --- a/trunk/block/cfq-iosched.c +++ b/trunk/block/cfq-iosched.c @@ -789,20 +789,6 @@ static inline void cfq_slice_expired(struct cfq_data *cfqd, int timed_out) __cfq_slice_expired(cfqd, cfqq, timed_out); } -static int start_idle_class_timer(struct cfq_data *cfqd) -{ - unsigned long end = cfqd->last_end_request + CFQ_IDLE_GRACE; - unsigned long now = jiffies; - - if (time_before(now, end) && - time_after_eq(now, cfqd->last_end_request)) { - mod_timer(&cfqd->idle_class_timer, end); - return 1; - } - - return 0; -} - /* * Get next queue for service. Unless we have a queue preemption, * we'll simply select the first cfqq in the service tree. @@ -819,14 +805,19 @@ static struct cfq_queue *cfq_get_next_queue(struct cfq_data *cfqd) cfqq = rb_entry(n, struct cfq_queue, rb_node); if (cfq_class_idle(cfqq)) { + unsigned long end; + /* * if we have idle queues and no rt or be queues had * pending requests, either allow immediate service if * the grace period has passed or arm the idle grace * timer */ - if (start_idle_class_timer(cfqd)) + end = cfqd->last_end_request + CFQ_IDLE_GRACE; + if (time_before(jiffies, end)) { + mod_timer(&cfqd->idle_class_timer, end); cfqq = NULL; + } } return cfqq; @@ -2045,14 +2036,17 @@ static void cfq_idle_slice_timer(unsigned long data) static void cfq_idle_class_timer(unsigned long data) { struct cfq_data *cfqd = (struct cfq_data *) data; - unsigned long flags; + unsigned long flags, end; spin_lock_irqsave(cfqd->queue->queue_lock, flags); /* * race with a non-idle queue, reset timer */ - if (!start_idle_class_timer(cfqd)) + end = cfqd->last_end_request + CFQ_IDLE_GRACE; + if (!time_after_eq(jiffies, end)) + mod_timer(&cfqd->idle_class_timer, end); + else cfq_schedule_dispatch(cfqd); spin_unlock_irqrestore(cfqd->queue->queue_lock, flags); @@ -2074,10 +2068,9 @@ static void cfq_put_async_queues(struct cfq_data *cfqd) cfq_put_queue(cfqd->async_cfqq[0][i]); if (cfqd->async_cfqq[1][i]) cfq_put_queue(cfqd->async_cfqq[1][i]); + if (cfqd->async_idle_cfqq) + cfq_put_queue(cfqd->async_idle_cfqq); } - - if (cfqd->async_idle_cfqq) - cfq_put_queue(cfqd->async_idle_cfqq); } static void cfq_exit_queue(elevator_t *e) @@ -2132,7 +2125,6 @@ static void *cfq_init_queue(struct request_queue *q) INIT_WORK(&cfqd->unplug_work, cfq_kick_queue); - cfqd->last_end_request = jiffies; cfqd->cfq_quantum = cfq_quantum; cfqd->cfq_fifo_expire[0] = cfq_fifo_expire[0]; cfqd->cfq_fifo_expire[1] = cfq_fifo_expire[1]; diff --git a/trunk/block/ll_rw_blk.c b/trunk/block/ll_rw_blk.c index 3b927be03850..75c98d58f4dd 100644 --- a/trunk/block/ll_rw_blk.c +++ b/trunk/block/ll_rw_blk.c @@ -1143,9 +1143,22 @@ EXPORT_SYMBOL(blk_queue_start_tag); void blk_queue_invalidate_tags(struct request_queue *q) { struct list_head *tmp, *n; + struct request *rq; + + list_for_each_safe(tmp, n, &q->tag_busy_list) { + rq = list_entry_rq(tmp); - list_for_each_safe(tmp, n, &q->tag_busy_list) - blk_requeue_request(q, list_entry_rq(tmp)); + if (rq->tag == -1) { + printk(KERN_ERR + "%s: bad tag found on list\n", __FUNCTION__); + list_del_init(&rq->queuelist); + rq->cmd_flags &= ~REQ_QUEUED; + } else + blk_queue_end_tag(q, rq); + + rq->cmd_flags &= ~REQ_STARTED; + __elv_add_request(q, rq, ELEVATOR_INSERT_BACK, 0); + } } EXPORT_SYMBOL(blk_queue_invalidate_tags); @@ -1621,7 +1634,15 @@ static void blk_backing_dev_unplug(struct backing_dev_info *bdi, { struct request_queue *q = bdi->unplug_io_data; - blk_unplug(q); + /* + * devices don't necessarily have an ->unplug_fn defined + */ + if (q->unplug_fn) { + blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_IO, NULL, + q->rq.count[READ] + q->rq.count[WRITE]); + + q->unplug_fn(q); + } } static void blk_unplug_work(struct work_struct *work) @@ -1645,20 +1666,6 @@ static void blk_unplug_timeout(unsigned long data) kblockd_schedule_work(&q->unplug_work); } -void blk_unplug(struct request_queue *q) -{ - /* - * devices don't necessarily have an ->unplug_fn defined - */ - if (q->unplug_fn) { - blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_IO, NULL, - q->rq.count[READ] + q->rq.count[WRITE]); - - q->unplug_fn(q); - } -} -EXPORT_SYMBOL(blk_unplug); - /** * blk_start_queue - restart a previously stopped queue * @q: The &struct request_queue in question diff --git a/trunk/drivers/ata/ata_piix.c b/trunk/drivers/ata/ata_piix.c index f08cca21702c..a4b2cb29f46c 100644 --- a/trunk/drivers/ata/ata_piix.c +++ b/trunk/drivers/ata/ata_piix.c @@ -621,7 +621,6 @@ struct ich_laptop { static const struct ich_laptop ich_laptop[] = { /* devid, subvendor, subdev */ { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ - { 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */ { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */ diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index ec3ce120a517..164c7d9514f9 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -676,11 +676,10 @@ static int ata_dev_set_dipm(struct ata_device *dev, enum link_pm policy) if (rc) return rc; - /* - * we don't have to disable DIPM since IPM flags - * disallow transitions to SLUMBER, which effectively - * disable DIPM if it does not support PARTIAL - */ + /* disable DIPM */ + if (ata_dev_enabled(dev) && (dev->flags & ATA_DFLAG_DIPM)) + err_mask = ata_dev_set_feature(dev, + SETFEATURES_SATA_DISABLE, SATA_DIPM); break; case NOT_AVAILABLE: case MAX_PERFORMANCE: @@ -690,11 +689,10 @@ static int ata_dev_set_dipm(struct ata_device *dev, enum link_pm policy) if (rc) return rc; - /* - * we don't have to disable DIPM since IPM flags - * disallow all transitions which effectively - * disable DIPM anyway. - */ + /* disable DIPM */ + if (ata_dev_enabled(dev) && (dev->flags & ATA_DFLAG_DIPM)) + err_mask = ata_dev_set_feature(dev, + SETFEATURES_SATA_DISABLE, SATA_DIPM); break; } @@ -4241,10 +4239,6 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "ST340823A", NULL, ATA_HORKAGE_HPA_SIZE, }, { "ST320413A", NULL, ATA_HORKAGE_HPA_SIZE, }, - /* Devices which get the IVB wrong */ - { "QUANTUM FIREBALLlct10 05", "A03.0900", ATA_HORKAGE_IVB, }, - { "TSSTcorp CDDVDW SH-S202J", "SB00", ATA_HORKAGE_IVB, }, - /* End Marker */ { } }; @@ -4305,21 +4299,6 @@ static int ata_dma_blacklisted(const struct ata_device *dev) return (dev->horkage & ATA_HORKAGE_NODMA) ? 1 : 0; } -/** - * ata_is_40wire - check drive side detection - * @dev: device - * - * Perform drive side detection decoding, allowing for device vendors - * who can't follow the documentation. - */ - -static int ata_is_40wire(struct ata_device *dev) -{ - if (dev->horkage & ATA_HORKAGE_IVB) - return ata_drive_40wire_relaxed(dev->id); - return ata_drive_40wire(dev->id); -} - /** * ata_dev_xfermask - Compute supported xfermask of the given device * @dev: Device to compute xfermask for @@ -4389,7 +4368,7 @@ static void ata_dev_xfermask(struct ata_device *dev) if (xfer_mask & (0xF8 << ATA_SHIFT_UDMA)) /* UDMA/44 or higher would be available */ if ((ap->cbl == ATA_CBL_PATA40) || - (ata_is_40wire(dev) && + (ata_drive_40wire(dev->id) && (ap->cbl == ATA_CBL_PATA_UNK || ap->cbl == ATA_CBL_PATA80))) { ata_dev_printk(dev, KERN_WARNING, diff --git a/trunk/drivers/ata/pata_hpt37x.c b/trunk/drivers/ata/pata_hpt37x.c index 3816b8605e0d..e61cb1fd57b2 100644 --- a/trunk/drivers/ata/pata_hpt37x.c +++ b/trunk/drivers/ata/pata_hpt37x.c @@ -295,7 +295,7 @@ static unsigned long hpt370_filter(struct ata_device *adev, unsigned long mask) static unsigned long hpt370a_filter(struct ata_device *adev, unsigned long mask) { - if (adev->class == ATA_DEV_ATA) { + if (adev->class != ATA_DEV_ATA) { if (hpt_dma_blacklisted(adev, "UDMA100", bad_ata100_5)) mask &= ~ (0x1F << ATA_SHIFT_UDMA); } @@ -359,25 +359,28 @@ static int hpt374_pre_reset(struct ata_link *link, unsigned long deadline) { 0x50, 1, 0x04, 0x04 }, { 0x54, 1, 0x04, 0x04 } }; - u16 mcr3; + u16 mcr3, mcr6; u8 ata66; struct ata_port *ap = link->ap; struct pci_dev *pdev = to_pci_dev(ap->host->dev); - unsigned int mcrbase = 0x50 + 4 * ap->port_no; if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no])) return -ENOENT; /* Do the extra channel work */ - pci_read_config_word(pdev, mcrbase + 2, &mcr3); + pci_read_config_word(pdev, 0x52, &mcr3); + pci_read_config_word(pdev, 0x56, &mcr6); /* Set bit 15 of 0x52 to enable TCBLID as input + Set bit 15 of 0x56 to enable FCBLID as input */ - pci_write_config_word(pdev, mcrbase + 2, mcr3 | 0x8000); + pci_write_config_word(pdev, 0x52, mcr3 | 0x8000); + pci_write_config_word(pdev, 0x56, mcr6 | 0x8000); pci_read_config_byte(pdev, 0x5A, &ata66); /* Reset TCBLID/FCBLID to output */ pci_write_config_word(pdev, 0x52, mcr3); + pci_write_config_word(pdev, 0x56, mcr6); - if (ata66 & (2 >> ap->port_no)) + if (ata66 & (1 << ap->port_no)) ap->cbl = ATA_CBL_PATA40; else ap->cbl = ATA_CBL_PATA80; @@ -841,25 +844,6 @@ static int hpt37x_calibrate_dpll(struct pci_dev *dev) /* Never went stable */ return 0; } - -static u32 hpt374_read_freq(struct pci_dev *pdev) -{ - u32 freq; - unsigned long io_base = pci_resource_start(pdev, 4); - if (PCI_FUNC(pdev->devfn) & 1) { - struct pci_dev *pdev_0 = pci_get_slot(pdev->bus, pdev->devfn - 1); - /* Someone hot plugged the controller on us ? */ - if (pdev_0 == NULL) - return 0; - io_base = pci_resource_start(pdev_0, 4); - freq = inl(io_base + 0x90); - pci_dev_put(pdev_0); - } - else - freq = inl(io_base + 0x90); - return freq; -} - /** * hpt37x_init_one - Initialise an HPT37X/302 * @dev: PCI device @@ -918,7 +902,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, .mwdma_mask = 0x07, - .udma_mask = ATA_UDMA5, + .udma_mask = 0x0f, .port_ops = &hpt370_port_ops }; /* HPT370A - UDMA100 */ @@ -927,7 +911,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) .flags = ATA_FLAG_SLAVE_POSS, .pio_mask = 0x1f, .mwdma_mask = 0x07, - .udma_mask = ATA_UDMA5, + .udma_mask = 0x0f, .port_ops = &hpt370a_port_ops }; /* HPT371, 372 and friends - UDMA133 */ @@ -1063,16 +1047,9 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) outb(0x0e, iobase + 0x9c); /* Some devices do not let this value be accessed via PCI space - according to the old driver. In addition we must use the value - from FN 0 on the HPT374 */ - - if (chip_table == &hpt374) { - freq = hpt374_read_freq(dev); - if (freq == 0) - return -ENODEV; - } else - freq = inl(iobase + 0x90); + according to the old driver */ + freq = inl(iobase + 0x90); if ((freq >> 12) != 0xABCDE) { int i; u8 sr; diff --git a/trunk/drivers/ata/pata_serverworks.c b/trunk/drivers/ata/pata_serverworks.c index 8bed88873720..df68806df4be 100644 --- a/trunk/drivers/ata/pata_serverworks.c +++ b/trunk/drivers/ata/pata_serverworks.c @@ -274,27 +274,28 @@ static void serverworks_set_dmamode(struct ata_port *ap, struct ata_device *adev { static const u8 dma_mode[] = { 0x77, 0x21, 0x20 }; int offset = 1 + 2 * ap->port_no - adev->devno; - int devbits = 2 * ap->port_no + adev->devno; + int devbits = (2 * ap->port_no + adev->devno); u8 ultra; u8 ultra_cfg; struct pci_dev *pdev = to_pci_dev(ap->host->dev); pci_read_config_byte(pdev, 0x54, &ultra_cfg); - pci_read_config_byte(pdev, 0x56 + ap->port_no, &ultra); - ultra &= ~(0x0F << (adev->devno * 4)); if (adev->dma_mode >= XFER_UDMA_0) { pci_write_config_byte(pdev, 0x44 + offset, 0x20); + pci_read_config_byte(pdev, 0x56 + ap->port_no, &ultra); + ultra &= ~(0x0F << (ap->port_no * 4)); ultra |= (adev->dma_mode - XFER_UDMA_0) - << (adev->devno * 4); + << (ap->port_no * 4); + pci_write_config_byte(pdev, 0x56 + ap->port_no, ultra); + ultra_cfg |= (1 << devbits); } else { pci_write_config_byte(pdev, 0x44 + offset, dma_mode[adev->dma_mode - XFER_MW_DMA_0]); ultra_cfg &= ~(1 << devbits); } - pci_write_config_byte(pdev, 0x56 + ap->port_no, ultra); pci_write_config_byte(pdev, 0x54, ultra_cfg); } diff --git a/trunk/drivers/block/paride/pt.c b/trunk/drivers/block/paride/pt.c index b91accf12656..9f4e67ee1eb0 100644 --- a/trunk/drivers/block/paride/pt.c +++ b/trunk/drivers/block/paride/pt.c @@ -664,7 +664,7 @@ static int pt_open(struct inode *inode, struct file *file) goto out; err = -EROFS; - if ((!(tape->flags & PT_WRITE_OK)) && (file->f_mode & 2)) + if ((!tape->flags & PT_WRITE_OK) && (file->f_mode & 2)) goto out; if (!(iminor(inode) & 128)) diff --git a/trunk/drivers/block/pktcdvd.c b/trunk/drivers/block/pktcdvd.c index a5ee21319d37..a8130a4ad6d4 100644 --- a/trunk/drivers/block/pktcdvd.c +++ b/trunk/drivers/block/pktcdvd.c @@ -358,19 +358,10 @@ static ssize_t class_pktcdvd_store_add(struct class *c, const char *buf, size_t count) { unsigned int major, minor; - if (sscanf(buf, "%u:%u", &major, &minor) == 2) { - /* pkt_setup_dev() expects caller to hold reference to self */ - if (!try_module_get(THIS_MODULE)) - return -ENODEV; - pkt_setup_dev(MKDEV(major, minor), NULL); - - module_put(THIS_MODULE); - return count; } - return -EINVAL; } diff --git a/trunk/drivers/char/drm/drmP.h b/trunk/drivers/char/drm/drmP.h index dde02a15fa59..9dd0760dd87a 100644 --- a/trunk/drivers/char/drm/drmP.h +++ b/trunk/drivers/char/drm/drmP.h @@ -559,6 +559,8 @@ struct drm_mm { * a family of cards. There will one drm_device for each card present * in this family */ +struct drm_device; + struct drm_driver { int (*load) (struct drm_device *, unsigned long flags); int (*firstopen) (struct drm_device *); diff --git a/trunk/drivers/char/drm/drm_ioctl.c b/trunk/drivers/char/drm/drm_ioctl.c index 3cbebf868e68..d9be14624526 100644 --- a/trunk/drivers/char/drm/drm_ioctl.c +++ b/trunk/drivers/char/drm/drm_ioctl.c @@ -272,7 +272,7 @@ int drm_getstats(struct drm_device *dev, void *data, struct drm_stats *stats = data; int i; - memset(stats, 0, sizeof(*stats)); + memset(stats, 0, sizeof(stats)); mutex_lock(&dev->struct_mutex); diff --git a/trunk/drivers/char/drm/drm_os_linux.h b/trunk/drivers/char/drm/drm_os_linux.h index daa69c9d8977..76e44ac94fb5 100644 --- a/trunk/drivers/char/drm/drm_os_linux.h +++ b/trunk/drivers/char/drm/drm_os_linux.h @@ -62,6 +62,14 @@ static __inline__ int mtrr_del(int reg, unsigned long base, unsigned long size) #endif +/** For data going into the kernel through the ioctl argument */ +#define DRM_COPY_FROM_USER_IOCTL(arg1, arg2, arg3) \ + if ( copy_from_user(&arg1, arg2, arg3) ) \ + return -EFAULT +/** For data going from the kernel through the ioctl argument */ +#define DRM_COPY_TO_USER_IOCTL(arg1, arg2, arg3) \ + if ( copy_to_user(arg1, &arg2, arg3) ) \ + return -EFAULT /** Other copying of data to kernel space */ #define DRM_COPY_FROM_USER(arg1, arg2, arg3) \ copy_from_user(arg1, arg2, arg3) diff --git a/trunk/drivers/char/drm/savage_bci.c b/trunk/drivers/char/drm/savage_bci.c index d465b2f9c1cd..59484d56b333 100644 --- a/trunk/drivers/char/drm/savage_bci.c +++ b/trunk/drivers/char/drm/savage_bci.c @@ -968,6 +968,9 @@ static int savage_bci_event_wait(struct drm_device *dev, void *data, struct drm_ DRM_DEBUG("\n"); + DRM_COPY_FROM_USER_IOCTL(event, (drm_savage_event_wait_t __user *) data, + sizeof(event)); + UPDATE_EVENT_COUNTER(); if (dev_priv->status_ptr) hw_e = dev_priv->status_ptr[1] & 0xffff; diff --git a/trunk/drivers/char/tty_ioctl.c b/trunk/drivers/char/tty_ioctl.c index 1bdd2bf4f37d..7a003504c265 100644 --- a/trunk/drivers/char/tty_ioctl.c +++ b/trunk/drivers/char/tty_ioctl.c @@ -730,23 +730,13 @@ static int send_prio_char(struct tty_struct *tty, char ch) return 0; } -/** - * tty_mode_ioctl - mode related ioctls - * @tty: tty for the ioctl - * @file: file pointer for the tty - * @cmd: command - * @arg: ioctl argument - * - * Perform non line discipline specific mode control ioctls. This - * is designed to be called by line disciplines to ensure they provide - * consistent mode setting. - */ - -int tty_mode_ioctl(struct tty_struct * tty, struct file *file, - unsigned int cmd, unsigned long arg) +int n_tty_ioctl(struct tty_struct * tty, struct file * file, + unsigned int cmd, unsigned long arg) { struct tty_struct * real_tty; void __user *p = (void __user *)arg; + int retval; + struct tty_ldisc *ld; if (tty->driver->type == TTY_DRIVER_TYPE_PTY && tty->driver->subtype == PTY_TYPE_MASTER) @@ -809,93 +799,6 @@ int tty_mode_ioctl(struct tty_struct * tty, struct file *file, return set_termios(real_tty, p, TERMIOS_WAIT | TERMIOS_TERMIO); case TCSETA: return set_termios(real_tty, p, TERMIOS_TERMIO); -#ifndef TCGETS2 - case TIOCGLCKTRMIOS: - if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked)) - return -EFAULT; - return 0; - - case TIOCSLCKTRMIOS: - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - if (user_termios_to_kernel_termios(real_tty->termios_locked, (struct termios __user *) arg)) - return -EFAULT; - return 0; -#else - case TIOCGLCKTRMIOS: - if (kernel_termios_to_user_termios_1((struct termios __user *)arg, real_tty->termios_locked)) - return -EFAULT; - return 0; - - case TIOCSLCKTRMIOS: - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - if (user_termios_to_kernel_termios_1(real_tty->termios_locked, (struct termios __user *) arg)) - return -EFAULT; - return 0; -#endif - case TIOCGSOFTCAR: - return put_user(C_CLOCAL(tty) ? 1 : 0, (int __user *)arg); - case TIOCSSOFTCAR: - if (get_user(arg, (unsigned int __user *) arg)) - return -EFAULT; - mutex_lock(&tty->termios_mutex); - tty->termios->c_cflag = - ((tty->termios->c_cflag & ~CLOCAL) | - (arg ? CLOCAL : 0)); - mutex_unlock(&tty->termios_mutex); - return 0; - default: - return -ENOIOCTLCMD; - } -} - -EXPORT_SYMBOL_GPL(tty_mode_ioctl); - -int tty_perform_flush(struct tty_struct *tty, unsigned long arg) -{ - struct tty_ldisc *ld; - int retval = tty_check_change(tty); - if (retval) - return retval; - - ld = tty_ldisc_ref(tty); - switch (arg) { - case TCIFLUSH: - if (ld && ld->flush_buffer) - ld->flush_buffer(tty); - break; - case TCIOFLUSH: - if (ld && ld->flush_buffer) - ld->flush_buffer(tty); - /* fall through */ - case TCOFLUSH: - if (tty->driver->flush_buffer) - tty->driver->flush_buffer(tty); - break; - default: - tty_ldisc_deref(ld); - return -EINVAL; - } - tty_ldisc_deref(ld); - return 0; -} - -EXPORT_SYMBOL_GPL(tty_perform_flush); - -int n_tty_ioctl(struct tty_struct * tty, struct file * file, - unsigned int cmd, unsigned long arg) -{ - struct tty_struct * real_tty; - int retval; - - if (tty->driver->type == TTY_DRIVER_TYPE_PTY && - tty->driver->subtype == PTY_TYPE_MASTER) - real_tty = tty->link; - else - real_tty = tty; - - switch (cmd) { case TCXONC: retval = tty_check_change(tty); if (retval) @@ -926,7 +829,30 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file, } return 0; case TCFLSH: - return tty_perform_flush(tty, arg); + retval = tty_check_change(tty); + if (retval) + return retval; + + ld = tty_ldisc_ref(tty); + switch (arg) { + case TCIFLUSH: + if (ld && ld->flush_buffer) + ld->flush_buffer(tty); + break; + case TCIOFLUSH: + if (ld && ld->flush_buffer) + ld->flush_buffer(tty); + /* fall through */ + case TCOFLUSH: + if (tty->driver->flush_buffer) + tty->driver->flush_buffer(tty); + break; + default: + tty_ldisc_deref(ld); + return -EINVAL; + } + tty_ldisc_deref(ld); + return 0; case TIOCOUTQ: return put_user(tty->driver->chars_in_buffer ? tty->driver->chars_in_buffer(tty) : 0, @@ -936,6 +862,32 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file, if (L_ICANON(tty)) retval = inq_canon(tty); return put_user(retval, (unsigned int __user *) arg); +#ifndef TCGETS2 + case TIOCGLCKTRMIOS: + if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked)) + return -EFAULT; + return 0; + + case TIOCSLCKTRMIOS: + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + if (user_termios_to_kernel_termios(real_tty->termios_locked, (struct termios __user *) arg)) + return -EFAULT; + return 0; +#else + case TIOCGLCKTRMIOS: + if (kernel_termios_to_user_termios_1((struct termios __user *)arg, real_tty->termios_locked)) + return -EFAULT; + return 0; + + case TIOCSLCKTRMIOS: + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + if (user_termios_to_kernel_termios_1(real_tty->termios_locked, (struct termios __user *) arg)) + return -EFAULT; + return 0; +#endif + case TIOCPKT: { int pktmode; @@ -954,9 +906,19 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file, tty->packet = 0; return 0; } + case TIOCGSOFTCAR: + return put_user(C_CLOCAL(tty) ? 1 : 0, (int __user *)arg); + case TIOCSSOFTCAR: + if (get_user(arg, (unsigned int __user *) arg)) + return -EFAULT; + mutex_lock(&tty->termios_mutex); + tty->termios->c_cflag = + ((tty->termios->c_cflag & ~CLOCAL) | + (arg ? CLOCAL : 0)); + mutex_unlock(&tty->termios_mutex); + return 0; default: - /* Try the mode commands */ - return tty_mode_ioctl(tty, file, cmd, arg); + return -ENOIOCTLCMD; } } diff --git a/trunk/drivers/char/virtio_console.c b/trunk/drivers/char/virtio_console.c index e34da5c97196..100e8a201e3a 100644 --- a/trunk/drivers/char/virtio_console.c +++ b/trunk/drivers/char/virtio_console.c @@ -141,7 +141,7 @@ int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)) * never remove the console device we never need this pointer again. * * Finally we put our input buffer in the input queue, ready to receive. */ -static int __devinit virtcons_probe(struct virtio_device *dev) +static int virtcons_probe(struct virtio_device *dev) { int err; struct hvc_struct *hvc; diff --git a/trunk/drivers/firewire/fw-sbp2.c b/trunk/drivers/firewire/fw-sbp2.c index 624ff3e082f6..5596df65c8ed 100644 --- a/trunk/drivers/firewire/fw-sbp2.c +++ b/trunk/drivers/firewire/fw-sbp2.c @@ -650,14 +650,13 @@ static void sbp2_login(struct work_struct *work) if (sbp2_send_management_orb(lu, node_id, generation, SBP2_LOGIN_REQUEST, lu->lun, &response) < 0) { if (lu->retries++ < 5) { - if (queue_delayed_work(sbp2_wq, &lu->work, - DIV_ROUND_UP(HZ, 5))) - kref_get(&lu->tgt->kref); + queue_delayed_work(sbp2_wq, &lu->work, + DIV_ROUND_UP(HZ, 5)); } else { fw_error("failed to login to %s LUN %04x\n", unit->device.bus_id, lu->lun); + kref_put(&lu->tgt->kref, sbp2_release_target); } - kref_put(&lu->tgt->kref, sbp2_release_target); return; } @@ -915,9 +914,7 @@ static void sbp2_reconnect(struct work_struct *work) lu->retries = 0; PREPARE_DELAYED_WORK(&lu->work, sbp2_login); } - if (queue_delayed_work(sbp2_wq, &lu->work, DIV_ROUND_UP(HZ, 5))) - kref_get(&lu->tgt->kref); - kref_put(&lu->tgt->kref, sbp2_release_target); + queue_delayed_work(sbp2_wq, &lu->work, DIV_ROUND_UP(HZ, 5)); return; } diff --git a/trunk/drivers/ide/Kconfig b/trunk/drivers/ide/Kconfig index d1e8df187222..6eaece96524e 100644 --- a/trunk/drivers/ide/Kconfig +++ b/trunk/drivers/ide/Kconfig @@ -152,22 +152,9 @@ config BLK_DEV_IDEDISK If unsure, say Y. config IDEDISK_MULTI_MODE - bool "Use multiple sector mode for Programmed Input/Output by default" - help - This setting is irrelevant for most IDE disks, with direct memory - access, to which multiple sector mode does not apply. Multiple sector - mode is a feature of most modern IDE hard drives, permitting the - transfer of multiple sectors per Programmed Input/Output interrupt, - rather than the usual one sector per interrupt. When this feature is - enabled, it can reduce operating system overhead for disk Programmed - Input/Output. On some systems, it also can increase the data - throughput of Programmed Input/Output. Some drives, however, seemed - to run slower with multiple sector mode enabled. Some drives claimed - to support multiple sector mode, but lost data at some settings. - Under rare circumstances, such failures could result in massive - filesystem corruption. - - If you get the following error, try to say Y here: + bool "Use multi-mode by default" + help + If you get this error, try to say Y here: hda: set_multmode: status=0x51 { DriveReady SeekComplete Error } hda: set_multmode: error=0x04 { DriveStatusError } @@ -393,10 +380,9 @@ config IDEPCI_SHARE_IRQ config IDEPCI_PCIBUS_ORDER def_bool BLK_DEV_IDE=y && BLK_DEV_IDEPCI -# TODO: split it on per host driver config options (or module parameters) config BLK_DEV_OFFBOARD bool "Boot off-board chipsets first support" - depends on BLK_DEV_IDEPCI && (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001) + depends on BLK_DEV_IDEPCI help Normally, IDE controllers built into the motherboard (on-board controllers) are assigned to ide0 and ide1 while those on add-in PCI diff --git a/trunk/drivers/ide/ide-dma.c b/trunk/drivers/ide/ide-dma.c index e3add70b9cd8..428f7a8a00b6 100644 --- a/trunk/drivers/ide/ide-dma.c +++ b/trunk/drivers/ide/ide-dma.c @@ -340,7 +340,7 @@ static int config_drive_for_dma (ide_drive_t *drive) if (drive->media != ide_disk) { if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA) - return 0; + return -1; } /* @@ -752,8 +752,7 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode) mode = XFER_MW_DMA_1; } - printk(KERN_DEBUG "%s: %s mode selected\n", drive->name, - mode ? ide_xfer_verbose(mode) : "no DMA"); + printk(KERN_DEBUG "%s: selected mode 0x%x\n", drive->name, mode); return min(mode, req_mode); } diff --git a/trunk/drivers/ide/ide-io.c b/trunk/drivers/ide/ide-io.c index 755011827afa..c89f0d3058e9 100644 --- a/trunk/drivers/ide/ide-io.c +++ b/trunk/drivers/ide/ide-io.c @@ -340,8 +340,6 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) if (args) { args[0] = stat; args[1] = err; - /* be sure we're looking at the low order bits */ - hwif->OUTB(drive->ctl & ~0x80, IDE_CONTROL_REG); args[2] = hwif->INB(IDE_NSECTOR_REG); args[3] = hwif->INB(IDE_SECTOR_REG); args[4] = hwif->INB(IDE_LCYL_REG); @@ -656,8 +654,7 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive) int retries = 10; local_irq_enable_in_hardirq(); - if (rq->cmd_type == REQ_TYPE_ATA_CMD && - (stat & DRQ_STAT) && args && args[3]) { + if ((stat & DRQ_STAT) && args && args[3]) { u8 io_32bit = drive->io_32bit; drive->io_32bit = 0; hwif->ata_input_data(drive, &args[4], args[3] * SECTOR_WORDS); diff --git a/trunk/drivers/ide/ide-iops.c b/trunk/drivers/ide/ide-iops.c index e17a9ee120ea..dcda0f109df5 100644 --- a/trunk/drivers/ide/ide-iops.c +++ b/trunk/drivers/ide/ide-iops.c @@ -403,12 +403,8 @@ void ide_fix_driveid (struct hd_driveid *id) #endif } -/* - * ide_fixstring() cleans up and (optionally) byte-swaps a text string, - * removing leading/trailing blanks and compressing internal blanks. - * It is primarily used to tidy up the model name/number fields as - * returned by the WIN_[P]IDENTIFY commands. - */ +/* FIXME: exported for use by the USB storage (isd200.c) code only */ +EXPORT_SYMBOL(ide_fix_driveid); void ide_fixstring (u8 *s, const int bytecount, const int byteswap) { diff --git a/trunk/drivers/ide/ide-probe.c b/trunk/drivers/ide/ide-probe.c index 56fb0b843429..6a6f2e066b46 100644 --- a/trunk/drivers/ide/ide-probe.c +++ b/trunk/drivers/ide/ide-probe.c @@ -172,12 +172,11 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) ide_fixstring(id->fw_rev, sizeof(id->fw_rev), bswap); ide_fixstring(id->serial_no, sizeof(id->serial_no), bswap); - /* we depend on this a lot! */ - id->model[sizeof(id->model)-1] = '\0'; - if (strstr(id->model, "E X A B Y T E N E S T")) goto err_misc; + /* we depend on this a lot! */ + id->model[sizeof(id->model)-1] = '\0'; printk("%s: %s, ", drive->name, id->model); drive->present = 1; drive->dead = 0; diff --git a/trunk/drivers/ide/ide-taskfile.c b/trunk/drivers/ide/ide-taskfile.c index 2b60f1b0437e..d066546f2831 100644 --- a/trunk/drivers/ide/ide-taskfile.c +++ b/trunk/drivers/ide/ide-taskfile.c @@ -471,7 +471,6 @@ static int ide_diag_taskfile(ide_drive_t *drive, ide_task_t *args, unsigned long struct request rq; memset(&rq, 0, sizeof(rq)); - rq.ref_count = 1; rq.cmd_type = REQ_TYPE_ATA_TASKFILE; rq.buffer = buf; @@ -512,7 +511,6 @@ int ide_raw_taskfile (ide_drive_t *drive, ide_task_t *args, u8 *buf) EXPORT_SYMBOL(ide_raw_taskfile); -#ifdef CONFIG_IDE_TASK_IOCTL int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) { ide_task_request_t *req_task; @@ -662,7 +660,6 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) return err; } -#endif int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf) { diff --git a/trunk/drivers/ide/pci/piix.c b/trunk/drivers/ide/pci/piix.c index 63625a0be712..9329d4a810e5 100644 --- a/trunk/drivers/ide/pci/piix.c +++ b/trunk/drivers/ide/pci/piix.c @@ -302,7 +302,6 @@ struct ich_laptop { static const struct ich_laptop ich_laptop[] = { /* devid, subvendor, subdev */ - { 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */ { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ { 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */ { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ diff --git a/trunk/drivers/isdn/hisax/Kconfig b/trunk/drivers/isdn/hisax/Kconfig index 7832d8ba8e44..a3b945ac3256 100644 --- a/trunk/drivers/isdn/hisax/Kconfig +++ b/trunk/drivers/isdn/hisax/Kconfig @@ -109,7 +109,7 @@ config HISAX_16_3 config HISAX_TELESPCI bool "Teles PCI" - depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) help This enables HiSax support for the Teles PCI. See on how to configure it. @@ -237,7 +237,7 @@ config HISAX_MIC config HISAX_NETJET bool "NETjet card" - depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) help This enables HiSax support for the NetJet from Traverse Technologies. @@ -248,7 +248,7 @@ config HISAX_NETJET config HISAX_NETJET_U bool "NETspider U card" - depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) help This enables HiSax support for the Netspider U interface ISDN card from Traverse Technologies. @@ -287,7 +287,7 @@ config HISAX_HSTSAPHIR config HISAX_BKM_A4T bool "Telekom A4T card" - depends on PCI && PCI_LEGACY + depends on PCI help This enables HiSax support for the Telekom A4T card. @@ -297,7 +297,7 @@ config HISAX_BKM_A4T config HISAX_SCT_QUADRO bool "Scitel Quadro card" - depends on PCI && PCI_LEGACY + depends on PCI help This enables HiSax support for the Scitel Quadro card. @@ -316,7 +316,7 @@ config HISAX_GAZEL config HISAX_HFC_PCI bool "HFC PCI-Bus cards" - depends on PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) help This enables HiSax support for the HFC-S PCI 2BDS0 based cards. @@ -325,7 +325,7 @@ config HISAX_HFC_PCI config HISAX_W6692 bool "Winbond W6692 based cards" - depends on PCI && PCI_LEGACY + depends on PCI help This enables HiSax support for Winbond W6692 based PCI ISDN cards. @@ -341,7 +341,7 @@ config HISAX_HFC_SX config HISAX_ENTERNOW_PCI bool "Formula-n enter:now PCI card" - depends on HISAX_NETJET && PCI && PCI_LEGACY && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) + depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) help This enables HiSax support for the Formula-n enter:now PCI ISDN card. @@ -411,7 +411,7 @@ config HISAX_HFC4S8S config HISAX_FRITZ_PCIPNP tristate "AVM Fritz!Card PCI/PCIv2/PnP support (EXPERIMENTAL)" - depends on PCI && PCI_LEGACY && EXPERIMENTAL + depends on PCI && EXPERIMENTAL help This enables the driver for the AVM Fritz!Card PCI, Fritz!Card PCI v2 and Fritz!Card PnP. diff --git a/trunk/drivers/isdn/hisax/avm_pci.c b/trunk/drivers/isdn/hisax/avm_pci.c index 035d158779df..f8b79783c8b3 100644 --- a/trunk/drivers/isdn/hisax/avm_pci.c +++ b/trunk/drivers/isdn/hisax/avm_pci.c @@ -830,7 +830,7 @@ static int __devinit avm_pnp_setup(struct IsdnCardState *cs) #endif /* __ISAPNP__ */ -#ifndef CONFIG_PCI_LEGACY +#ifndef CONFIG_PCI static int __devinit avm_pci_setup(struct IsdnCardState *cs) { @@ -872,7 +872,7 @@ static int __devinit avm_pci_setup(struct IsdnCardState *cs) return (1); } -#endif /* CONFIG_PCI_LEGACY */ +#endif /* CONFIG_PCI */ int __devinit setup_avm_pcipnp(struct IsdnCard *card) diff --git a/trunk/drivers/isdn/hisax/diva.c b/trunk/drivers/isdn/hisax/diva.c index 2d670856d141..826745078746 100644 --- a/trunk/drivers/isdn/hisax/diva.c +++ b/trunk/drivers/isdn/hisax/diva.c @@ -1148,7 +1148,7 @@ static int __devinit setup_diva_isapnp(struct IsdnCard *card) #endif /* ISAPNP */ -#ifdef CONFIG_PCI_LEGACY +#ifdef CONFIG_PCI static struct pci_dev *dev_diva __devinitdata = NULL; static struct pci_dev *dev_diva_u __devinitdata = NULL; static struct pci_dev *dev_diva201 __devinitdata = NULL; @@ -1229,14 +1229,14 @@ static int __devinit setup_diva_pci(struct IsdnCard *card) return (1); /* card found */ } -#else /* if !CONFIG_PCI_LEGACY */ +#else /* if !CONFIG_PCI */ static int __devinit setup_diva_pci(struct IsdnCard *card) { return (-1); /* card not found; continue search */ } -#endif /* CONFIG_PCI_LEGACY */ +#endif /* CONFIG_PCI */ int __devinit setup_diva(struct IsdnCard *card) diff --git a/trunk/drivers/isdn/hisax/elsa.c b/trunk/drivers/isdn/hisax/elsa.c index d272d8ce6537..948a9b290fd1 100644 --- a/trunk/drivers/isdn/hisax/elsa.c +++ b/trunk/drivers/isdn/hisax/elsa.c @@ -883,7 +883,7 @@ setup_elsa_isa(struct IsdnCard *card) val += 'A' - 3; if (val == 'B' || val == 'C') val ^= 1; - if ((cs->subtyp == ELSA_PCFPRO) && (val == 'G')) + if ((cs->subtyp == ELSA_PCFPRO) && (val = 'G')) val = 'C'; printk(KERN_INFO "Elsa: %s found at %#lx Rev.:%c IRQ %d\n", @@ -1025,7 +1025,7 @@ setup_elsa_pcmcia(struct IsdnCard *card) cs->irq); } -#ifdef CONFIG_PCI_LEGACY +#ifdef CONFIG_PCI static struct pci_dev *dev_qs1000 __devinitdata = NULL; static struct pci_dev *dev_qs3000 __devinitdata = NULL; @@ -1093,7 +1093,7 @@ setup_elsa_pci(struct IsdnCard *card) { return (1); } -#endif /* CONFIG_PCI_LEGACY */ +#endif /* CONFIG_PCI */ static int __devinit setup_elsa_common(struct IsdnCard *card) diff --git a/trunk/drivers/isdn/hisax/gazel.c b/trunk/drivers/isdn/hisax/gazel.c index f66620ad8e7c..3efa719b6d29 100644 --- a/trunk/drivers/isdn/hisax/gazel.c +++ b/trunk/drivers/isdn/hisax/gazel.c @@ -532,7 +532,6 @@ setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs) return (0); } -#ifdef CONFIG_PCI_LEGACY static struct pci_dev *dev_tel __devinitdata = NULL; static int __devinit @@ -621,7 +620,6 @@ setup_gazelpci(struct IsdnCardState *cs) return (0); } -#endif /* CONFIG_PCI_LEGACY */ int __devinit setup_gazel(struct IsdnCard *card) @@ -641,7 +639,7 @@ setup_gazel(struct IsdnCard *card) return (0); } else { -#ifdef CONFIG_PCI_LEGACY +#ifdef CONFIG_PCI if (setup_gazelpci(cs)) return (0); #else diff --git a/trunk/drivers/isdn/hisax/niccy.c b/trunk/drivers/isdn/hisax/niccy.c index bd9921128aa8..e5918c6fe73d 100644 --- a/trunk/drivers/isdn/hisax/niccy.c +++ b/trunk/drivers/isdn/hisax/niccy.c @@ -223,6 +223,7 @@ static int niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg) return 0; } +static struct pci_dev *niccy_dev __devinitdata = NULL; #ifdef __ISAPNP__ static struct pnp_card *pnp_c __devinitdata = NULL; #endif @@ -298,9 +299,7 @@ int __devinit setup_niccy(struct IsdnCard *card) return 0; } } else { -#ifdef CONFIG_PCI_LEGACY - static struct pci_dev *niccy_dev __devinitdata; - +#ifdef CONFIG_PCI u_int pci_ioaddr; cs->subtyp = 0; if ((niccy_dev = pci_find_device(PCI_VENDOR_ID_SATSAGEM, @@ -357,7 +356,7 @@ int __devinit setup_niccy(struct IsdnCard *card) printk(KERN_WARNING "Niccy: io0 0 and NO_PCI_BIOS\n"); printk(KERN_WARNING "Niccy: unable to config NICCY PCI\n"); return 0; -#endif /* CONFIG_PCI_LEGACY */ +#endif /* CONFIG_PCI */ } printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n", CardType[cs->typ], (cs->subtyp == 1) ? "PnP" : "PCI", diff --git a/trunk/drivers/isdn/hisax/sedlbauer.c b/trunk/drivers/isdn/hisax/sedlbauer.c index 95425f3d2220..03dfc32166a0 100644 --- a/trunk/drivers/isdn/hisax/sedlbauer.c +++ b/trunk/drivers/isdn/hisax/sedlbauer.c @@ -600,7 +600,7 @@ setup_sedlbauer_isapnp(struct IsdnCard *card, int *bytecnt) } #endif /* __ISAPNP__ */ -#ifdef CONFIG_PCI_LEGACY +#ifdef CONFIG_PCI static struct pci_dev *dev_sedl __devinitdata = NULL; static int __devinit @@ -675,7 +675,7 @@ setup_sedlbauer_pci(struct IsdnCard *card) return (1); } -#endif /* CONFIG_PCI_LEGACY */ +#endif /* CONFIG_PCI */ int __devinit setup_sedlbauer(struct IsdnCard *card) diff --git a/trunk/drivers/leds/leds-gpio.c b/trunk/drivers/leds/leds-gpio.c index 99bc50059d35..47d90db280ce 100644 --- a/trunk/drivers/leds/leds-gpio.c +++ b/trunk/drivers/leds/leds-gpio.c @@ -60,7 +60,7 @@ static void gpio_led_set(struct led_classdev *led_cdev, gpio_set_value(led_dat->gpio, level); } -static int gpio_led_probe(struct platform_device *pdev) +static int __init gpio_led_probe(struct platform_device *pdev) { struct gpio_led_platform_data *pdata = pdev->dev.platform_data; struct gpio_led *cur_led; @@ -93,13 +93,13 @@ static int gpio_led_probe(struct platform_device *pdev) gpio_direction_output(led_dat->gpio, led_dat->active_low); - INIT_WORK(&led_dat->work, gpio_led_work); - ret = led_classdev_register(&pdev->dev, &led_dat->cdev); if (ret < 0) { gpio_free(led_dat->gpio); goto err; } + + INIT_WORK(&led_dat->work, gpio_led_work); } platform_set_drvdata(pdev, leds_data); @@ -110,17 +110,17 @@ static int gpio_led_probe(struct platform_device *pdev) if (i > 0) { for (i = i - 1; i >= 0; i--) { led_classdev_unregister(&leds_data[i].cdev); - cancel_work_sync(&leds_data[i].work); gpio_free(leds_data[i].gpio); } } + flush_scheduled_work(); kfree(leds_data); return ret; } -static int __devexit gpio_led_remove(struct platform_device *pdev) +static int __exit gpio_led_remove(struct platform_device *pdev) { int i; struct gpio_led_platform_data *pdata = pdev->dev.platform_data; @@ -130,10 +130,9 @@ static int __devexit gpio_led_remove(struct platform_device *pdev) for (i = 0; i < pdata->num_leds; i++) { led_classdev_unregister(&leds_data[i].cdev); - cancel_work_sync(&leds_data[i].work); gpio_free(leds_data[i].gpio); } - + kfree(leds_data); return 0; @@ -145,7 +144,7 @@ static int gpio_led_suspend(struct platform_device *pdev, pm_message_t state) struct gpio_led_platform_data *pdata = pdev->dev.platform_data; struct gpio_led_data *leds_data; int i; - + leds_data = platform_get_drvdata(pdev); for (i = 0; i < pdata->num_leds; i++) @@ -173,8 +172,7 @@ static int gpio_led_resume(struct platform_device *pdev) #endif static struct platform_driver gpio_led_driver = { - .probe = gpio_led_probe, - .remove = __devexit_p(gpio_led_remove), + .remove = __exit_p(gpio_led_remove), .suspend = gpio_led_suspend, .resume = gpio_led_resume, .driver = { @@ -185,7 +183,7 @@ static struct platform_driver gpio_led_driver = { static int __init gpio_led_init(void) { - return platform_driver_register(&gpio_led_driver); + return platform_driver_probe(&gpio_led_driver, gpio_led_probe); } static void __exit gpio_led_exit(void) diff --git a/trunk/drivers/macintosh/windfarm_core.c b/trunk/drivers/macintosh/windfarm_core.c index 075b4d99e354..516d943227e2 100644 --- a/trunk/drivers/macintosh/windfarm_core.c +++ b/trunk/drivers/macintosh/windfarm_core.c @@ -94,9 +94,7 @@ static int wf_thread_func(void *data) DBG("wf: thread started\n"); set_freezable(); - while (!kthread_should_stop()) { - try_to_freeze(); - + while(!kthread_should_stop()) { if (time_after_eq(jiffies, next)) { wf_notify(WF_EVENT_TICK, NULL); if (wf_overtemp) { @@ -118,6 +116,12 @@ static int wf_thread_func(void *data) delay = next - jiffies; if (delay <= HZ) schedule_timeout_interruptible(delay); + + /* there should be no non-suspend signal, but oh well */ + if (signal_pending(current) && !try_to_freeze()) { + printk(KERN_WARNING "windfarm: thread got sigl !\n"); + break; + } } DBG("wf: thread stopped\n"); diff --git a/trunk/drivers/md/bitmap.c b/trunk/drivers/md/bitmap.c index 1b1ef3130e6e..7c426d07a555 100644 --- a/trunk/drivers/md/bitmap.c +++ b/trunk/drivers/md/bitmap.c @@ -1207,7 +1207,8 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect prepare_to_wait(&bitmap->overflow_wait, &__wait, TASK_UNINTERRUPTIBLE); spin_unlock_irq(&bitmap->lock); - blk_unplug(bitmap->mddev->queue); + bitmap->mddev->queue + ->unplug_fn(bitmap->mddev->queue); schedule(); finish_wait(&bitmap->overflow_wait, &__wait); continue; diff --git a/trunk/drivers/md/dm-table.c b/trunk/drivers/md/dm-table.c index e298d8d11f24..5a7eb650181e 100644 --- a/trunk/drivers/md/dm-table.c +++ b/trunk/drivers/md/dm-table.c @@ -1000,7 +1000,8 @@ void dm_table_unplug_all(struct dm_table *t) struct dm_dev *dd = list_entry(d, struct dm_dev, list); struct request_queue *q = bdev_get_queue(dd->bdev); - blk_unplug(q); + if (q->unplug_fn) + q->unplug_fn(q); } } diff --git a/trunk/drivers/md/linear.c b/trunk/drivers/md/linear.c index 3dac1cfb8189..56a11f6c127b 100644 --- a/trunk/drivers/md/linear.c +++ b/trunk/drivers/md/linear.c @@ -87,7 +87,8 @@ static void linear_unplug(struct request_queue *q) for (i=0; i < mddev->raid_disks; i++) { struct request_queue *r_queue = bdev_get_queue(conf->disks[i].rdev->bdev); - blk_unplug(r_queue); + if (r_queue->unplug_fn) + r_queue->unplug_fn(r_queue); } } diff --git a/trunk/drivers/md/md.c b/trunk/drivers/md/md.c index cef9ebd5a046..808cd9549456 100644 --- a/trunk/drivers/md/md.c +++ b/trunk/drivers/md/md.c @@ -5445,7 +5445,7 @@ void md_do_sync(mddev_t *mddev) * about not overloading the IO subsystem. (things like an * e2fsck being done on the RAID array should execute fast) */ - blk_unplug(mddev->queue); + mddev->queue->unplug_fn(mddev->queue); cond_resched(); currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2 @@ -5464,7 +5464,7 @@ void md_do_sync(mddev_t *mddev) * this also signals 'finished resyncing' to md_stop */ out: - blk_unplug(mddev->queue); + mddev->queue->unplug_fn(mddev->queue); wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active)); diff --git a/trunk/drivers/md/multipath.c b/trunk/drivers/md/multipath.c index eb631ebed686..b35731cceac6 100644 --- a/trunk/drivers/md/multipath.c +++ b/trunk/drivers/md/multipath.c @@ -125,7 +125,8 @@ static void unplug_slaves(mddev_t *mddev) atomic_inc(&rdev->nr_pending); rcu_read_unlock(); - blk_unplug(r_queue); + if (r_queue->unplug_fn) + r_queue->unplug_fn(r_queue); rdev_dec_pending(rdev, mddev); rcu_read_lock(); diff --git a/trunk/drivers/md/raid0.c b/trunk/drivers/md/raid0.c index f8e591708d1f..c111105fc2dc 100644 --- a/trunk/drivers/md/raid0.c +++ b/trunk/drivers/md/raid0.c @@ -35,7 +35,8 @@ static void raid0_unplug(struct request_queue *q) for (i=0; iraid_disks; i++) { struct request_queue *r_queue = bdev_get_queue(devlist[i]->bdev); - blk_unplug(r_queue); + if (r_queue->unplug_fn) + r_queue->unplug_fn(r_queue); } } diff --git a/trunk/drivers/md/raid1.c b/trunk/drivers/md/raid1.c index 4a69c416e045..85478d6a9c1a 100644 --- a/trunk/drivers/md/raid1.c +++ b/trunk/drivers/md/raid1.c @@ -549,7 +549,8 @@ static void unplug_slaves(mddev_t *mddev) atomic_inc(&rdev->nr_pending); rcu_read_unlock(); - blk_unplug(r_queue); + if (r_queue->unplug_fn) + r_queue->unplug_fn(r_queue); rdev_dec_pending(rdev, mddev); rcu_read_lock(); diff --git a/trunk/drivers/md/raid10.c b/trunk/drivers/md/raid10.c index 5cdcc9386200..fc6607acb6e4 100644 --- a/trunk/drivers/md/raid10.c +++ b/trunk/drivers/md/raid10.c @@ -593,7 +593,8 @@ static void unplug_slaves(mddev_t *mddev) atomic_inc(&rdev->nr_pending); rcu_read_unlock(); - blk_unplug(r_queue); + if (r_queue->unplug_fn) + r_queue->unplug_fn(r_queue); rdev_dec_pending(rdev, mddev); rcu_read_lock(); diff --git a/trunk/drivers/md/raid5.c b/trunk/drivers/md/raid5.c index 1cfc984cc7b7..80a67d789b72 100644 --- a/trunk/drivers/md/raid5.c +++ b/trunk/drivers/md/raid5.c @@ -2624,13 +2624,6 @@ static void handle_stripe5(struct stripe_head *sh) s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state); /* Now to look around and see what can be done */ - /* clean-up completed biofill operations */ - if (test_bit(STRIPE_OP_BIOFILL, &sh->ops.complete)) { - clear_bit(STRIPE_OP_BIOFILL, &sh->ops.pending); - clear_bit(STRIPE_OP_BIOFILL, &sh->ops.ack); - clear_bit(STRIPE_OP_BIOFILL, &sh->ops.complete); - } - rcu_read_lock(); for (i=disks; i--; ) { mdk_rdev_t *rdev; @@ -2904,6 +2897,13 @@ static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page) s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state); /* Now to look around and see what can be done */ + /* clean-up completed biofill operations */ + if (test_bit(STRIPE_OP_BIOFILL, &sh->ops.complete)) { + clear_bit(STRIPE_OP_BIOFILL, &sh->ops.pending); + clear_bit(STRIPE_OP_BIOFILL, &sh->ops.ack); + clear_bit(STRIPE_OP_BIOFILL, &sh->ops.complete); + } + rcu_read_lock(); for (i=disks; i--; ) { mdk_rdev_t *rdev; @@ -3186,7 +3186,8 @@ static void unplug_slaves(mddev_t *mddev) atomic_inc(&rdev->nr_pending); rcu_read_unlock(); - blk_unplug(r_queue); + if (r_queue->unplug_fn) + r_queue->unplug_fn(r_queue); rdev_dec_pending(rdev, mddev); rcu_read_lock(); diff --git a/trunk/drivers/media/Kconfig b/trunk/drivers/media/Kconfig index 1604f0490404..dd9bd4310c84 100644 --- a/trunk/drivers/media/Kconfig +++ b/trunk/drivers/media/Kconfig @@ -151,7 +151,6 @@ config VIDEO_IR_I2C config VIDEO_IR tristate - depends on INPUT select VIDEO_IR_I2C if I2C config VIDEO_TVEEPROM diff --git a/trunk/drivers/media/common/saa7146_core.c b/trunk/drivers/media/common/saa7146_core.c index 7d04a6fd1acb..cb034ead95ab 100644 --- a/trunk/drivers/media/common/saa7146_core.c +++ b/trunk/drivers/media/common/saa7146_core.c @@ -59,89 +59,43 @@ void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data) } /* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */ -static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev, - unsigned long us1, unsigned long us2) +int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop) { - unsigned long timeout; + unsigned long start; int err; /* wait for registers to be programmed */ - timeout = jiffies + usecs_to_jiffies(us1); + start = jiffies; while (1) { - err = time_after(jiffies, timeout); + err = time_after(jiffies, start + HZ/20); if (saa7146_read(dev, MC2) & 2) break; if (err) { - printk(KERN_ERR "%s: %s timed out while waiting for " - "registers getting programmed\n", - dev->name, __FUNCTION__); + DEB_S(("timed out while waiting for registers getting programmed\n")); return -ETIMEDOUT; } - msleep(1); + if (nobusyloop) + msleep(1); } /* wait for transfer to complete */ - timeout = jiffies + usecs_to_jiffies(us2); + start = jiffies; while (1) { - err = time_after(jiffies, timeout); + err = time_after(jiffies, start + HZ/4); if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S)) break; saa7146_read(dev, MC2); if (err) { - DEB_S(("%s: %s timed out while waiting for transfer " - "completion\n", dev->name, __FUNCTION__)); + DEB_S(("timed out while waiting for transfer completion\n")); return -ETIMEDOUT; } - msleep(1); + if (nobusyloop) + msleep(1); } return 0; } -static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev, - unsigned long us1, unsigned long us2) -{ - unsigned long loops; - - /* wait for registers to be programmed */ - loops = us1; - while (1) { - if (saa7146_read(dev, MC2) & 2) - break; - if (!loops--) { - printk(KERN_ERR "%s: %s timed out while waiting for " - "registers getting programmed\n", - dev->name, __FUNCTION__); - return -ETIMEDOUT; - } - udelay(1); - } - - /* wait for transfer to complete */ - loops = us2 / 5; - while (1) { - if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S)) - break; - saa7146_read(dev, MC2); - if (!loops--) { - DEB_S(("%s: %s timed out while waiting for transfer " - "completion\n", dev->name, __FUNCTION__)); - return -ETIMEDOUT; - } - udelay(5); - } - - return 0; -} - -int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop) -{ - if (nobusyloop) - return saa7146_wait_for_debi_done_sleep(dev, 50000, 250000); - else - return saa7146_wait_for_debi_done_busyloop(dev, 50000, 250000); -} - /**************************************************************************** * general helper functions ****************************************************************************/ diff --git a/trunk/drivers/media/dvb/frontends/mt2131.c b/trunk/drivers/media/dvb/frontends/mt2131.c index 13cf16668171..4b93931de4e1 100644 --- a/trunk/drivers/media/dvb/frontends/mt2131.c +++ b/trunk/drivers/media/dvb/frontends/mt2131.c @@ -116,7 +116,7 @@ static int mt2131_set_params(struct dvb_frontend *fe, f_lo1 = (f_lo1 / 250) * 250; f_lo2 = f_lo1 - freq - MT2131_IF2; - priv->frequency = (f_lo1 - f_lo2 - MT2131_IF2) * 1000; + priv->frequency = (f_lo1 - f_lo2 - MT2131_IF2) * 1000, /* Frequency LO1 = 16MHz * (DIV1 + NUM1/8192 ) */ num1 = f_lo1 * 64 / (MT2131_FREF / 128); diff --git a/trunk/drivers/media/dvb/frontends/s5h1409.c b/trunk/drivers/media/dvb/frontends/s5h1409.c index 8dee7ec9456a..30e8a705fad4 100644 --- a/trunk/drivers/media/dvb/frontends/s5h1409.c +++ b/trunk/drivers/media/dvb/frontends/s5h1409.c @@ -42,9 +42,6 @@ struct s5h1409_state { fe_modulation_t current_modulation; u32 current_frequency; - - u32 is_qam_locked; - u32 qam_state; }; static int debug = 0; @@ -97,7 +94,6 @@ static struct init_tab { { 0xac, 0x1003, }, { 0xad, 0x103f, }, { 0xe2, 0x0100, }, - { 0xe3, 0x0000, }, { 0x28, 0x1010, }, { 0xb1, 0x000e, }, }; @@ -339,8 +335,6 @@ static int s5h1409_softreset(struct dvb_frontend* fe) s5h1409_writereg(state, 0xf5, 0); s5h1409_writereg(state, 0xf5, 1); - state->is_qam_locked = 0; - state->qam_state = 0; return 0; } @@ -355,11 +349,6 @@ static int s5h1409_set_if_freq(struct dvb_frontend* fe, int KHz) s5h1409_writereg(state, 0x87, 0x01be); s5h1409_writereg(state, 0x88, 0x0436); s5h1409_writereg(state, 0x89, 0x054d); - } else - if (KHz == 4000) { - s5h1409_writereg(state, 0x87, 0x014b); - s5h1409_writereg(state, 0x88, 0x0cb5); - s5h1409_writereg(state, 0x89, 0x03e2); } else { printk("%s() Invalid arg = %d KHz\n", __FUNCTION__, KHz); ret = -1; @@ -372,7 +361,7 @@ static int s5h1409_set_spectralinversion(struct dvb_frontend* fe, int inverted) { struct s5h1409_state* state = fe->demodulator_priv; - dprintk("%s(%d)\n", __FUNCTION__, inverted); + dprintk("%s()\n", __FUNCTION__); if(inverted == 1) return s5h1409_writereg(state, 0x1b, 0x1101); /* Inverted */ @@ -393,10 +382,14 @@ static int s5h1409_enable_modulation(struct dvb_frontend* fe, s5h1409_writereg(state, 0xf4, 0); break; case QAM_64: + dprintk("%s() QAM_64\n", __FUNCTION__); + s5h1409_writereg(state, 0xf4, 1); + s5h1409_writereg(state, 0x85, 0x100); + break; case QAM_256: - dprintk("%s() QAM_AUTO (64/256)\n", __FUNCTION__); + dprintk("%s() QAM_256\n", __FUNCTION__); s5h1409_writereg(state, 0xf4, 1); - s5h1409_writereg(state, 0x85, 0x110); + s5h1409_writereg(state, 0x85, 0x101); break; default: dprintk("%s() Invalid modulation\n", __FUNCTION__); @@ -430,7 +423,7 @@ static int s5h1409_set_gpio(struct dvb_frontend* fe, int enable) if (enable) return s5h1409_writereg(state, 0xe3, 0x1100); else - return s5h1409_writereg(state, 0xe3, 0x1000); + return s5h1409_writereg(state, 0xe3, 0); } static int s5h1409_sleep(struct dvb_frontend* fe, int enable) @@ -451,66 +444,6 @@ static int s5h1409_register_reset(struct dvb_frontend* fe) return s5h1409_writereg(state, 0xfa, 0); } -static void s5h1409_set_qam_amhum_mode(struct dvb_frontend *fe) -{ - struct s5h1409_state *state = fe->demodulator_priv; - u16 reg; - - if (state->is_qam_locked) - return; - - /* QAM EQ lock check */ - reg = s5h1409_readreg(state, 0xf0); - - if ((reg >> 13) & 0x1) { - - state->is_qam_locked = 1; - reg &= 0xff; - - s5h1409_writereg(state, 0x96, 0x00c); - if ((reg < 0x38) || (reg > 0x68) ) { - s5h1409_writereg(state, 0x93, 0x3332); - s5h1409_writereg(state, 0x9e, 0x2c37); - } else { - s5h1409_writereg(state, 0x93, 0x3130); - s5h1409_writereg(state, 0x9e, 0x2836); - } - - } else { - s5h1409_writereg(state, 0x96, 0x0008); - s5h1409_writereg(state, 0x93, 0x3332); - s5h1409_writereg(state, 0x9e, 0x2c37); - } -} - -static void s5h1409_set_qam_interleave_mode(struct dvb_frontend *fe) -{ - struct s5h1409_state *state = fe->demodulator_priv; - u16 reg, reg1, reg2; - - reg = s5h1409_readreg(state, 0xf1); - - /* Master lock */ - if ((reg >> 15) & 0x1) { - if (state->qam_state != 2) { - state->qam_state = 2; - reg1 = s5h1409_readreg(state, 0xb2); - reg2 = s5h1409_readreg(state, 0xad); - - s5h1409_writereg(state, 0x96, 0x20); - s5h1409_writereg(state, 0xad, - ( ((reg1 & 0xf000) >> 4) | (reg2 & 0xf0ff)) ); - s5h1409_writereg(state, 0xab, 0x1100); - } - } else { - if (state->qam_state != 1) { - state->qam_state = 1; - s5h1409_writereg(state, 0x96, 0x08); - s5h1409_writereg(state, 0xab, 0x1101); - } - } -} - /* Talk to the demod, set the FEC, GUARD, QAM settings etc */ static int s5h1409_set_frontend (struct dvb_frontend* fe, struct dvb_frontend_parameters *p) @@ -525,21 +458,12 @@ static int s5h1409_set_frontend (struct dvb_frontend* fe, s5h1409_enable_modulation(fe, p->u.vsb.modulation); - /* Allow the demod to settle */ - msleep(100); - if (fe->ops.tuner_ops.set_params) { if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 1); fe->ops.tuner_ops.set_params(fe, p); if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); } - /* Optimize the demod for QAM */ - if (p->u.vsb.modulation != VSB_8) { - s5h1409_set_qam_amhum_mode(fe); - s5h1409_set_qam_interleave_mode(fe); - } - return 0; } @@ -571,8 +495,8 @@ static int s5h1409_init (struct dvb_frontend* fe) s5h1409_set_gpio(fe, state->config->gpio); s5h1409_softreset(fe); - /* Note: Leaving the I2C gate closed. */ - s5h1409_i2c_gate_ctrl(fe, 0); + /* Note: Leaving the I2C gate open here. */ + s5h1409_i2c_gate_ctrl(fe, 1); return 0; } diff --git a/trunk/drivers/media/dvb/frontends/stv0297.c b/trunk/drivers/media/dvb/frontends/stv0297.c index 7c23775f77db..17e5cb561cd8 100644 --- a/trunk/drivers/media/dvb/frontends/stv0297.c +++ b/trunk/drivers/media/dvb/frontends/stv0297.c @@ -358,23 +358,11 @@ static int stv0297_read_ber(struct dvb_frontend *fe, u32 * ber) static int stv0297_read_signal_strength(struct dvb_frontend *fe, u16 * strength) { struct stv0297_state *state = fe->demodulator_priv; - u8 STRENGTH[3]; - u16 tmp; - - stv0297_readregs(state, 0x41, STRENGTH, 3); - tmp = (STRENGTH[1] & 0x03) << 8 | STRENGTH[0]; - if (STRENGTH[2] & 0x20) { - if (tmp < 0x200) - tmp = 0; - else - tmp = tmp - 0x200; - } else { - if (tmp > 0x1ff) - tmp = 0; - else - tmp = 0x1ff - tmp; - } - *strength = (tmp << 7) | (tmp >> 2); + u8 STRENGTH[2]; + + stv0297_readregs(state, 0x41, STRENGTH, 2); + *strength = (STRENGTH[1] & 0x03) << 8 | STRENGTH[0]; + return 0; } diff --git a/trunk/drivers/media/dvb/frontends/tda10021.c b/trunk/drivers/media/dvb/frontends/tda10021.c index 45137d2ebfb9..4cd9e82c4669 100644 --- a/trunk/drivers/media/dvb/frontends/tda10021.c +++ b/trunk/drivers/media/dvb/frontends/tda10021.c @@ -301,8 +301,6 @@ static int tda10021_read_ber(struct dvb_frontend* fe, u32* ber) u32 _ber = tda10021_readreg(state, 0x14) | (tda10021_readreg(state, 0x15) << 8) | ((tda10021_readreg(state, 0x16) & 0x0f) << 16); - _tda10021_writereg(state, 0x10, (tda10021_readreg(state, 0x10) & ~0xc0) - | (tda10021_inittab[0x10] & 0xc0)); *ber = 10 * _ber; return 0; @@ -312,11 +310,7 @@ static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength) { struct tda10021_state* state = fe->demodulator_priv; - u8 config = tda10021_readreg(state, 0x02); u8 gain = tda10021_readreg(state, 0x17); - if (config & 0x02) - /* the agc value is inverted */ - gain = ~gain; *strength = (gain << 8) | gain; return 0; diff --git a/trunk/drivers/media/dvb/frontends/ves1820.c b/trunk/drivers/media/dvb/frontends/ves1820.c index 60433b5011fd..066b73b75698 100644 --- a/trunk/drivers/media/dvb/frontends/ves1820.c +++ b/trunk/drivers/media/dvb/frontends/ves1820.c @@ -47,7 +47,7 @@ struct ves1820_state { static int verbose; static u8 ves1820_inittab[] = { - 0x69, 0x6A, 0x93, 0x1A, 0x12, 0x46, 0x26, 0x1A, + 0x69, 0x6A, 0x93, 0x12, 0x12, 0x46, 0x26, 0x1A, 0x43, 0x6A, 0xAA, 0xAA, 0x1E, 0x85, 0x43, 0x20, 0xE0, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, diff --git a/trunk/drivers/media/dvb/ttpci/Kconfig b/trunk/drivers/media/dvb/ttpci/Kconfig index 54b91f26ca63..6d53289b3276 100644 --- a/trunk/drivers/media/dvb/ttpci/Kconfig +++ b/trunk/drivers/media/dvb/ttpci/Kconfig @@ -84,7 +84,7 @@ config DVB_BUDGET config DVB_BUDGET_CI tristate "Budget cards with onboard CI connector" - depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 && INPUT + depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 select VIDEO_SAA7146 select DVB_STV0297 if !DVB_FE_CUSTOMISE select DVB_STV0299 if !DVB_FE_CUSTOMISE diff --git a/trunk/drivers/media/video/Kconfig b/trunk/drivers/media/video/Kconfig index c9f14bfc8544..2e571eb9313a 100644 --- a/trunk/drivers/media/video/Kconfig +++ b/trunk/drivers/media/video/Kconfig @@ -363,7 +363,7 @@ endmenu # encoder / decoder chips config VIDEO_VIVI tristate "Virtual Video Driver" - depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 + depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI select VIDEOBUF_VMALLOC default n ---help--- diff --git a/trunk/drivers/media/video/bt8xx/bttv-driver.c b/trunk/drivers/media/video/bt8xx/bttv-driver.c index a88b56e6ca05..9feeb636ff9b 100644 --- a/trunk/drivers/media/video/bt8xx/bttv-driver.c +++ b/trunk/drivers/media/video/bt8xx/bttv-driver.c @@ -2881,6 +2881,10 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, if (NULL == fmt) return -EINVAL; mutex_lock(&fh->cap.lock); + if (fmt->depth != pic->depth) { + retval = -EINVAL; + goto fh_unlock_and_return; + } if (fmt->flags & FORMAT_FLAGS_RAW) { /* VIDIOCMCAPTURE uses gbufsize, not RAW_BPL * RAW_LINES * 2. F1 is stored at offset 0, F2 @@ -3113,8 +3117,6 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, vm->width,vm->height,field); if (0 != retval) goto fh_unlock_and_return; - btv->init.width = vm->width; - btv->init.height = vm->height; spin_lock_irqsave(&btv->s_lock,flags); buffer_queue(&fh->cap,&buf->vb); spin_unlock_irqrestore(&btv->s_lock,flags); diff --git a/trunk/drivers/media/video/cafe_ccic.c b/trunk/drivers/media/video/cafe_ccic.c index 7ae499c9c54c..b63cab336920 100644 --- a/trunk/drivers/media/video/cafe_ccic.c +++ b/trunk/drivers/media/video/cafe_ccic.c @@ -3,9 +3,6 @@ * multifunction chip. Currently works with the Omnivision OV7670 * sensor. * - * The data sheet for this device can be found at: - * http://www.marvell.com/products/pcconn/88ALP01.jsp - * * Copyright 2006 One Laptop Per Child Association, Inc. * Copyright 2006-7 Jonathan Corbet * @@ -2235,16 +2232,13 @@ static int cafe_pci_suspend(struct pci_dev *pdev, pm_message_t state) { struct cafe_camera *cam = cafe_find_by_pdev(pdev); int ret; - enum cafe_state cstate; ret = pci_save_state(pdev); if (ret) return ret; - cstate = cam->state; /* HACK - stop_dma sets to idle */ cafe_ctlr_stop_dma(cam); cafe_ctlr_power_down(cam); pci_disable_device(pdev); - cam->state = cstate; return 0; } diff --git a/trunk/drivers/media/video/cx23885/Kconfig b/trunk/drivers/media/video/cx23885/Kconfig index d8b1ccb44913..72004a07b2d5 100644 --- a/trunk/drivers/media/video/cx23885/Kconfig +++ b/trunk/drivers/media/video/cx23885/Kconfig @@ -1,6 +1,6 @@ config VIDEO_CX23885 tristate "Conexant cx23885 (2388x successor) support" - depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT + depends on DVB_CORE && VIDEO_DEV && PCI && I2C select I2C_ALGOBIT select FW_LOADER select VIDEO_BTCX diff --git a/trunk/drivers/media/video/cx88/Kconfig b/trunk/drivers/media/video/cx88/Kconfig index ceb31d4a2512..eeb5224ca101 100644 --- a/trunk/drivers/media/video/cx88/Kconfig +++ b/trunk/drivers/media/video/cx88/Kconfig @@ -1,6 +1,6 @@ config VIDEO_CX88 tristate "Conexant 2388x (bt878 successor) support" - depends on VIDEO_DEV && PCI && I2C && INPUT + depends on VIDEO_DEV && PCI && I2C select I2C_ALGOBIT select FW_LOADER select VIDEO_BTCX diff --git a/trunk/drivers/media/video/em28xx/Kconfig b/trunk/drivers/media/video/em28xx/Kconfig index c1127802ad9c..5b6a40371602 100644 --- a/trunk/drivers/media/video/em28xx/Kconfig +++ b/trunk/drivers/media/video/em28xx/Kconfig @@ -1,6 +1,6 @@ config VIDEO_EM28XX tristate "Empia EM2800/2820/2840 USB video capture support" - depends on VIDEO_V4L1 && I2C && INPUT + depends on VIDEO_V4L1 && I2C select VIDEO_TUNER select VIDEO_TVEEPROM select VIDEO_IR diff --git a/trunk/drivers/media/video/em28xx/em28xx-i2c.c b/trunk/drivers/media/video/em28xx/em28xx-i2c.c index e3a4aa7a9df4..997d067e32e0 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-i2c.c +++ b/trunk/drivers/media/video/em28xx/em28xx-i2c.c @@ -416,10 +416,8 @@ static int attach_inform(struct i2c_client *client) struct em28xx *dev = client->adapter->algo_data; switch (client->addr << 1) { - case 0x86: - case 0x84: - case 0x96: - case 0x94: + case 0x43: + case 0x4b: { struct tuner_setup tun_setup; diff --git a/trunk/drivers/media/video/em28xx/em28xx-video.c b/trunk/drivers/media/video/em28xx/em28xx-video.c index 2529c298b862..a4c2a907124a 100644 --- a/trunk/drivers/media/video/em28xx/em28xx-video.c +++ b/trunk/drivers/media/video/em28xx/em28xx-video.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/trunk/drivers/media/video/planb.c b/trunk/drivers/media/video/planb.c index 36047d4e70f6..ce4b2f9791ee 100644 --- a/trunk/drivers/media/video/planb.c +++ b/trunk/drivers/media/video/planb.c @@ -91,6 +91,7 @@ static void planb_close(struct video_device *); static int planb_ioctl(struct video_device *, unsigned int, void *); static int planb_init_done(struct video_device *); static int planb_mmap(struct video_device *, const char *, unsigned long); +static void planb_irq(int, void *); static void release_planb(void); int init_planbs(struct video_init *); @@ -1314,7 +1315,7 @@ static volatile struct dbdma_cmd *setup_grab_cmd(int fr, struct planb *pb) return c1; } -static irqreturn_t planb_irq(int irq, void *dev_id) +static void planb_irq(int irq, void *dev_id) { unsigned int stat, astat; struct planb *pb = (struct planb *)dev_id; @@ -1357,14 +1358,13 @@ static irqreturn_t planb_irq(int irq, void *dev_id) pb->frame_stat[fr] = GBUFFER_DONE; pb->grabbing--; wake_up_interruptible(&pb->capq); - return IRQ_HANDLED; + return; } /* incorrect interrupts? */ pb->intr_mask = PLANB_CLR_IRQ; out_le32(&pb->planb_base->intr_stat, PLANB_CLR_IRQ); printk(KERN_ERR "PlanB: IRQ lockup, cleared intrrupts" " unconditionally\n"); - return IRQ_HANDLED; } /******************************* @@ -2090,7 +2090,7 @@ static int init_planb(struct planb *pb) /* clear interrupt mask */ pb->intr_mask = PLANB_CLR_IRQ; - result = request_irq(pb->irq, planb_irq, 0, "PlanB", pb); + result = request_irq(pb->irq, planb_irq, 0, "PlanB", (void *)pb); if (result < 0) { if (result==-EINVAL) printk(KERN_ERR "PlanB: Bad irq number (%d) " diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index 46f156fb108c..f569b00201dd 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-ctrl.c @@ -410,7 +410,7 @@ static int parse_mtoken(const char *ptr,unsigned int len, int msk; *valptr = 0; for (idx = 0, msk = 1; valid_bits; idx++, msk <<= 1) { - if (!(msk & valid_bits)) continue; + if (!msk & valid_bits) continue; valid_bits &= ~msk; if (!names[idx]) continue; slen = strlen(names[idx]); diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c index 11b3b2e84b90..ca9e2789c8ca 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-main.c @@ -136,13 +136,14 @@ static int __init pvr_init(void) static void __exit pvr_exit(void) { - pvr2_trace(PVR2_TRACE_INIT,"pvr_exit"); - usb_deregister(&pvr_driver); + pvr2_trace(PVR2_TRACE_INIT,"pvr_exit"); #ifdef CONFIG_VIDEO_PVRUSB2_SYSFS pvr2_sysfs_class_destroy(class_ptr); #endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ + + usb_deregister(&pvr_driver); } module_init(pvr_init); diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-sysfs.c index 3c57a7d8200b..2ee3c3049e8f 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-sysfs.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-sysfs.c @@ -905,6 +905,13 @@ struct pvr2_sysfs *pvr2_sysfs_create(struct pvr2_context *mp, } +static int pvr2_sysfs_hotplug(struct device *d, + struct kobj_uevent_env *env) +{ + /* Even though we don't do anything here, we still need this function + because sysfs will still try to call it. */ + return 0; +} struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) { @@ -915,6 +922,7 @@ struct pvr2_sysfs_class *pvr2_sysfs_class_create(void) clp->class.name = "pvrusb2"; clp->class.class_release = pvr2_sysfs_class_release; clp->class.dev_release = pvr2_sysfs_release; + clp->class.dev_uevent = pvr2_sysfs_hotplug; if (class_register(&clp->class)) { pvr2_sysfs_trace( "Registration failed for pvr2_sysfs_class id=%p",clp); diff --git a/trunk/drivers/media/video/saa7134/Kconfig b/trunk/drivers/media/video/saa7134/Kconfig index 3aa8cb2b860a..d6d8d660196d 100644 --- a/trunk/drivers/media/video/saa7134/Kconfig +++ b/trunk/drivers/media/video/saa7134/Kconfig @@ -1,6 +1,6 @@ config VIDEO_SAA7134 tristate "Philips SAA7134 support" - depends on VIDEO_DEV && PCI && I2C && INPUT + depends on VIDEO_DEV && PCI && I2C select VIDEOBUF_DMA_SG select VIDEO_IR select VIDEO_TUNER diff --git a/trunk/drivers/media/video/saa7134/saa7134-alsa.c b/trunk/drivers/media/video/saa7134/saa7134-alsa.c index b9c5cf7dc849..c6f7279669c1 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-alsa.c +++ b/trunk/drivers/media/video/saa7134/saa7134-alsa.c @@ -543,10 +543,8 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, V4L functions, and force ALSA to use that as the DMA area */ substream->runtime->dma_area = dev->dmasound.dma.vmalloc; - substream->runtime->dma_bytes = dev->dmasound.bufsize; - substream->runtime->dma_addr = 0; - return 0; + return 1; } @@ -653,17 +651,6 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) return 0; } -/* - * page callback (needed for mmap) - */ - -static struct page *snd_card_saa7134_page(struct snd_pcm_substream *substream, - unsigned long offset) -{ - void *pageptr = substream->runtime->dma_area + offset; - return vmalloc_to_page(pageptr); -} - /* * ALSA capture callbacks definition */ @@ -677,7 +664,6 @@ static struct snd_pcm_ops snd_card_saa7134_capture_ops = { .prepare = snd_card_saa7134_capture_prepare, .trigger = snd_card_saa7134_capture_trigger, .pointer = snd_card_saa7134_capture_pointer, - .page = snd_card_saa7134_page, }; /* diff --git a/trunk/drivers/media/video/saa7134/saa7134-cards.c b/trunk/drivers/media/video/saa7134/saa7134-cards.c index 4f3dad9ae6d6..a4c192fb4e41 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-cards.c +++ b/trunk/drivers/media/video/saa7134/saa7134-cards.c @@ -2996,11 +2996,11 @@ struct saa7134_board saa7134_boards[] = { },{ .name = name_comp1, .vmux = 0, - .amux = LINE1, + .amux = LINE2, },{ .name = name_svideo, .vmux = 8, - .amux = LINE1, + .amux = LINE2, }}, }, [SAA7134_BOARD_FLYDVBS_LR300] = { diff --git a/trunk/drivers/media/video/tuner-core.c b/trunk/drivers/media/video/tuner-core.c index 9e99f3636d3d..6a777604f070 100644 --- a/trunk/drivers/media/video/tuner-core.c +++ b/trunk/drivers/media/video/tuner-core.c @@ -30,7 +30,7 @@ /* standard i2c insmod options */ static unsigned short normal_i2c[] = { -#if defined(CONFIG_TUNER_TEA5761) || (defined(CONFIG_TUNER_TEA5761_MODULE) && defined(MODULE)) +#ifdef CONFIG_TUNER_TEA5761 0x10, #endif 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */ @@ -292,6 +292,7 @@ static void set_type(struct i2c_client *c, unsigned int type, } t->mode_mask = T_RADIO; break; +#ifdef CONFIG_TUNER_TEA5761 case TUNER_TEA5761: if (tea5761_attach(&t->fe, t->i2c.adapter, t->i2c.addr) == NULL) { t->type = TUNER_ABSENT; @@ -300,6 +301,7 @@ static void set_type(struct i2c_client *c, unsigned int type, } t->mode_mask = T_RADIO; break; +#endif case TUNER_PHILIPS_FMD1216ME_MK3: buffer[0] = 0x0b; buffer[1] = 0xdc; @@ -592,6 +594,7 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) /* autodetection code based on the i2c addr */ if (!no_autodetect) { switch (addr) { +#ifdef CONFIG_TUNER_TEA5761 case 0x10: if (tea5761_autodetection(t->i2c.adapter, t->i2c.addr) != EINVAL) { t->type = TUNER_TEA5761; @@ -603,6 +606,7 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) goto register_client; } break; +#endif case 0x42: case 0x43: case 0x4a: diff --git a/trunk/drivers/media/video/tvp5150.c b/trunk/drivers/media/video/tvp5150.c index 25d0aef88ef5..e2f1c972754b 100644 --- a/trunk/drivers/media/video/tvp5150.c +++ b/trunk/drivers/media/video/tvp5150.c @@ -799,10 +799,10 @@ static inline void tvp5150_reset(struct i2c_client *c) tvp5150_write_inittab(c, tvp5150_init_enable); /* Initialize image preferences */ - tvp5150_write(c, TVP5150_BRIGHT_CTL, decoder->bright); - tvp5150_write(c, TVP5150_CONTRAST_CTL, decoder->contrast); - tvp5150_write(c, TVP5150_SATURATION_CTL, decoder->contrast); - tvp5150_write(c, TVP5150_HUE_CTL, decoder->hue); + tvp5150_write(c, TVP5150_BRIGHT_CTL, decoder->bright >> 8); + tvp5150_write(c, TVP5150_CONTRAST_CTL, decoder->contrast >> 8); + tvp5150_write(c, TVP5150_SATURATION_CTL, decoder->contrast >> 8); + tvp5150_write(c, TVP5150_HUE_CTL, (decoder->hue - 32768) >> 8); tvp5150_set_std(c, decoder->norm); }; @@ -1077,10 +1077,10 @@ static int tvp5150_detect_client(struct i2c_adapter *adapter, core->norm = V4L2_STD_ALL; /* Default is autodetect */ core->route.input = TVP5150_COMPOSITE1; core->enable = 1; - core->bright = 128; - core->contrast = 128; - core->hue = 0; - core->sat = 128; + core->bright = 32768; + core->contrast = 32768; + core->hue = 32768; + core->sat = 32768; if (rv) { kfree(c); diff --git a/trunk/drivers/message/i2o/i2o_block.c b/trunk/drivers/message/i2o/i2o_block.c index e4ad7a1c4fbd..682406168de9 100644 --- a/trunk/drivers/message/i2o/i2o_block.c +++ b/trunk/drivers/message/i2o/i2o_block.c @@ -1077,8 +1077,8 @@ static int i2o_block_probe(struct device *dev) blk_queue_max_sectors(queue, max_sectors); blk_queue_max_hw_segments(queue, i2o_sg_tablesize(c, body_size)); - osm_debug("max sectors = %d\n", queue->max_sectors); - osm_debug("phys segments = %d\n", queue->max_phys_segments); + osm_debug("max sectors = %d\n", queue->max_phys_segments); + osm_debug("phys segments = %d\n", queue->max_sectors); osm_debug("max hw segments = %d\n", queue->max_hw_segments); /* diff --git a/trunk/drivers/mmc/card/queue.c b/trunk/drivers/mmc/card/queue.c index 1b9c9b6da5b7..9203a0b221b3 100644 --- a/trunk/drivers/mmc/card/queue.c +++ b/trunk/drivers/mmc/card/queue.c @@ -310,7 +310,7 @@ static void copy_sg(struct scatterlist *dst, unsigned int dst_len, } if (src_size == 0) { - src_buf = sg_virt(src); + src_buf = sg_virt(dst); src_size = src->length; } diff --git a/trunk/drivers/net/82596.c b/trunk/drivers/net/82596.c index 2797da7eeee6..bb30d5be7824 100644 --- a/trunk/drivers/net/82596.c +++ b/trunk/drivers/net/82596.c @@ -1192,8 +1192,6 @@ struct net_device * __init i82596_probe(int unit) goto out; } - dev->base_addr = ioaddr; - for (i = 0; i < 8; i++) { eth_addr[i] = inb(ioaddr + 8 + i); checksum += eth_addr[i]; @@ -1211,6 +1209,7 @@ struct net_device * __init i82596_probe(int unit) goto out1; } + dev->base_addr = ioaddr; dev->irq = 10; } #endif diff --git a/trunk/drivers/net/Kconfig b/trunk/drivers/net/Kconfig index cb581ebbe3c5..5f800a6dd978 100644 --- a/trunk/drivers/net/Kconfig +++ b/trunk/drivers/net/Kconfig @@ -136,11 +136,10 @@ config TUN If you don't know what to use this for, you don't need it. config VETH - tristate "Virtual ethernet pair device" + tristate "Virtual ethernet device" ---help--- - This device is a local ethernet tunnel. Devices are created in pairs. - When one end receives the packet it appears on its pair and vice - versa. + The device is an ethernet tunnel. Devices are created in pairs. When + one end receives the packet it appears on its pair and vice versa. config NET_SB1000 tristate "General Instruments Surfboard 1000" diff --git a/trunk/drivers/net/hamradio/6pack.c b/trunk/drivers/net/hamradio/6pack.c index 580cb4ab2af1..e0119f6a3319 100644 --- a/trunk/drivers/net/hamradio/6pack.c +++ b/trunk/drivers/net/hamradio/6pack.c @@ -762,20 +762,26 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file, if (copy_from_user(&addr, (void __user *) arg, AX25_ADDR_LEN)) { - err = -EFAULT; - break; - } - - netif_tx_lock_bh(dev); - memcpy(dev->dev_addr, &addr, AX25_ADDR_LEN); - netif_tx_unlock_bh(dev); - - err = 0; + err = -EFAULT; break; } + netif_tx_lock_bh(dev); + memcpy(dev->dev_addr, &addr, AX25_ADDR_LEN); + netif_tx_unlock_bh(dev); + + err = 0; + break; + } + + /* Allow stty to read, but not set, the serial port */ + case TCGETS: + case TCGETA: + err = n_tty_ioctl(tty, (struct file *) file, cmd, arg); + break; + default: - err = tty_mode_ioctl(tty, file, cmd, arg); + err = -ENOIOCTLCMD; } sp_put(sp); diff --git a/trunk/drivers/net/irda/irtty-sir.c b/trunk/drivers/net/irda/irtty-sir.c index fc753d7f674e..2c6f7be36e8a 100644 --- a/trunk/drivers/net/irda/irtty-sir.c +++ b/trunk/drivers/net/irda/irtty-sir.c @@ -434,6 +434,11 @@ static int irtty_ioctl(struct tty_struct *tty, struct file *file, unsigned int c IRDA_ASSERT(dev != NULL, return -1;); switch (cmd) { + case TCGETS: + case TCGETA: + err = n_tty_ioctl(tty, file, cmd, arg); + break; + case IRTTY_IOCTDONGLE: /* this call blocks for completion */ err = sirdev_set_dongle(dev, (IRDA_DONGLE) arg); @@ -449,7 +454,7 @@ static int irtty_ioctl(struct tty_struct *tty, struct file *file, unsigned int c err = -EFAULT; break; default: - err = tty_mode_ioctl(tty, file, cmd, arg); + err = -ENOIOCTLCMD; break; } return err; diff --git a/trunk/drivers/net/phy/marvell.c b/trunk/drivers/net/phy/marvell.c index 035fd41fb61f..d2ede5ff9fff 100644 --- a/trunk/drivers/net/phy/marvell.c +++ b/trunk/drivers/net/phy/marvell.c @@ -265,7 +265,7 @@ static struct phy_driver marvell_drivers[] = { .read_status = &genphy_read_status, .ack_interrupt = &marvell_ack_interrupt, .config_intr = &marvell_config_intr, - .driver = { .owner = THIS_MODULE }, + .driver = {.owner = THIS_MODULE,}, }, { .phy_id = 0x01410c90, @@ -278,7 +278,7 @@ static struct phy_driver marvell_drivers[] = { .read_status = &genphy_read_status, .ack_interrupt = &marvell_ack_interrupt, .config_intr = &marvell_config_intr, - .driver = { .owner = THIS_MODULE }, + .driver = {.owner = THIS_MODULE,}, }, { .phy_id = 0x01410cc0, @@ -291,7 +291,7 @@ static struct phy_driver marvell_drivers[] = { .read_status = &genphy_read_status, .ack_interrupt = &marvell_ack_interrupt, .config_intr = &marvell_config_intr, - .driver = { .owner = THIS_MODULE }, + .driver = {.owner = THIS_MODULE,}, }, { .phy_id = 0x01410cd0, @@ -304,21 +304,8 @@ static struct phy_driver marvell_drivers[] = { .read_status = &genphy_read_status, .ack_interrupt = &marvell_ack_interrupt, .config_intr = &marvell_config_intr, - .driver = { .owner = THIS_MODULE }, - }, - { - .phy_id = 0x01410e30, - .phy_id_mask = 0xfffffff0, - .name = "Marvell 88E1240", - .features = PHY_GBIT_FEATURES, - .flags = PHY_HAS_INTERRUPT, - .config_init = &m88e1111_config_init, - .config_aneg = &marvell_config_aneg, - .read_status = &genphy_read_status, - .ack_interrupt = &marvell_ack_interrupt, - .config_intr = &marvell_config_intr, - .driver = { .owner = THIS_MODULE }, - }, + .driver = {.owner = THIS_MODULE,}, + } }; static int __init marvell_init(void) diff --git a/trunk/drivers/net/phy/phy_device.c b/trunk/drivers/net/phy/phy_device.c index f6e484812a98..c0461217b108 100644 --- a/trunk/drivers/net/phy/phy_device.c +++ b/trunk/drivers/net/phy/phy_device.c @@ -706,7 +706,7 @@ int phy_driver_register(struct phy_driver *new_driver) return retval; } - pr_debug("%s: Registered new driver\n", new_driver->name); + pr_info("%s: Registered new driver\n", new_driver->name); return 0; } diff --git a/trunk/drivers/net/ppp_async.c b/trunk/drivers/net/ppp_async.c index 8d278c87ba48..27f5b904f48e 100644 --- a/trunk/drivers/net/ppp_async.c +++ b/trunk/drivers/net/ppp_async.c @@ -309,11 +309,16 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file, err = 0; break; + case TCGETS: + case TCGETA: + err = n_tty_ioctl(tty, file, cmd, arg); + break; + case TCFLSH: /* flush our buffers and the serial port's buffer */ if (arg == TCIOFLUSH || arg == TCOFLUSH) ppp_async_flush_output(ap); - err = tty_perform_flush(tty, arg); + err = n_tty_ioctl(tty, file, cmd, arg); break; case FIONREAD: @@ -324,8 +329,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file, break; default: - /* Try the various mode ioctls */ - err = tty_mode_ioctl(tty, file, cmd, arg); + err = -ENOIOCTLCMD; } ap_put(ap); diff --git a/trunk/drivers/net/ppp_synctty.c b/trunk/drivers/net/ppp_synctty.c index 00e2fb48b4ae..ce64032a465a 100644 --- a/trunk/drivers/net/ppp_synctty.c +++ b/trunk/drivers/net/ppp_synctty.c @@ -349,11 +349,16 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file, err = 0; break; + case TCGETS: + case TCGETA: + err = n_tty_ioctl(tty, file, cmd, arg); + break; + case TCFLSH: /* flush our buffers and the serial port's buffer */ if (arg == TCIOFLUSH || arg == TCOFLUSH) ppp_sync_flush_output(ap); - err = tty_perform_flush(tty, arg); + err = n_tty_ioctl(tty, file, cmd, arg); break; case FIONREAD: @@ -364,8 +369,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file, break; default: - err = tty_mode_ioctl(tty, file, cmd, arg); - break; + err = -ENOIOCTLCMD; } sp_put(ap); diff --git a/trunk/drivers/net/pppol2tp.c b/trunk/drivers/net/pppol2tp.c index a7556cd2df79..f8904fd92369 100644 --- a/trunk/drivers/net/pppol2tp.c +++ b/trunk/drivers/net/pppol2tp.c @@ -488,7 +488,7 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb) { struct pppol2tp_session *session = NULL; struct pppol2tp_tunnel *tunnel; - unsigned char *ptr, *optr; + unsigned char *ptr; u16 hdrflags; u16 tunnel_id, session_id; int length; @@ -496,7 +496,7 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb) tunnel = pppol2tp_sock_to_tunnel(sock); if (tunnel == NULL) - goto no_tunnel; + goto error; /* UDP always verifies the packet length. */ __skb_pull(skb, sizeof(struct udphdr)); @@ -509,7 +509,7 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb) } /* Point to L2TP header */ - optr = ptr = skb->data; + ptr = skb->data; /* Get L2TP header flags */ hdrflags = ntohs(*(__be16*)ptr); @@ -637,14 +637,12 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb) /* If offset bit set, skip it. */ if (hdrflags & L2TP_HDRFLAG_O) { offset = ntohs(*(__be16 *)ptr); - ptr += 2 + offset; + skb->transport_header += 2 + offset; + if (!pskb_may_pull(skb, skb_transport_offset(skb) + 2)) + goto discard; } - offset = ptr - optr; - if (!pskb_may_pull(skb, offset)) - goto discard; - - __skb_pull(skb, offset); + __skb_pull(skb, skb_transport_offset(skb)); /* Skip PPP header, if present. In testing, Microsoft L2TP clients * don't send the PPP header (PPP header compression enabled), but @@ -654,9 +652,6 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb) * Note that skb->data[] isn't dereferenced from a u16 ptr here since * the field may be unaligned. */ - if (!pskb_may_pull(skb, 2)) - goto discard; - if ((skb->data[0] == 0xff) && (skb->data[1] == 0x03)) skb_pull(skb, 2); @@ -714,10 +709,6 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb) return 0; error: - /* Put UDP header back */ - __skb_push(skb, sizeof(struct udphdr)); - -no_tunnel: return 1; } @@ -1059,8 +1050,6 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb) /* Get routing info from the tunnel socket */ dst_release(skb->dst); skb->dst = sk_dst_get(sk_tun); - skb_orphan(skb); - skb->sk = sk_tun; /* Queue the packet to IP for output */ len = skb->len; diff --git a/trunk/drivers/net/rrunner.c b/trunk/drivers/net/rrunner.c index 73a7e6529ee0..b822859c8de3 100644 --- a/trunk/drivers/net/rrunner.c +++ b/trunk/drivers/net/rrunner.c @@ -78,6 +78,12 @@ static char version[] __devinitdata = "rrunner.c: v0.50 11/11/2002 Jes Sorensen * stack will need to know about I/O vectors or something similar. */ +/* + * sysctl_[wr]mem_max are checked at init time to see if they are at + * least 256KB and increased to 256KB if they are not. This is done to + * avoid ending up with socket buffers smaller than the MTU size, + */ + static int __devinit rr_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -555,6 +561,18 @@ static int __devinit rr_init(struct net_device *dev) sram_size = rr_read_eeprom_word(rrpriv, (void *)8); printk(" SRAM size 0x%06x\n", sram_size); + if (sysctl_rmem_max < 262144){ + printk(" Receive socket buffer limit too low (%i), " + "setting to 262144\n", sysctl_rmem_max); + sysctl_rmem_max = 262144; + } + + if (sysctl_wmem_max < 262144){ + printk(" Transmit socket buffer limit too low (%i), " + "setting to 262144\n", sysctl_wmem_max); + sysctl_wmem_max = 262144; + } + return 0; } diff --git a/trunk/drivers/net/slip.c b/trunk/drivers/net/slip.c index 251a3ce376ac..335b7cc80eba 100644 --- a/trunk/drivers/net/slip.c +++ b/trunk/drivers/net/slip.c @@ -1218,8 +1218,14 @@ static int slip_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm return 0; /* VSV changes end */ #endif + + /* Allow stty to read, but not set, the serial port */ + case TCGETS: + case TCGETA: + return n_tty_ioctl(tty, file, cmd, arg); + default: - return tty_mode_ioctl(tty, file, cmd, arg); + return -ENOIOCTLCMD; } } diff --git a/trunk/drivers/net/sunhme.c b/trunk/drivers/net/sunhme.c index c20a3bd21bb2..120c8affe83d 100644 --- a/trunk/drivers/net/sunhme.c +++ b/trunk/drivers/net/sunhme.c @@ -3143,8 +3143,8 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev, dev->irq = pdev->irq; dev->dma = 0; - /* Happy Meal can do it all... except VLAN. */ - dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_VLAN_CHALLENGED; + /* Happy Meal can do it all... */ + dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; #if defined(CONFIG_SBUS) && defined(CONFIG_PCI) /* Hook up PCI register/dma accessors. */ diff --git a/trunk/drivers/net/tg3.c b/trunk/drivers/net/tg3.c index cad519910767..09440d783e65 100644 --- a/trunk/drivers/net/tg3.c +++ b/trunk/drivers/net/tg3.c @@ -7365,6 +7365,10 @@ static int tg3_open(struct net_device *dev) } else if (pci_enable_msi(tp->pdev) == 0) { u32 msi_mode; + /* Hardware bug - MSI won't work if INTX disabled. */ + if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) + pci_intx(tp->pdev, 1); + msi_mode = tr32(MSGINT_MODE); tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE); tp->tg3_flags2 |= TG3_FLG2_USING_MSI; @@ -12677,6 +12681,11 @@ static int tg3_resume(struct pci_dev *pdev) if (err) return err; + /* Hardware bug - MSI won't work if INTX disabled. */ + if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) && + (tp->tg3_flags2 & TG3_FLG2_USING_MSI)) + pci_intx(tp->pdev, 1); + netif_device_attach(dev); tg3_full_lock(tp, 0); diff --git a/trunk/drivers/net/usb/Kconfig b/trunk/drivers/net/usb/Kconfig index a12c9c41b217..5a96d74e4ce8 100644 --- a/trunk/drivers/net/usb/Kconfig +++ b/trunk/drivers/net/usb/Kconfig @@ -93,9 +93,13 @@ config USB_RTL8150 To compile this driver as a module, choose M here: the module will be called rtl8150. +config USB_USBNET_MII + tristate + default n + config USB_USBNET tristate "Multi-purpose USB Networking Framework" - select MII + select MII if USB_USBNET_MII != n ---help--- This driver supports several kinds of network links over USB, with "minidrivers" built around a common network driver core @@ -131,6 +135,7 @@ config USB_NET_AX8817X tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters" depends on USB_USBNET && NET_ETHERNET select CRC32 + select USB_USBNET_MII default y help This option adds support for ASIX AX88xxx based USB 2.0 @@ -185,6 +190,7 @@ config USB_NET_DM9601 tristate "Davicom DM9601 based USB 1.1 10/100 ethernet devices" depends on USB_USBNET select CRC32 + select USB_USBNET_MII help This option adds support for Davicom DM9601 based USB 1.1 10/100 Ethernet adapters. @@ -219,6 +225,7 @@ config USB_NET_PLUSB config USB_NET_MCS7830 tristate "MosChip MCS7830 based Ethernet adapters" depends on USB_USBNET + select USB_USBNET_MII help Choose this option if you're using a 10/100 Ethernet USB2 adapter based on the MosChip 7830 controller. This includes diff --git a/trunk/drivers/net/usb/usbnet.c b/trunk/drivers/net/usb/usbnet.c index 8ed1fc5cbc70..acd5f1c0e63a 100644 --- a/trunk/drivers/net/usb/usbnet.c +++ b/trunk/drivers/net/usb/usbnet.c @@ -683,6 +683,9 @@ static int usbnet_open (struct net_device *net) * they'll probably want to use this base set. */ +#if defined(CONFIG_MII) || defined(CONFIG_MII_MODULE) +#define HAVE_MII + int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd) { struct usbnet *dev = netdev_priv(net); @@ -741,6 +744,8 @@ int usbnet_nway_reset(struct net_device *net) } EXPORT_SYMBOL_GPL(usbnet_nway_reset); +#endif /* HAVE_MII */ + void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) { struct usbnet *dev = netdev_priv(net); @@ -771,10 +776,12 @@ EXPORT_SYMBOL_GPL(usbnet_set_msglevel); /* drivers may override default ethtool_ops in their bind() routine */ static struct ethtool_ops usbnet_ethtool_ops = { +#ifdef HAVE_MII .get_settings = usbnet_get_settings, .set_settings = usbnet_set_settings, .get_link = usbnet_get_link, .nway_reset = usbnet_nway_reset, +#endif .get_drvinfo = usbnet_get_drvinfo, .get_msglevel = usbnet_get_msglevel, .set_msglevel = usbnet_set_msglevel, diff --git a/trunk/drivers/net/wan/x25_asy.c b/trunk/drivers/net/wan/x25_asy.c index 1e89d4de1bb7..c48b1cc63fd5 100644 --- a/trunk/drivers/net/wan/x25_asy.c +++ b/trunk/drivers/net/wan/x25_asy.c @@ -719,8 +719,12 @@ static int x25_asy_ioctl(struct tty_struct *tty, struct file *file, return 0; case SIOCSIFHWADDR: return -EINVAL; + /* Allow stty to read, but not set, the serial port */ + case TCGETS: + case TCGETA: + return n_tty_ioctl(tty, file, cmd, arg); default: - return tty_mode_ioctl(tty, file, cmd, arg); + return -ENOIOCTLCMD; } } diff --git a/trunk/drivers/net/wireless/strip.c b/trunk/drivers/net/wireless/strip.c index 88efe1bae58f..4bd14b331862 100644 --- a/trunk/drivers/net/wireless/strip.c +++ b/trunk/drivers/net/wireless/strip.c @@ -2735,8 +2735,16 @@ static int strip_ioctl(struct tty_struct *tty, struct file *file, return -EFAULT; return set_mac_address(strip_info, &addr); } + /* + * Allow stty to read, but not set, the serial port + */ + + case TCGETS: + case TCGETA: + return n_tty_ioctl(tty, file, cmd, arg); + break; default: - return tty_mode_ioctl(tty, file, cmd, arg); + return -ENOIOCTLCMD; break; } return 0; diff --git a/trunk/drivers/pci/Kconfig b/trunk/drivers/pci/Kconfig index e1ca42591ac4..7a1d6d512837 100644 --- a/trunk/drivers/pci/Kconfig +++ b/trunk/drivers/pci/Kconfig @@ -21,17 +21,6 @@ config PCI_MSI If you don't know what to do here, say N. -config PCI_LEGACY - bool "Enable deprecated pci_find_* API" - depends on PCI - default y - help - Say Y here if you want to include support for the deprecated - pci_find_slot() and pci_find_device() APIs. Most drivers have - been converted over to using the proper hotplug APIs, so this - option serves to include/exclude only a few drivers that are - still using this API. - config PCI_DEBUG bool "PCI Debugging" depends on PCI && DEBUG_KERNEL diff --git a/trunk/drivers/pci/hotplug/Kconfig b/trunk/drivers/pci/hotplug/Kconfig index a64449d489d6..63d62752fb91 100644 --- a/trunk/drivers/pci/hotplug/Kconfig +++ b/trunk/drivers/pci/hotplug/Kconfig @@ -41,7 +41,7 @@ config HOTPLUG_PCI_FAKE config HOTPLUG_PCI_COMPAQ tristate "Compaq PCI Hotplug driver" - depends on X86 && PCI_BIOS && PCI_LEGACY + depends on X86 && PCI_BIOS help Say Y here if you have a motherboard with a Compaq PCI Hotplug controller. @@ -63,7 +63,7 @@ config HOTPLUG_PCI_COMPAQ_NVRAM config HOTPLUG_PCI_IBM tristate "IBM PCI Hotplug driver" - depends on X86_IO_APIC && X86 && PCI_BIOS && PCI_LEGACY + depends on X86_IO_APIC && X86 && PCI_BIOS help Say Y here if you have a motherboard with a IBM PCI Hotplug controller. @@ -119,7 +119,7 @@ config HOTPLUG_PCI_CPCI_ZT5550 config HOTPLUG_PCI_CPCI_GENERIC tristate "Generic port I/O CompactPCI Hotplug driver" - depends on HOTPLUG_PCI_CPCI && X86 && PCI_LEGACY + depends on HOTPLUG_PCI_CPCI && X86 help Say Y here if you have a CompactPCI system card that exposes the #ENUM hotswap signal as a bit in a system register that can be read through diff --git a/trunk/drivers/pci/hotplug/cpqphp_ctrl.c b/trunk/drivers/pci/hotplug/cpqphp_ctrl.c index 856d57b4d604..3ef0a4875a62 100644 --- a/trunk/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/trunk/drivers/pci/hotplug/cpqphp_ctrl.c @@ -1931,14 +1931,16 @@ void cpqhp_pushbutton_thread(unsigned long slot) return ; } - if (cpqhp_process_SS(ctrl, func) != 0) { - amber_LED_on(ctrl, hp_slot); - green_LED_on(ctrl, hp_slot); - - set_SOGO(ctrl); + if (func != NULL && ctrl != NULL) { + if (cpqhp_process_SS(ctrl, func) != 0) { + amber_LED_on (ctrl, hp_slot); + green_LED_on (ctrl, hp_slot); + + set_SOGO(ctrl); - /* Wait for SOBS to be unset */ - wait_for_ctrl_irq(ctrl); + /* Wait for SOBS to be unset */ + wait_for_ctrl_irq (ctrl); + } } p_slot->state = STATIC_STATE; diff --git a/trunk/drivers/pci/msi.c b/trunk/drivers/pci/msi.c index 07c9f09c856d..87e01615053d 100644 --- a/trunk/drivers/pci/msi.c +++ b/trunk/drivers/pci/msi.c @@ -224,12 +224,6 @@ static struct msi_desc* alloc_msi_entry(void) return entry; } -static void pci_intx_for_msi(struct pci_dev *dev, int enable) -{ - if (!(dev->dev_flags & PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG)) - pci_intx(dev, enable); -} - #ifdef CONFIG_PM static void __pci_restore_msi_state(struct pci_dev *dev) { @@ -243,7 +237,7 @@ static void __pci_restore_msi_state(struct pci_dev *dev) entry = get_irq_msi(dev->irq); pos = entry->msi_attrib.pos; - pci_intx_for_msi(dev, 0); + pci_intx(dev, 0); /* disable intx */ msi_set_enable(dev, 0); write_msi_msg(dev->irq, &entry->msg); if (entry->msi_attrib.maskbit) @@ -266,7 +260,7 @@ static void __pci_restore_msix_state(struct pci_dev *dev) return; /* route the table */ - pci_intx_for_msi(dev, 0); + pci_intx(dev, 0); /* disable intx */ msix_set_enable(dev, 0); list_for_each_entry(entry, &dev->msi_list, list) { @@ -349,7 +343,7 @@ static int msi_capability_init(struct pci_dev *dev) } /* Set MSI enabled bits */ - pci_intx_for_msi(dev, 0); + pci_intx(dev, 0); /* disable intx */ msi_set_enable(dev, 1); dev->msi_enabled = 1; @@ -439,7 +433,7 @@ static int msix_capability_init(struct pci_dev *dev, i++; } /* Set MSI-X enabled bits */ - pci_intx_for_msi(dev, 0); + pci_intx(dev, 0); /* disable intx */ msix_set_enable(dev, 1); dev->msix_enabled = 1; @@ -534,7 +528,7 @@ void pci_disable_msi(struct pci_dev* dev) return; msi_set_enable(dev, 0); - pci_intx_for_msi(dev, 1); + pci_intx(dev, 1); /* enable intx */ dev->msi_enabled = 0; BUG_ON(list_empty(&dev->msi_list)); @@ -646,7 +640,7 @@ void pci_disable_msix(struct pci_dev* dev) return; msix_set_enable(dev, 0); - pci_intx_for_msi(dev, 1); + pci_intx(dev, 1); /* enable intx */ dev->msix_enabled = 0; msix_free_all_irqs(dev); diff --git a/trunk/drivers/pci/pci-driver.c b/trunk/drivers/pci/pci-driver.c index 6d1a21611818..6e2760b6c20a 100644 --- a/trunk/drivers/pci/pci-driver.c +++ b/trunk/drivers/pci/pci-driver.c @@ -143,8 +143,8 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, * system is in its list of supported devices. Returns the matching * pci_device_id structure or %NULL if there is no match. */ -static const struct pci_device_id *pci_match_device(struct pci_driver *drv, - struct pci_dev *dev) +const struct pci_device_id *pci_match_device(struct pci_driver *drv, + struct pci_dev *dev) { struct pci_dynid *dynid; @@ -559,6 +559,7 @@ static int __init pci_driver_init(void) postcore_initcall(pci_driver_init); EXPORT_SYMBOL(pci_match_id); +EXPORT_SYMBOL(pci_match_device); EXPORT_SYMBOL(__pci_register_driver); EXPORT_SYMBOL(pci_unregister_driver); EXPORT_SYMBOL(pci_dev_driver); diff --git a/trunk/drivers/pci/quirks.c b/trunk/drivers/pci/quirks.c index 26cc4dcf4f0e..d0bb5b9d2120 100644 --- a/trunk/drivers/pci/quirks.c +++ b/trunk/drivers/pci/quirks.c @@ -1621,8 +1621,12 @@ static void __init quirk_disable_all_msi(struct pci_dev *dev) printk(KERN_WARNING "PCI: MSI quirk detected. MSI deactivated.\n"); } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX, quirk_disable_all_msi); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RD580, quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RX790, quirk_disable_all_msi); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS690, quirk_disable_all_msi); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); /* Disable MSI on chipsets that are known to not support it */ @@ -1674,9 +1678,6 @@ static void __devinit quirk_msi_ht_cap(struct pci_dev *dev) } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE, quirk_msi_ht_cap); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, - PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB, - quirk_msi_ht_cap); /* The nVidia CK804 chipset may have 2 HT MSI mappings. * MSI are supported if the MSI capability set in any of these mappings. @@ -1704,48 +1705,4 @@ static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev) } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, quirk_nvidia_ck804_msi_ht_cap); - -static void __devinit quirk_msi_intx_disable_bug(struct pci_dev *dev) -{ - dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG; -} -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5780, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5780S, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5714, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5714S, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5715, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, - PCI_DEVICE_ID_TIGON3_5715S, - quirk_msi_intx_disable_bug); - -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4390, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4391, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4392, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4393, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4394, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4395, - quirk_msi_intx_disable_bug); - -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4373, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4374, - quirk_msi_intx_disable_bug); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375, - quirk_msi_intx_disable_bug); - #endif /* CONFIG_PCI_MSI */ diff --git a/trunk/drivers/pci/search.c b/trunk/drivers/pci/search.c index 8541034021f0..b001b5922e33 100644 --- a/trunk/drivers/pci/search.c +++ b/trunk/drivers/pci/search.c @@ -113,8 +113,6 @@ pci_find_next_bus(const struct pci_bus *from) return b; } -#ifdef CONFIG_PCI_LEGACY - /** * pci_find_slot - locate PCI device from a given PCI slot * @bus: number of PCI bus on which desired PCI device resides @@ -139,8 +137,6 @@ pci_find_slot(unsigned int bus, unsigned int devfn) return NULL; } -#endif /* CONFIG_PCI_LEGACY */ - /** * pci_get_slot - locate PCI device for a given PCI slot * @bus: PCI bus on which desired PCI device resides @@ -204,7 +200,6 @@ struct pci_dev * pci_get_bus_and_slot(unsigned int bus, unsigned int devfn) return NULL; } -#ifdef CONFIG_PCI_LEGACY /** * pci_find_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id * @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids @@ -283,7 +278,6 @@ pci_find_device(unsigned int vendor, unsigned int device, const struct pci_dev * { return pci_find_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from); } -#endif /* CONFIG_PCI_LEGACY */ /** * pci_get_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id @@ -474,11 +468,8 @@ int pci_dev_present(const struct pci_device_id *ids) EXPORT_SYMBOL(pci_dev_present); EXPORT_SYMBOL(pci_find_present); -#ifdef CONFIG_PCI_LEGACY EXPORT_SYMBOL(pci_find_device); EXPORT_SYMBOL(pci_find_slot); -#endif /* CONFIG_PCI_LEGACY */ - /* For boot time work */ EXPORT_SYMBOL(pci_find_bus); EXPORT_SYMBOL(pci_find_next_bus); diff --git a/trunk/drivers/rtc/rtc-m48t59.c b/trunk/drivers/rtc/rtc-m48t59.c index 2bad1637330a..bf60d35f580b 100644 --- a/trunk/drivers/rtc/rtc-m48t59.c +++ b/trunk/drivers/rtc/rtc-m48t59.c @@ -464,7 +464,7 @@ static int __devexit m48t59_rtc_remove(struct platform_device *pdev) return 0; } -static struct platform_driver m48t59_rtc_driver = { +static struct platform_driver m48t59_rtc_platdrv = { .driver = { .name = "rtc-m48t59", .owner = THIS_MODULE, @@ -475,12 +475,12 @@ static struct platform_driver m48t59_rtc_driver = { static int __init m48t59_rtc_init(void) { - return platform_driver_register(&m48t59_rtc_driver); + return platform_driver_register(&m48t59_rtc_platdrv); } static void __exit m48t59_rtc_exit(void) { - platform_driver_unregister(&m48t59_rtc_driver); + platform_driver_unregister(&m48t59_rtc_platdrv); } module_init(m48t59_rtc_init); diff --git a/trunk/drivers/s390/block/dcssblk.c b/trunk/drivers/s390/block/dcssblk.c index 5e083d1f57e7..859f870552e3 100644 --- a/trunk/drivers/s390/block/dcssblk.c +++ b/trunk/drivers/s390/block/dcssblk.c @@ -193,12 +193,6 @@ dcssblk_segment_warn(int rc, char* seg_name) } } -static void dcssblk_unregister_callback(struct device *dev) -{ - device_unregister(dev); - put_device(dev); -} - /* * device attribute for switching shared/nonshared (exclusive) * operation (show + store) @@ -282,7 +276,8 @@ dcssblk_shared_store(struct device *dev, struct device_attribute *attr, const ch blk_cleanup_queue(dev_info->dcssblk_queue); dev_info->gd->queue = NULL; put_disk(dev_info->gd); - rc = device_schedule_callback(dev, dcssblk_unregister_callback); + device_unregister(dev); + put_device(dev); out: up_write(&dcssblk_devices_sem); return rc; diff --git a/trunk/drivers/s390/cio/cmf.c b/trunk/drivers/s390/cio/cmf.c index f4c132ab39ed..725b0dd14269 100644 --- a/trunk/drivers/s390/cio/cmf.c +++ b/trunk/drivers/s390/cio/cmf.c @@ -343,10 +343,10 @@ static int cmf_copy_block(struct ccw_device *cdev) if (sch->schib.scsw.fctl & SCSW_FCTL_START_FUNC) { /* Don't copy if a start function is in progress. */ - if ((!(sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED)) && + if ((!sch->schib.scsw.actl & SCSW_ACTL_SUSPENDED) && (sch->schib.scsw.actl & (SCSW_ACTL_DEVACT | SCSW_ACTL_SCHACT)) && - (!(sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS))) + (!sch->schib.scsw.stctl & SCSW_STCTL_SEC_STATUS)) return -EBUSY; } cmb_data = cdev->private->cmb; diff --git a/trunk/drivers/s390/cio/device.c b/trunk/drivers/s390/cio/device.c index 74f6b539974a..7ee57f084a89 100644 --- a/trunk/drivers/s390/cio/device.c +++ b/trunk/drivers/s390/cio/device.c @@ -738,7 +738,7 @@ static int io_subchannel_initialize_dev(struct subchannel *sch, atomic_set(&cdev->private->onoff, 0); cdev->dev.parent = &sch->dev; cdev->dev.release = ccw_device_release; - INIT_WORK(&cdev->private->kick_work, NULL); + INIT_LIST_HEAD(&cdev->private->kick_work.entry); cdev->dev.groups = ccwdev_attr_groups; /* Do first half of device_register. */ device_initialize(&cdev->dev); diff --git a/trunk/drivers/s390/net/smsgiucv.c b/trunk/drivers/s390/net/smsgiucv.c index 47bb47b48581..3ccca5871fdf 100644 --- a/trunk/drivers/s390/net/smsgiucv.c +++ b/trunk/drivers/s390/net/smsgiucv.c @@ -148,10 +148,6 @@ static int __init smsg_init(void) { int rc; - if (!MACHINE_IS_VM) { - rc = -EPROTONOSUPPORT; - goto out; - } rc = driver_register(&smsg_driver); if (rc != 0) goto out; diff --git a/trunk/drivers/scsi/Kconfig b/trunk/drivers/scsi/Kconfig index a6676be87843..86cf10efb0c1 100644 --- a/trunk/drivers/scsi/Kconfig +++ b/trunk/drivers/scsi/Kconfig @@ -725,7 +725,7 @@ config SCSI_FD_MCS config SCSI_GDTH tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support" - depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API && PCI_LEGACY + depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API ---help--- Formerly called GDT SCSI Disk Array Controller Support. diff --git a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c index 5f2396c03958..22d91ee173c5 100644 --- a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -556,7 +556,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, unsigned long timeout) { u64 *crq_as_u64 = (u64 *) &evt_struct->crq; - int request_status = 0; + int request_status; int rc; /* If we have exhausted our request limit, just fail this request, @@ -574,13 +574,6 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, if (request_status < -1) goto send_error; /* Otherwise, we may have run out of requests. */ - /* If request limit was 0 when we started the adapter is in the - * process of performing a login with the server adapter, or - * we may have run out of requests. - */ - else if (request_status == -1 && - evt_struct->iu.srp.login_req.opcode != SRP_LOGIN_REQ) - goto send_busy; /* Abort and reset calls should make it through. * Nothing except abort and reset should use the last two * slots unless we had two or less to begin with. @@ -640,8 +633,7 @@ static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct, unmap_cmd_data(&evt_struct->iu.srp.cmd, evt_struct, hostdata->dev); free_event_struct(&hostdata->pool, evt_struct); - if (request_status != -1) - atomic_inc(&hostdata->request_limit); + atomic_inc(&hostdata->request_limit); return SCSI_MLQUEUE_HOST_BUSY; send_error: @@ -935,11 +927,10 @@ static int send_srp_login(struct ibmvscsi_host_data *hostdata) login->req_buf_fmt = SRP_BUF_FORMAT_DIRECT | SRP_BUF_FORMAT_INDIRECT; spin_lock_irqsave(hostdata->host->host_lock, flags); - /* Start out with a request limit of 0, since this is negotiated in - * the login request we are just sending and login requests always - * get sent by the driver regardless of request_limit. + /* Start out with a request limit of 1, since this is negotiated in + * the login request we are just sending */ - atomic_set(&hostdata->request_limit, 0); + atomic_set(&hostdata->request_limit, 1); rc = ibmvscsi_send_srp_event(evt_struct, hostdata, init_timeout * 2); spin_unlock_irqrestore(hostdata->host->host_lock, flags); diff --git a/trunk/drivers/scsi/lpfc/lpfc_scsi.c b/trunk/drivers/scsi/lpfc/lpfc_scsi.c index 4e46045dea6d..c0755565fae9 100644 --- a/trunk/drivers/scsi/lpfc/lpfc_scsi.c +++ b/trunk/drivers/scsi/lpfc/lpfc_scsi.c @@ -682,7 +682,6 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, IOCB_t *iocb_cmd = &lpfc_cmd->cur_iocbq.iocb; struct lpfc_iocbq *piocbq = &(lpfc_cmd->cur_iocbq); int datadir = scsi_cmnd->sc_data_direction; - char tag[2]; lpfc_cmd->fcp_rsp->rspSnsLen = 0; /* clear task management bits */ @@ -693,8 +692,8 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, memcpy(&fcp_cmnd->fcpCdb[0], scsi_cmnd->cmnd, 16); - if (scsi_populate_tag_msg(scsi_cmnd, tag)) { - switch (tag[0]) { + if (scsi_cmnd->device->tagged_supported) { + switch (scsi_cmnd->tag) { case HEAD_OF_QUEUE_TAG: fcp_cmnd->fcpCntl1 = HEAD_OF_Q; break; diff --git a/trunk/drivers/scsi/osst.c b/trunk/drivers/scsi/osst.c index abef7048f25b..4652ad22516b 100644 --- a/trunk/drivers/scsi/osst.c +++ b/trunk/drivers/scsi/osst.c @@ -593,11 +593,10 @@ static int osst_verify_frame(struct osst_tape * STp, int frame_seq_number, int q if (aux->frame_type != OS_FRAME_TYPE_DATA && aux->frame_type != OS_FRAME_TYPE_EOD && aux->frame_type != OS_FRAME_TYPE_MARKER) { - if (!quiet) { + if (!quiet) #if DEBUG printk(OSST_DEB_MSG "%s:D: Skipping frame, frame type %x\n", name, aux->frame_type); #endif - } goto err_out; } if (aux->frame_type == OS_FRAME_TYPE_EOD && @@ -607,12 +606,11 @@ static int osst_verify_frame(struct osst_tape * STp, int frame_seq_number, int q goto err_out; } if (frame_seq_number != -1 && ntohl(aux->frame_seq_num) != frame_seq_number) { - if (!quiet) { + if (!quiet) #if DEBUG printk(OSST_DEB_MSG "%s:D: Skipping frame, sequence number %u (expected %d)\n", name, ntohl(aux->frame_seq_num), frame_seq_number); #endif - } goto err_out; } if (aux->frame_type == OS_FRAME_TYPE_MARKER) { diff --git a/trunk/drivers/serial/8250_early.c b/trunk/drivers/serial/8250_early.c index 1f16de719962..4d4c9f01be8d 100644 --- a/trunk/drivers/serial/8250_early.c +++ b/trunk/drivers/serial/8250_early.c @@ -76,7 +76,7 @@ static void __init wait_for_xmitr(struct uart_port *port) } } -static void __init serial_putc(struct uart_port *port, int c) +static void __init putc(struct uart_port *port, int c) { wait_for_xmitr(port); serial_out(port, UART_TX, c); @@ -91,7 +91,7 @@ static void __init early_serial8250_write(struct console *console, const char *s ier = serial_in(port, UART_IER); serial_out(port, UART_IER, 0); - uart_console_write(port, s, count, serial_putc); + uart_console_write(port, s, count, putc); /* Wait for transmitter to become empty and restore the IER */ wait_for_xmitr(port); diff --git a/trunk/drivers/serial/8250_pci.c b/trunk/drivers/serial/8250_pci.c index ceb03c9e749f..0e357562ce9e 100644 --- a/trunk/drivers/serial/8250_pci.c +++ b/trunk/drivers/serial/8250_pci.c @@ -1986,7 +1986,6 @@ static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state) static int pciserial_resume_one(struct pci_dev *dev) { - int err; struct serial_private *priv = pci_get_drvdata(dev); pci_set_power_state(dev, PCI_D0); @@ -1996,9 +1995,7 @@ static int pciserial_resume_one(struct pci_dev *dev) /* * The device may have been disabled. Re-enable it. */ - err = pci_enable_device(dev); - if (err) - return err; + pci_enable_device(dev); pciserial_resume_ports(priv); } diff --git a/trunk/drivers/serial/uartlite.c b/trunk/drivers/serial/uartlite.c index a85f2d31a686..dfef83f14960 100644 --- a/trunk/drivers/serial/uartlite.c +++ b/trunk/drivers/serial/uartlite.c @@ -329,14 +329,12 @@ static struct uart_ops ulite_ops = { static void ulite_console_wait_tx(struct uart_port *port) { int i; - u8 val; - /* Spin waiting for TX fifo to have space available */ - for (i = 0; i < 100000; i++) { - val = readb(port->membase + ULITE_STATUS); - if ((val & ULITE_STATUS_TXFULL) == 0) + /* wait up to 10ms for the character(s) to be sent */ + for (i = 0; i < 10000; i++) { + if (readb(port->membase + ULITE_STATUS) & ULITE_STATUS_TXEMPTY) break; - cpu_relax(); + udelay(1); } } diff --git a/trunk/drivers/telephony/phonedev.c b/trunk/drivers/telephony/phonedev.c index bcea8d9b718c..4d8c2a5b3297 100644 --- a/trunk/drivers/telephony/phonedev.c +++ b/trunk/drivers/telephony/phonedev.c @@ -120,8 +120,9 @@ int phone_register_device(struct phone_device *p, int unit) void phone_unregister_device(struct phone_device *pfd) { mutex_lock(&phone_lock); - if (likely(phone_device[pfd->minor] == pfd)) - phone_device[pfd->minor] = NULL; + if (phone_device[pfd->minor] != pfd) + panic("phone: bad unregister"); + phone_device[pfd->minor] = NULL; mutex_unlock(&phone_lock); } diff --git a/trunk/fs/9p/v9fs.c b/trunk/fs/9p/v9fs.c index fbb12dadba83..756f7e9beb2e 100644 --- a/trunk/fs/9p/v9fs.c +++ b/trunk/fs/9p/v9fs.c @@ -82,7 +82,7 @@ static match_table_t tokens = { static void v9fs_parse_options(struct v9fs_session_info *v9ses) { - char *options; + char *options = v9ses->options; substring_t args[MAX_OPT_ARGS]; char *p; int option; @@ -96,10 +96,9 @@ static void v9fs_parse_options(struct v9fs_session_info *v9ses) v9ses->cache = 0; v9ses->trans = v9fs_default_trans(); - if (!v9ses->options) + if (!options) return; - options = kstrdup(v9ses->options, GFP_KERNEL); while ((p = strsep(&options, ",")) != NULL) { int token; if (!*p) @@ -170,7 +169,6 @@ static void v9fs_parse_options(struct v9fs_session_info *v9ses) continue; } } - kfree(options); } /** diff --git a/trunk/fs/9p/vfs_super.c b/trunk/fs/9p/vfs_super.c index 678c02f1ae23..bb0cef9a6b8a 100644 --- a/trunk/fs/9p/vfs_super.c +++ b/trunk/fs/9p/vfs_super.c @@ -119,7 +119,6 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, P9_DPRINTK(P9_DEBUG_VFS, " \n"); - st = NULL; v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL); if (!v9ses) return -ENOMEM; @@ -165,12 +164,10 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags, root->d_inode->i_ino = v9fs_qid2ino(&st->qid); v9fs_stat2inode(st, root->d_inode, sb); v9fs_fid_add(root, fid); - kfree(st); return simple_set_mnt(mnt, sb); error: - kfree(st); if (fid) p9_client_clunk(fid); diff --git a/trunk/fs/afs/vlocation.c b/trunk/fs/afs/vlocation.c index 849fc3160cb5..7b4bbe48112d 100644 --- a/trunk/fs/afs/vlocation.c +++ b/trunk/fs/afs/vlocation.c @@ -382,7 +382,7 @@ struct afs_vlocation *afs_vlocation_lookup(struct afs_cell *cell, cell->name, key_serial(key), (int) namesz, (int) namesz, name, namesz); - if (namesz >= sizeof(vl->vldb.name)) { + if (namesz > sizeof(vl->vldb.name)) { _leave(" = -ENAMETOOLONG"); return ERR_PTR(-ENAMETOOLONG); } diff --git a/trunk/fs/dlm/lowcomms.c b/trunk/fs/dlm/lowcomms.c index e9923ca9c2d9..58bf3f5cdbe2 100644 --- a/trunk/fs/dlm/lowcomms.c +++ b/trunk/fs/dlm/lowcomms.c @@ -1062,7 +1062,7 @@ static int sctp_listen_for_all(void) subscribe.sctp_shutdown_event = 1; subscribe.sctp_partial_delivery_event = 1; - result = kernel_setsockopt(sock, SOL_SOCKET, SO_RCVBUFFORCE, + result = kernel_setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&bufsize, sizeof(bufsize)); if (result) log_print("Error increasing buffer space on socket %d", result); @@ -1454,6 +1454,10 @@ int dlm_lowcomms_start(void) if (!con_cache) goto out; + /* Set some sysctl minima */ + if (sysctl_rmem_max < NEEDED_RMEM) + sysctl_rmem_max = NEEDED_RMEM; + /* Start listening */ if (dlm_config.ci_protocol == 0) error = tcp_listen_for_all(); diff --git a/trunk/fs/ecryptfs/crypto.c b/trunk/fs/ecryptfs/crypto.c index bbed2fd40fdc..9d70289f7df3 100644 --- a/trunk/fs/ecryptfs/crypto.c +++ b/trunk/fs/ecryptfs/crypto.c @@ -115,29 +115,11 @@ static int ecryptfs_calculate_md5(char *dst, } crypt_stat->hash_tfm = desc.tfm; } - rc = crypto_hash_init(&desc); - if (rc) { - printk(KERN_ERR - "%s: Error initializing crypto hash; rc = [%d]\n", - __FUNCTION__, rc); - goto out; - } - rc = crypto_hash_update(&desc, &sg, len); - if (rc) { - printk(KERN_ERR - "%s: Error updating crypto hash; rc = [%d]\n", - __FUNCTION__, rc); - goto out; - } - rc = crypto_hash_final(&desc, dst); - if (rc) { - printk(KERN_ERR - "%s: Error finalizing crypto hash; rc = [%d]\n", - __FUNCTION__, rc); - goto out; - } -out: + crypto_hash_init(&desc); + crypto_hash_update(&desc, &sg, len); + crypto_hash_final(&desc, dst); mutex_unlock(&crypt_stat->cs_hash_tfm_mutex); +out: return rc; } @@ -522,6 +504,7 @@ int ecryptfs_encrypt_page(struct page *page) "\n", rc); goto out; } + extent_offset++; } out: kfree(enc_extent_virt); @@ -657,6 +640,7 @@ int ecryptfs_decrypt_page(struct page *page) "rc = [%d]\n", __FUNCTION__, rc); goto out; } + extent_offset++; } out: kfree(enc_extent_virt); diff --git a/trunk/fs/ioprio.c b/trunk/fs/ioprio.c index e4e01bc7f338..d6ff77e8e7ec 100644 --- a/trunk/fs/ioprio.c +++ b/trunk/fs/ioprio.c @@ -78,10 +78,6 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio) if (!capable(CAP_SYS_ADMIN)) return -EPERM; break; - case IOPRIO_CLASS_NONE: - if (data) - return -EINVAL; - break; default: return -EINVAL; } diff --git a/trunk/fs/ocfs2/alloc.c b/trunk/fs/ocfs2/alloc.c index ce62c152823d..4ba7f0bdc248 100644 --- a/trunk/fs/ocfs2/alloc.c +++ b/trunk/fs/ocfs2/alloc.c @@ -3946,7 +3946,7 @@ static int __ocfs2_mark_extent_written(struct inode *inode, struct ocfs2_merge_ctxt ctxt; struct ocfs2_extent_list *rightmost_el; - if (!(rec->e_flags & OCFS2_EXT_UNWRITTEN)) { + if (!rec->e_flags & OCFS2_EXT_UNWRITTEN) { ret = -EIO; mlog_errno(ret); goto out; diff --git a/trunk/fs/ocfs2/aops.c b/trunk/fs/ocfs2/aops.c index 556e34ccb005..c69c1b300155 100644 --- a/trunk/fs/ocfs2/aops.c +++ b/trunk/fs/ocfs2/aops.c @@ -728,27 +728,6 @@ static void ocfs2_clear_page_regions(struct page *page, kunmap_atomic(kaddr, KM_USER0); } -/* - * Nonsparse file systems fully allocate before we get to the write - * code. This prevents ocfs2_write() from tagging the write as an - * allocating one, which means ocfs2_map_page_blocks() might try to - * read-in the blocks at the tail of our file. Avoid reading them by - * testing i_size against each block offset. - */ -static int ocfs2_should_read_blk(struct inode *inode, struct page *page, - unsigned int block_start) -{ - u64 offset = page_offset(page) + block_start; - - if (ocfs2_sparse_alloc(OCFS2_SB(inode->i_sb))) - return 1; - - if (i_size_read(inode) > offset) - return 1; - - return 0; -} - /* * Some of this taken from block_prepare_write(). We already have our * mapping by now though, and the entire write will be allocating or @@ -802,7 +781,6 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno, set_buffer_uptodate(bh); } else if (!buffer_uptodate(bh) && !buffer_delay(bh) && !buffer_new(bh) && - ocfs2_should_read_blk(inode, page, block_start) && (block_start < from || block_end > to)) { ll_rw_block(READ, 1, &bh); *wait_bh++=bh; diff --git a/trunk/fs/ocfs2/cluster/heartbeat.c b/trunk/fs/ocfs2/cluster/heartbeat.c index f02ccb34604d..9cc7c0418b70 100644 --- a/trunk/fs/ocfs2/cluster/heartbeat.c +++ b/trunk/fs/ocfs2/cluster/heartbeat.c @@ -267,7 +267,7 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg, current_page = cs / spp; page = reg->hr_slot_data[current_page]; - vec_len = min(PAGE_CACHE_SIZE - vec_start, + vec_len = min(PAGE_CACHE_SIZE, (max_slots-cs) * (PAGE_CACHE_SIZE/spp) ); mlog(ML_HB_BIO, "page %d, vec_len = %u, vec_start = %u\n", diff --git a/trunk/fs/ocfs2/dcache.c b/trunk/fs/ocfs2/dcache.c index 1957a5ed219e..3094ddb7a254 100644 --- a/trunk/fs/ocfs2/dcache.c +++ b/trunk/fs/ocfs2/dcache.c @@ -318,9 +318,9 @@ int ocfs2_dentry_attach_lock(struct dentry *dentry, static void ocfs2_drop_dentry_lock(struct ocfs2_super *osb, struct ocfs2_dentry_lock *dl) { - iput(dl->dl_inode); ocfs2_simple_drop_lockres(osb, &dl->dl_lockres); ocfs2_lock_res_free(&dl->dl_lockres); + iput(dl->dl_inode); kfree(dl); } diff --git a/trunk/fs/ocfs2/dir.c b/trunk/fs/ocfs2/dir.c index 63b28fdceb4a..6a2f143e269c 100644 --- a/trunk/fs/ocfs2/dir.c +++ b/trunk/fs/ocfs2/dir.c @@ -208,9 +208,9 @@ static struct buffer_head *ocfs2_find_entry_id(const char *name, return NULL; } -static struct buffer_head *ocfs2_find_entry_el(const char *name, int namelen, - struct inode *dir, - struct ocfs2_dir_entry **res_dir) +struct buffer_head *ocfs2_find_entry_el(const char *name, int namelen, + struct inode *dir, + struct ocfs2_dir_entry **res_dir) { struct super_block *sb; struct buffer_head *bh_use[NAMEI_RA_SIZE]; diff --git a/trunk/fs/ocfs2/dlmglue.c b/trunk/fs/ocfs2/dlmglue.c index 4e97dcceaf8f..41c76ff2fcfb 100644 --- a/trunk/fs/ocfs2/dlmglue.c +++ b/trunk/fs/ocfs2/dlmglue.c @@ -670,7 +670,7 @@ static inline void ocfs2_generic_handle_attach_action(struct ocfs2_lock_res *loc { mlog_entry_void(); - BUG_ON((!(lockres->l_flags & OCFS2_LOCK_BUSY))); + BUG_ON((!lockres->l_flags & OCFS2_LOCK_BUSY)); BUG_ON(lockres->l_flags & OCFS2_LOCK_ATTACHED); if (lockres->l_requested > LKM_NLMODE && @@ -980,6 +980,18 @@ static int ocfs2_cluster_lock(struct ocfs2_super *osb, goto unlock; } + if (!(lockres->l_flags & OCFS2_LOCK_ATTACHED)) { + /* lock has not been created yet. */ + spin_unlock_irqrestore(&lockres->l_lock, flags); + + ret = ocfs2_lock_create(osb, lockres, LKM_NLMODE, 0); + if (ret < 0) { + mlog_errno(ret); + goto out; + } + goto again; + } + if (lockres->l_flags & OCFS2_LOCK_BLOCKED && !ocfs2_may_continue_on_blocked_lock(lockres, level)) { /* is the lock is currently blocked on behalf of @@ -994,14 +1006,7 @@ static int ocfs2_cluster_lock(struct ocfs2_super *osb, mlog(ML_ERROR, "lockres %s has action %u pending\n", lockres->l_name, lockres->l_action); - if (!(lockres->l_flags & OCFS2_LOCK_ATTACHED)) { - lockres->l_action = OCFS2_AST_ATTACH; - lkm_flags &= ~LKM_CONVERT; - } else { - lockres->l_action = OCFS2_AST_CONVERT; - lkm_flags |= LKM_CONVERT; - } - + lockres->l_action = OCFS2_AST_CONVERT; lockres->l_requested = level; lockres_or_flags(lockres, OCFS2_LOCK_BUSY); spin_unlock_irqrestore(&lockres->l_lock, flags); @@ -1016,7 +1021,7 @@ static int ocfs2_cluster_lock(struct ocfs2_super *osb, status = dlmlock(osb->dlm, level, &lockres->l_lksb, - lkm_flags, + lkm_flags|LKM_CONVERT, lockres->l_name, OCFS2_LOCK_ID_MAX_LEN - 1, ocfs2_locking_ast, diff --git a/trunk/fs/ocfs2/file.c b/trunk/fs/ocfs2/file.c index bbac7cd33e0b..f92fe91ff260 100644 --- a/trunk/fs/ocfs2/file.c +++ b/trunk/fs/ocfs2/file.c @@ -1891,11 +1891,9 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, ssize_t written = 0; size_t ocount; /* original count */ size_t count; /* after file limit checks */ - loff_t old_size, *ppos = &iocb->ki_pos; - u32 old_clusters; + loff_t *ppos = &iocb->ki_pos; struct file *file = iocb->ki_filp; struct inode *inode = file->f_path.dentry->d_inode; - struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); mlog_entry("(0x%p, %u, '%.*s')\n", file, (unsigned int)nr_segs, @@ -1951,13 +1949,6 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, goto relock; } - /* - * To later detect whether a journal commit for sync writes is - * necessary, we sample i_size, and cluster count here. - */ - old_size = i_size_read(inode); - old_clusters = OCFS2_I(inode)->ip_clusters; - /* communicate with ocfs2_dio_end_io */ ocfs2_iocb_set_rw_locked(iocb, rw_level); @@ -1987,21 +1978,6 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, /* buffered aio wouldn't have proper lock coverage today */ BUG_ON(ret == -EIOCBQUEUED && !(file->f_flags & O_DIRECT)); - if ((file->f_flags & O_SYNC && !direct_io) || IS_SYNC(inode)) { - /* - * The generic write paths have handled getting data - * to disk, but since we don't make use of the dirty - * inode list, a manual journal commit is necessary - * here. - */ - if (old_size != i_size_read(inode) || - old_clusters != OCFS2_I(inode)->ip_clusters) { - ret = journal_force_commit(osb->journal->j_journal); - if (ret < 0) - written = ret; - } - } - /* * deep in g_f_a_w_n()->ocfs2_direct_IO we pass in a ocfs2_dio_end_io * function pointer which is called when o_direct io completes so that diff --git a/trunk/fs/ocfs2/namei.c b/trunk/fs/ocfs2/namei.c index 989ac2718587..729259016c18 100644 --- a/trunk/fs/ocfs2/namei.c +++ b/trunk/fs/ocfs2/namei.c @@ -1105,16 +1105,9 @@ static int ocfs2_rename(struct inode *old_dir, goto bail; } - if (!new_de && new_inode) { - /* - * Target was unlinked by another node while we were - * waiting to get to ocfs2_rename(). There isn't - * anything we can do here to help the situation, so - * bubble up the appropriate error. - */ - status = -ENOENT; - goto bail; - } + if (!new_de && new_inode) + mlog(ML_ERROR, "inode %lu does not exist in it's parent " + "directory!", new_inode->i_ino); /* In case we need to overwrite an existing file, we blow it * away first */ diff --git a/trunk/fs/proc/proc_net.c b/trunk/fs/proc/proc_net.c index 153554cf5575..749def054a34 100644 --- a/trunk/fs/proc/proc_net.c +++ b/trunk/fs/proc/proc_net.c @@ -26,6 +26,13 @@ #include "internal.h" +struct proc_dir_entry *proc_net_create(struct net *net, + const char *name, mode_t mode, get_info_t *get_info) +{ + return create_proc_info_entry(name,mode, net->proc_net, get_info); +} +EXPORT_SYMBOL_GPL(proc_net_create); + struct proc_dir_entry *proc_net_fops_create(struct net *net, const char *name, mode_t mode, const struct file_operations *fops) { diff --git a/trunk/include/asm-arm/hardware/iop3xx.h b/trunk/include/asm-arm/hardware/iop3xx.h index fb90b421f31c..ede377ec9147 100644 --- a/trunk/include/asm-arm/hardware/iop3xx.h +++ b/trunk/include/asm-arm/hardware/iop3xx.h @@ -231,7 +231,7 @@ extern int init_atu; IOP3XX_PCI_IO_WINDOW_SIZE - 1) #define IOP3XX_PCI_UPPER_IO_VA (IOP3XX_PCI_LOWER_IO_VA +\ IOP3XX_PCI_IO_WINDOW_SIZE - 1) -#define IOP3XX_PCI_IO_PHYS_TO_VIRT(addr) (((u32) addr -\ +#define IOP3XX_PCI_IO_PHYS_TO_VIRT(addr) (((u32) (addr) -\ IOP3XX_PCI_LOWER_IO_PA) +\ IOP3XX_PCI_LOWER_IO_VA) diff --git a/trunk/include/asm-arm26/irq_regs.h b/trunk/include/asm-arm26/irq_regs.h new file mode 100644 index 000000000000..3dd9c0b70270 --- /dev/null +++ b/trunk/include/asm-arm26/irq_regs.h @@ -0,0 +1 @@ +#include diff --git a/trunk/include/asm-frv/irq.h b/trunk/include/asm-frv/irq.h index 3a66ebd754bd..8fefd6b827aa 100644 --- a/trunk/include/asm-frv/irq.h +++ b/trunk/include/asm-frv/irq.h @@ -12,6 +12,9 @@ #ifndef _ASM_IRQ_H_ #define _ASM_IRQ_H_ +/* this number is used when no interrupt has been assigned */ +#define NO_IRQ (-1) + #define NR_IRQS 48 #define IRQ_BASE_CPU (0 * 16) #define IRQ_BASE_FPGA (1 * 16) diff --git a/trunk/include/asm-m68knommu/unistd.h b/trunk/include/asm-m68knommu/unistd.h index 27c2f9bb4dbd..eb1b566793fe 100644 --- a/trunk/include/asm-m68knommu/unistd.h +++ b/trunk/include/asm-m68knommu/unistd.h @@ -185,8 +185,8 @@ #define __NR_rt_sigtimedwait 177 #define __NR_rt_sigqueueinfo 178 #define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 +#define __NR_pread 180 +#define __NR_pwrite 181 #define __NR_lchown 182 #define __NR_getcwd 183 #define __NR_capget 184 diff --git a/trunk/include/asm-powerpc/commproc.h b/trunk/include/asm-powerpc/commproc.h index a2328b8addd8..0307c84a5c1d 100644 --- a/trunk/include/asm-powerpc/commproc.h +++ b/trunk/include/asm-powerpc/commproc.h @@ -91,7 +91,7 @@ extern uint m8xx_cpm_hostalloc(uint size); extern int m8xx_cpm_hostfree(uint start); extern void m8xx_cpm_hostdump(void); -extern void cpm_load_patch(cpm8xx_t *cp); +extern void cpm_load_patch(volatile immap_t *immr); /* Buffer descriptors used by many of the CPM protocols. */ diff --git a/trunk/include/asm-powerpc/pgtable-ppc32.h b/trunk/include/asm-powerpc/pgtable-ppc32.h index fea2d8ff1e73..86a54a4a8a2a 100644 --- a/trunk/include/asm-powerpc/pgtable-ppc32.h +++ b/trunk/include/asm-powerpc/pgtable-ppc32.h @@ -11,11 +11,6 @@ extern unsigned long va_to_phys(unsigned long address); extern pte_t *va_to_pte(unsigned long address); extern unsigned long ioremap_bot, ioremap_base; - -#ifdef CONFIG_44x -extern int icache_44x_need_flush; -#endif - #endif /* __ASSEMBLY__ */ /* @@ -567,10 +562,6 @@ static inline unsigned long pte_update(pte_t *p, unsigned long clr, : "=&r" (old), "=&r" (tmp), "=m" (*p) : "r" (p), "r" (clr), "r" (set), "m" (*p) : "cc" ); -#ifdef CONFIG_44x - if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) - icache_44x_need_flush = 1; -#endif return old; } #else @@ -591,10 +582,6 @@ static inline unsigned long long pte_update(pte_t *p, unsigned long clr, : "=&r" (old), "=&r" (tmp), "=m" (*p) : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p) : "cc" ); -#ifdef CONFIG_44x - if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) - icache_44x_need_flush = 1; -#endif return old; } #endif diff --git a/trunk/include/asm-powerpc/systbl.h b/trunk/include/asm-powerpc/systbl.h index 11d5383b2f09..cc6d87228258 100644 --- a/trunk/include/asm-powerpc/systbl.h +++ b/trunk/include/asm-powerpc/systbl.h @@ -308,8 +308,8 @@ COMPAT_SYS_SPU(move_pages) SYSCALL_SPU(getcpu) COMPAT_SYS(epoll_pwait) COMPAT_SYS_SPU(utimensat) +COMPAT_SYS(fallocate) COMPAT_SYS_SPU(signalfd) COMPAT_SYS_SPU(timerfd) SYSCALL_SPU(eventfd) COMPAT_SYS_SPU(sync_file_range2) -COMPAT_SYS(fallocate) diff --git a/trunk/include/asm-powerpc/time.h b/trunk/include/asm-powerpc/time.h index 780f82642756..f05895522f7f 100644 --- a/trunk/include/asm-powerpc/time.h +++ b/trunk/include/asm-powerpc/time.h @@ -176,31 +176,25 @@ static inline unsigned int get_dec(void) #endif } -/* - * Note: Book E and 4xx processors differ from other PowerPC processors - * in when the decrementer generates its interrupt: on the 1 to 0 - * transition for Book E/4xx, but on the 0 to -1 transition for others. - */ static inline void set_dec(int val) { #if defined(CONFIG_40x) mtspr(SPRN_PIT, val); #elif defined(CONFIG_8xx_CPU6) - set_dec_cpu6(val - 1); + set_dec_cpu6(val); #else -#ifndef CONFIG_BOOKE - --val; -#endif #ifdef CONFIG_PPC_ISERIES + int cur_dec; + if (firmware_has_feature(FW_FEATURE_ISERIES) && get_lppaca()->shared_proc) { get_lppaca()->virtual_decr = val; - if (get_dec() > val) + cur_dec = get_dec(); + if (cur_dec > val) HvCall_setVirtualDecr(); - return; - } + } else #endif - mtspr(SPRN_DEC, val); + mtspr(SPRN_DEC, val); #endif /* not 40x or 8xx_CPU6 */ } diff --git a/trunk/include/asm-powerpc/tlbflush.h b/trunk/include/asm-powerpc/tlbflush.h index e7b4c0d298ae..b6b036ccee34 100644 --- a/trunk/include/asm-powerpc/tlbflush.h +++ b/trunk/include/asm-powerpc/tlbflush.h @@ -1,6 +1,5 @@ #ifndef _ASM_POWERPC_TLBFLUSH_H #define _ASM_POWERPC_TLBFLUSH_H - /* * TLB flushing: * @@ -17,6 +16,9 @@ */ #ifdef __KERNEL__ +struct mm_struct; +struct vm_area_struct; + #if defined(CONFIG_4xx) || defined(CONFIG_8xx) || defined(CONFIG_FSL_BOOKE) /* * TLB flushing for software loaded TLB chips @@ -26,9 +28,7 @@ * specific tlbie's */ -#include - -extern void _tlbie(unsigned long address, unsigned int pid); +extern void _tlbie(unsigned long address); #if defined(CONFIG_40x) || defined(CONFIG_8xx) #define _tlbia() asm volatile ("tlbia; sync" : : : "memory") @@ -44,13 +44,13 @@ static inline void flush_tlb_mm(struct mm_struct *mm) static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) { - _tlbie(vmaddr, vma->vm_mm->context.id); + _tlbie(vmaddr); } static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, unsigned long vmaddr) { - _tlbie(vmaddr, vma->vm_mm->context.id); + _tlbie(vmaddr); } static inline void flush_tlb_range(struct vm_area_struct *vma, diff --git a/trunk/include/asm-sparc64/vio.h b/trunk/include/asm-sparc64/vio.h index d4de32f0f8af..f7417e91b170 100644 --- a/trunk/include/asm-sparc64/vio.h +++ b/trunk/include/asm-sparc64/vio.h @@ -8,7 +8,6 @@ #include #include #include -#include #include #include @@ -258,7 +257,8 @@ static inline void *vio_dring_entry(struct vio_dring_state *dr, static inline u32 vio_dring_avail(struct vio_dring_state *dr, unsigned int ring_size) { - BUILD_BUG_ON(!is_power_of_2(ring_size)); + /* Ensure build-time power-of-2. */ + BUILD_BUG_ON(ring_size & (ring_size - 1)); return (dr->pending - ((dr->prod - dr->cons) & (ring_size - 1))); diff --git a/trunk/include/asm-x86/lguest_hcall.h b/trunk/include/asm-x86/lguest_hcall.h index 2091779e91fb..9c5092b6aa9f 100644 --- a/trunk/include/asm-x86/lguest_hcall.h +++ b/trunk/include/asm-x86/lguest_hcall.h @@ -54,6 +54,9 @@ hcall(unsigned long call, } /*:*/ +void async_hcall(unsigned long call, + unsigned long arg1, unsigned long arg2, unsigned long arg3); + /* Can't use our min() macro here: needs to be a constant */ #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) diff --git a/trunk/include/linux/ata.h b/trunk/include/linux/ata.h index 5c4e54a2a8d6..61535e72834d 100644 --- a/trunk/include/linux/ata.h +++ b/trunk/include/linux/ata.h @@ -425,8 +425,6 @@ static inline int ata_id_has_lba48(const u16 *id) { if ((id[83] & 0xC000) != 0x4000) return 0; - if (!ata_id_u64(id, 100)) - return 0; return id[83] & (1 << 10); } @@ -537,15 +535,6 @@ static inline int ata_drive_40wire(const u16 *dev_id) return 1; } -static inline int ata_drive_40wire_relaxed(const u16 *dev_id) -{ - if (ata_id_is_sata(dev_id)) - return 0; /* SATA */ - if ((dev_id[93] & 0x2000) == 0x2000) - return 0; /* 80 wire */ - return 1; -} - static inline int atapi_cdb_len(const u16 *dev_id) { u16 tmp = dev_id[0] & 0x3; diff --git a/trunk/include/linux/blkdev.h b/trunk/include/linux/blkdev.h index d18ee67b40f8..8396db24d019 100644 --- a/trunk/include/linux/blkdev.h +++ b/trunk/include/linux/blkdev.h @@ -697,7 +697,6 @@ extern int blk_execute_rq(struct request_queue *, struct gendisk *, extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, struct request *, int, rq_end_io_fn *); extern int blk_verify_command(unsigned char *, int); -extern void blk_unplug(struct request_queue *q); static inline struct request_queue *bdev_get_queue(struct block_device *bdev) { diff --git a/trunk/include/linux/futex.h b/trunk/include/linux/futex.h index 92d420fe03f8..99650353adfa 100644 --- a/trunk/include/linux/futex.h +++ b/trunk/include/linux/futex.h @@ -149,6 +149,10 @@ union futex_key { int offset; } both; }; +int get_futex_key(u32 __user *uaddr, struct rw_semaphore *shared, + union futex_key *key); +void get_futex_key_refs(union futex_key *key); +void drop_futex_key_refs(union futex_key *key); #ifdef CONFIG_FUTEX extern void exit_robust_list(struct task_struct *curr); diff --git a/trunk/include/linux/ide.h b/trunk/include/linux/ide.h index dc75ccbcf991..4ed4777bba67 100644 --- a/trunk/include/linux/ide.h +++ b/trunk/include/linux/ide.h @@ -1031,7 +1031,14 @@ ide_startstop_t __ide_abort(ide_drive_t *, struct request *); extern ide_startstop_t ide_abort(ide_drive_t *, const char *); extern void ide_fix_driveid(struct hd_driveid *); - +/* + * ide_fixstring() cleans up and (optionally) byte-swaps a text string, + * removing leading/trailing blanks and compressing internal blanks. + * It is primarily used to tidy up the model name/number fields as + * returned by the WIN_[P]IDENTIFY commands. + * + * (s, bytecount, byteswap) + */ extern void ide_fixstring(u8 *, const int, const int); int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); diff --git a/trunk/include/linux/kallsyms.h b/trunk/include/linux/kallsyms.h index 82de2fb62cb7..f73de6fb5c68 100644 --- a/trunk/include/linux/kallsyms.h +++ b/trunk/include/linux/kallsyms.h @@ -6,7 +6,6 @@ #define _LINUX_KALLSYMS_H #include -#include #define KSYM_NAME_LEN 128 #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \ diff --git a/trunk/include/linux/libata.h b/trunk/include/linux/libata.h index 56a5673aebad..1e277852ba42 100644 --- a/trunk/include/linux/libata.h +++ b/trunk/include/linux/libata.h @@ -339,7 +339,6 @@ enum { ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ - ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ /* DMA mask for user DMA control: User visible values; DO NOT renumber */ diff --git a/trunk/include/linux/mroute.h b/trunk/include/linux/mroute.h index 35a8277ec1bd..7da2cee8e132 100644 --- a/trunk/include/linux/mroute.h +++ b/trunk/include/linux/mroute.h @@ -128,18 +128,6 @@ struct igmpmsg #ifdef __KERNEL__ #include -#ifdef CONFIG_IP_MROUTE -static inline int ip_mroute_opt(int opt) -{ - return (opt >= MRT_BASE) && (opt <= MRT_BASE + 10); -} -#else -static inline int ip_mroute_opt(int opt) -{ - return 0; -} -#endif - extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); diff --git a/trunk/include/linux/netfilter/Kbuild b/trunk/include/linux/netfilter/Kbuild index b87e83a5e070..f2eaea2234ec 100644 --- a/trunk/include/linux/netfilter/Kbuild +++ b/trunk/include/linux/netfilter/Kbuild @@ -4,28 +4,25 @@ header-y += nfnetlink_conntrack.h header-y += nfnetlink_log.h header-y += nfnetlink_queue.h header-y += xt_CLASSIFY.h -header-y += xt_CONNMARK.h -header-y += xt_CONNSECMARK.h -header-y += xt_DSCP.h -header-y += xt_MARK.h -header-y += xt_NFLOG.h -header-y += xt_NFQUEUE.h -header-y += xt_SECMARK.h -header-y += xt_TCPMSS.h header-y += xt_comment.h header-y += xt_connbytes.h header-y += xt_connmark.h +header-y += xt_CONNMARK.h header-y += xt_conntrack.h header-y += xt_dccp.h header-y += xt_dscp.h +header-y += xt_DSCP.h header-y += xt_esp.h -header-y += xt_hashlimit.h header-y += xt_helper.h +header-y += xt_hashlimit.h header-y += xt_length.h header-y += xt_limit.h header-y += xt_mac.h header-y += xt_mark.h +header-y += xt_MARK.h header-y += xt_multiport.h +header-y += xt_NFQUEUE.h +header-y += xt_NFLOG.h header-y += xt_pkttype.h header-y += xt_policy.h header-y += xt_realm.h @@ -35,6 +32,9 @@ header-y += xt_statistic.h header-y += xt_string.h header-y += xt_tcpmss.h header-y += xt_tcpudp.h +header-y += xt_SECMARK.h +header-y += xt_CONNSECMARK.h +header-y += xt_TCPMSS.h unifdef-y += nf_conntrack_common.h unifdef-y += nf_conntrack_ftp.h diff --git a/trunk/include/linux/netfilter_ipv4/Kbuild b/trunk/include/linux/netfilter_ipv4/Kbuild index 3a7105bb8f33..7185792b900f 100644 --- a/trunk/include/linux/netfilter_ipv4/Kbuild +++ b/trunk/include/linux/netfilter_ipv4/Kbuild @@ -1,47 +1,47 @@ -header-y += ipt_CLASSIFY.h -header-y += ipt_CLUSTERIP.h -header-y += ipt_CONNMARK.h -header-y += ipt_DSCP.h -header-y += ipt_ECN.h -header-y += ipt_LOG.h -header-y += ipt_MARK.h -header-y += ipt_NFQUEUE.h -header-y += ipt_REJECT.h -header-y += ipt_SAME.h -header-y += ipt_TCPMSS.h -header-y += ipt_TOS.h -header-y += ipt_TTL.h -header-y += ipt_ULOG.h header-y += ipt_addrtype.h header-y += ipt_ah.h +header-y += ipt_CLASSIFY.h +header-y += ipt_CLUSTERIP.h header-y += ipt_comment.h header-y += ipt_connbytes.h header-y += ipt_connmark.h +header-y += ipt_CONNMARK.h header-y += ipt_conntrack.h header-y += ipt_dccp.h header-y += ipt_dscp.h +header-y += ipt_DSCP.h header-y += ipt_ecn.h +header-y += ipt_ECN.h header-y += ipt_esp.h header-y += ipt_hashlimit.h header-y += ipt_helper.h header-y += ipt_iprange.h header-y += ipt_length.h header-y += ipt_limit.h +header-y += ipt_LOG.h header-y += ipt_mac.h header-y += ipt_mark.h +header-y += ipt_MARK.h header-y += ipt_multiport.h +header-y += ipt_NFQUEUE.h header-y += ipt_owner.h header-y += ipt_physdev.h header-y += ipt_pkttype.h header-y += ipt_policy.h header-y += ipt_realm.h header-y += ipt_recent.h +header-y += ipt_REJECT.h +header-y += ipt_SAME.h header-y += ipt_sctp.h header-y += ipt_state.h header-y += ipt_string.h header-y += ipt_tcpmss.h +header-y += ipt_TCPMSS.h header-y += ipt_tos.h +header-y += ipt_TOS.h header-y += ipt_ttl.h +header-y += ipt_TTL.h +header-y += ipt_ULOG.h unifdef-y += ip_queue.h unifdef-y += ip_tables.h diff --git a/trunk/include/linux/netfilter_ipv6/Kbuild b/trunk/include/linux/netfilter_ipv6/Kbuild index 8887a5fcd1d0..9dd978d149ff 100644 --- a/trunk/include/linux/netfilter_ipv6/Kbuild +++ b/trunk/include/linux/netfilter_ipv6/Kbuild @@ -14,8 +14,8 @@ header-y += ip6t_mark.h header-y += ip6t_multiport.h header-y += ip6t_opts.h header-y += ip6t_owner.h -header-y += ip6t_physdev.h header-y += ip6t_policy.h +header-y += ip6t_physdev.h header-y += ip6t_rt.h unifdef-y += ip6_tables.h diff --git a/trunk/include/linux/netlink.h b/trunk/include/linux/netlink.h index d5bfaba595c7..7c1f3b1d2ee5 100644 --- a/trunk/include/linux/netlink.h +++ b/trunk/include/linux/netlink.h @@ -192,7 +192,7 @@ extern int netlink_unregister_notifier(struct notifier_block *nb); /* finegrained unicast helpers: */ struct sock *netlink_getsockbyfilp(struct file *filp); int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, - long *timeo, struct sock *ssk); + long timeo, struct sock *ssk); void netlink_detachskb(struct sock *sk, struct sk_buff *skb); int netlink_sendskb(struct sock *sk, struct sk_buff *skb); diff --git a/trunk/include/linux/pci.h b/trunk/include/linux/pci.h index 0dd93bb62fbe..5d2281f661f7 100644 --- a/trunk/include/linux/pci.h +++ b/trunk/include/linux/pci.h @@ -109,14 +109,6 @@ enum pcie_reset_state { pcie_hot_reset = (__force pcie_reset_state_t) 3 }; -typedef unsigned short __bitwise pci_dev_flags_t; -enum pci_dev_flags { - /* INTX_DISABLE in PCI_COMMAND register disables MSI - * generation too. - */ - PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1, -}; - typedef unsigned short __bitwise pci_bus_flags_t; enum pci_bus_flags { PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, @@ -193,7 +185,6 @@ struct pci_dev { unsigned int msix_enabled:1; unsigned int is_managed:1; unsigned int is_pcie:1; - pci_dev_flags_t dev_flags; atomic_t enable_cnt; /* pci_enable_device has been called */ u32 saved_config_space[16]; /* config space saved at suspend time */ @@ -488,11 +479,8 @@ extern void pci_sort_breadthfirst(void); /* Generic PCI functions exported to card drivers */ -#ifdef CONFIG_PCI_LEGACY struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn); -#endif /* CONFIG_PCI_LEGACY */ - int pci_find_capability (struct pci_dev *dev, int cap); int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); int pci_find_ext_capability (struct pci_dev *dev, int cap); @@ -634,6 +622,7 @@ static inline int __must_check pci_register_driver(struct pci_driver *driver) void pci_unregister_driver(struct pci_driver *); void pci_remove_behind_bridge(struct pci_dev *); struct pci_driver *pci_dev_driver(const struct pci_dev *); +const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev); const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); @@ -762,6 +751,7 @@ static inline void pci_unregister_driver(struct pci_driver *drv) { } static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } +static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } /* Power management related routines */ static inline int pci_save_state(struct pci_dev *dev) { return 0; } diff --git a/trunk/include/linux/pci_ids.h b/trunk/include/linux/pci_ids.h index fbe19648bf91..e44aac8cf5ff 100644 --- a/trunk/include/linux/pci_ids.h +++ b/trunk/include/linux/pci_ids.h @@ -360,6 +360,9 @@ #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 #define PCI_DEVICE_ID_ATI_RS480 0x5950 +#define PCI_DEVICE_ID_ATI_RD580 0x5952 +#define PCI_DEVICE_ID_ATI_RX790 0x5957 +#define PCI_DEVICE_ID_ATI_RS690 0x7910 /* ATI IXP Chipset */ #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 @@ -1433,8 +1436,8 @@ #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 -#define PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB 0x0036 #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103 +#define PCI_DEVICE_ID_SERVERWORKS_HT1000_PCIX 0x0104 #define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132 #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 diff --git a/trunk/include/linux/proc_fs.h b/trunk/include/linux/proc_fs.h index 1273c6ec535c..1ff461672060 100644 --- a/trunk/include/linux/proc_fs.h +++ b/trunk/include/linux/proc_fs.h @@ -196,6 +196,8 @@ static inline struct proc_dir_entry *create_proc_info_entry(const char *name, return res; } +extern struct proc_dir_entry *proc_net_create(struct net *net, + const char *name, mode_t mode, get_info_t *get_info); extern struct proc_dir_entry *proc_net_fops_create(struct net *net, const char *name, mode_t mode, const struct file_operations *fops); extern void proc_net_remove(struct net *net, const char *name); @@ -206,6 +208,7 @@ extern void proc_net_remove(struct net *net, const char *name); #define proc_bus NULL #define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; }) +#define proc_net_create(net, name, mode, info) ({ (void)(mode), NULL; }) static inline void proc_net_remove(struct net *net, const char *name) {} static inline void proc_flush_task(struct task_struct *task) diff --git a/trunk/include/linux/tty.h b/trunk/include/linux/tty.h index c555f5442bd7..56164d7ba0ad 100644 --- a/trunk/include/linux/tty.h +++ b/trunk/include/linux/tty.h @@ -332,9 +332,7 @@ extern void tty_ldisc_flush(struct tty_struct *tty); extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); -extern int tty_mode_ioctl(struct tty_struct *tty, struct file *file, - unsigned int cmd, unsigned long arg); -extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg); + extern dev_t tty_devnum(struct tty_struct *tty); extern void proc_clear_tty(struct task_struct *p); extern struct tty_struct *get_current_tty(void); diff --git a/trunk/include/net/inet_hashtables.h b/trunk/include/net/inet_hashtables.h index 8461cda37490..4427dcd1e53a 100644 --- a/trunk/include/net/inet_hashtables.h +++ b/trunk/include/net/inet_hashtables.h @@ -37,6 +37,7 @@ * I'll experiment with dynamic table growth later. */ struct inet_ehash_bucket { + rwlock_t lock; struct hlist_head chain; struct hlist_head twchain; }; @@ -99,9 +100,6 @@ struct inet_hashinfo { * TIME_WAIT sockets use a separate chain (twchain). */ struct inet_ehash_bucket *ehash; - rwlock_t *ehash_locks; - unsigned int ehash_size; - unsigned int ehash_locks_mask; /* Ok, let's try this, I give up, we do need a local binding * TCP hash as well as the others for fast bind/connect. @@ -109,7 +107,7 @@ struct inet_hashinfo { struct inet_bind_hashbucket *bhash; unsigned int bhash_size; - /* Note : 4 bytes padding on 64 bit arches */ + unsigned int ehash_size; /* All sockets in TCP_LISTEN state will be in here. This is the only * table where wildcard'd TCP sockets can exist. Hash function here @@ -136,62 +134,6 @@ static inline struct inet_ehash_bucket *inet_ehash_bucket( return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)]; } -static inline rwlock_t *inet_ehash_lockp( - struct inet_hashinfo *hashinfo, - unsigned int hash) -{ - return &hashinfo->ehash_locks[hash & hashinfo->ehash_locks_mask]; -} - -static inline int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo) -{ - unsigned int i, size = 256; -#if defined(CONFIG_PROVE_LOCKING) - unsigned int nr_pcpus = 2; -#else - unsigned int nr_pcpus = num_possible_cpus(); -#endif - if (nr_pcpus >= 4) - size = 512; - if (nr_pcpus >= 8) - size = 1024; - if (nr_pcpus >= 16) - size = 2048; - if (nr_pcpus >= 32) - size = 4096; - if (sizeof(rwlock_t) != 0) { -#ifdef CONFIG_NUMA - if (size * sizeof(rwlock_t) > PAGE_SIZE) - hashinfo->ehash_locks = vmalloc(size * sizeof(rwlock_t)); - else -#endif - hashinfo->ehash_locks = kmalloc(size * sizeof(rwlock_t), - GFP_KERNEL); - if (!hashinfo->ehash_locks) - return ENOMEM; - for (i = 0; i < size; i++) - rwlock_init(&hashinfo->ehash_locks[i]); - } - hashinfo->ehash_locks_mask = size - 1; - return 0; -} - -static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo) -{ - if (hashinfo->ehash_locks) { -#ifdef CONFIG_NUMA - unsigned int size = (hashinfo->ehash_locks_mask + 1) * - sizeof(rwlock_t); - if (size > PAGE_SIZE) - vfree(hashinfo->ehash_locks); - else -#else - kfree(hashinfo->ehash_locks); -#endif - hashinfo->ehash_locks = NULL; - } -} - extern struct inet_bind_bucket * inet_bind_bucket_create(struct kmem_cache *cachep, struct inet_bind_hashbucket *head, @@ -280,7 +222,7 @@ static inline void __inet_hash(struct inet_hashinfo *hashinfo, sk->sk_hash = inet_sk_ehashfn(sk); head = inet_ehash_bucket(hashinfo, sk->sk_hash); list = &head->chain; - lock = inet_ehash_lockp(hashinfo, sk->sk_hash); + lock = &head->lock; write_lock(lock); } __sk_add_node(sk, list); @@ -311,7 +253,7 @@ static inline void inet_unhash(struct inet_hashinfo *hashinfo, struct sock *sk) inet_listen_wlock(hashinfo); lock = &hashinfo->lhash_lock; } else { - lock = inet_ehash_lockp(hashinfo, sk->sk_hash); + lock = &inet_ehash_bucket(hashinfo, sk->sk_hash)->lock; write_lock_bh(lock); } @@ -412,10 +354,9 @@ static inline struct sock * */ unsigned int hash = inet_ehashfn(daddr, hnum, saddr, sport); struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); - rwlock_t *lock = inet_ehash_lockp(hashinfo, hash); prefetch(head->chain.first); - read_lock(lock); + read_lock(&head->lock); sk_for_each(sk, node, &head->chain) { if (INET_MATCH(sk, hash, acookie, saddr, daddr, ports, dif)) goto hit; /* You sunk my battleship! */ @@ -428,7 +369,7 @@ static inline struct sock * } sk = NULL; out: - read_unlock(lock); + read_unlock(&head->lock); return sk; hit: sock_hold(sk); diff --git a/trunk/include/net/ip_fib.h b/trunk/include/net/ip_fib.h index ed514bfb61ba..8cadc77c7df4 100644 --- a/trunk/include/net/ip_fib.h +++ b/trunk/include/net/ip_fib.h @@ -185,12 +185,6 @@ static inline void fib_select_default(const struct flowi *flp, struct fib_result } #else /* CONFIG_IP_MULTIPLE_TABLES */ -extern void __init fib4_rules_init(void); - -#ifdef CONFIG_NET_CLS_ROUTE -extern u32 fib_rules_tclass(struct fib_result *res); -#endif - #define ip_fib_local_table fib_get_table(RT_TABLE_LOCAL) #define ip_fib_main_table fib_get_table(RT_TABLE_MAIN) @@ -220,6 +214,15 @@ extern __be32 __fib_res_prefsrc(struct fib_result *res); /* Exported by fib_hash.c */ extern struct fib_table *fib_hash_init(u32 id); +#ifdef CONFIG_IP_MULTIPLE_TABLES +extern void __init fib4_rules_init(void); + +#ifdef CONFIG_NET_CLS_ROUTE +extern u32 fib_rules_tclass(struct fib_result *res); +#endif + +#endif + static inline void fib_combine_itag(u32 *itag, struct fib_result *res) { #ifdef CONFIG_NET_CLS_ROUTE diff --git a/trunk/include/net/ip_vs.h b/trunk/include/net/ip_vs.h index 67ea2c0c0ab7..41870564df8e 100644 --- a/trunk/include/net/ip_vs.h +++ b/trunk/include/net/ip_vs.h @@ -520,10 +520,6 @@ struct ip_vs_conn { spinlock_t lock; /* lock for state transition */ volatile __u16 flags; /* status flags */ volatile __u16 state; /* state info */ - volatile __u16 old_state; /* old state, to be used for - * state transition triggerd - * synchronization - */ /* Control members */ struct ip_vs_conn *control; /* Master control connection */ @@ -905,10 +901,6 @@ extern int ip_vs_use_count_inc(void); extern void ip_vs_use_count_dec(void); extern int ip_vs_control_init(void); extern void ip_vs_control_cleanup(void); -extern struct ip_vs_dest * -ip_vs_find_dest(__be32 daddr, __be16 dport, - __be32 vaddr, __be16 vport, __u16 protocol); -extern struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp); /* diff --git a/trunk/include/net/sock.h b/trunk/include/net/sock.h index 5504fb9fa88a..20de3fa7ae40 100644 --- a/trunk/include/net/sock.h +++ b/trunk/include/net/sock.h @@ -560,14 +560,6 @@ struct proto { void (*unhash)(struct sock *sk); int (*get_port)(struct sock *sk, unsigned short snum); -#ifdef CONFIG_SMP - /* Keeping track of sockets in use */ - void (*inuse_add)(struct proto *prot, int inc); - int (*inuse_getval)(const struct proto *prot); - int *inuse_ptr; -#else - int inuse; -#endif /* Memory pressure */ void (*enter_memory_pressure)(void); atomic_t *memory_allocated; /* Current allocated memory. */ @@ -600,38 +592,12 @@ struct proto { #ifdef SOCK_REFCNT_DEBUG atomic_t socks; #endif + struct { + int inuse; + u8 __pad[SMP_CACHE_BYTES - sizeof(int)]; + } stats[NR_CPUS]; }; -/* - * Special macros to let protos use a fast version of inuse{get|add} - * using a static percpu variable per proto instead of an allocated one, - * saving one dereference. - * This might be changed if/when dynamic percpu vars become fast. - */ -#ifdef CONFIG_SMP -# define DEFINE_PROTO_INUSE(NAME) \ -static DEFINE_PER_CPU(int, NAME##_inuse); \ -static void NAME##_inuse_add(struct proto *prot, int inc) \ -{ \ - __get_cpu_var(NAME##_inuse) += inc; \ -} \ - \ -static int NAME##_inuse_getval(const struct proto *prot)\ -{ \ - int res = 0, cpu; \ - \ - for_each_possible_cpu(cpu) \ - res += per_cpu(NAME##_inuse, cpu); \ - return res; \ -} -# define REF_PROTO_INUSE(NAME) \ - .inuse_add = NAME##_inuse_add, \ - .inuse_getval = NAME##_inuse_getval, -#else -# define DEFINE_PROTO_INUSE(NAME) -# define REF_PROTO_INUSE(NAME) -#endif - extern int proto_register(struct proto *prot, int alloc_slab); extern void proto_unregister(struct proto *prot); @@ -663,29 +629,12 @@ static inline void sk_refcnt_debug_release(const struct sock *sk) /* Called with local bh disabled */ static __inline__ void sock_prot_inc_use(struct proto *prot) { -#ifdef CONFIG_SMP - prot->inuse_add(prot, 1); -#else - prot->inuse++; -#endif + prot->stats[smp_processor_id()].inuse++; } static __inline__ void sock_prot_dec_use(struct proto *prot) { -#ifdef CONFIG_SMP - prot->inuse_add(prot, -1); -#else - prot->inuse--; -#endif -} - -static __inline__ int sock_prot_inuse(struct proto *proto) -{ -#ifdef CONFIG_SMP - return proto->inuse_getval(proto); -#else - return proto->inuse; -#endif + prot->stats[smp_processor_id()].inuse--; } /* With per-bucket locks this operation is not-atomic, so that diff --git a/trunk/ipc/mqueue.c b/trunk/ipc/mqueue.c index 1e04cd464af9..bfa274ba9ed4 100644 --- a/trunk/ipc/mqueue.c +++ b/trunk/ipc/mqueue.c @@ -1010,8 +1010,6 @@ asmlinkage long sys_mq_notify(mqd_t mqdes, return -EINVAL; } if (notification.sigev_notify == SIGEV_THREAD) { - long timeo; - /* create the notify skb */ nc = alloc_skb(NOTIFY_COOKIE_LEN, GFP_KERNEL); ret = -ENOMEM; @@ -1040,8 +1038,8 @@ asmlinkage long sys_mq_notify(mqd_t mqdes, goto out; } - timeo = MAX_SCHEDULE_TIMEOUT; - ret = netlink_attachskb(sock, nc, 0, &timeo, NULL); + ret = netlink_attachskb(sock, nc, 0, + MAX_SCHEDULE_TIMEOUT, NULL); if (ret == 1) goto retry; if (ret) { diff --git a/trunk/kernel/futex.c b/trunk/kernel/futex.c index 9dc591ab681a..32710451dc20 100644 --- a/trunk/kernel/futex.c +++ b/trunk/kernel/futex.c @@ -181,8 +181,8 @@ static inline int match_futex(union futex_key *key1, union futex_key *key2) * For other futexes, it points to ¤t->mm->mmap_sem and * caller must have taken the reader lock. but NOT any spinlocks. */ -static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared, - union futex_key *key) +int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared, + union futex_key *key) { unsigned long address = (unsigned long)uaddr; struct mm_struct *mm = current->mm; @@ -268,13 +268,14 @@ static int get_futex_key(u32 __user *uaddr, struct rw_semaphore *fshared, } return err; } +EXPORT_SYMBOL_GPL(get_futex_key); /* * Take a reference to the resource addressed by a key. * Can be called while holding spinlocks. * */ -static void get_futex_key_refs(union futex_key *key) +inline void get_futex_key_refs(union futex_key *key) { if (key->both.ptr == 0) return; @@ -287,12 +288,13 @@ static void get_futex_key_refs(union futex_key *key) break; } } +EXPORT_SYMBOL_GPL(get_futex_key_refs); /* * Drop a reference to the resource addressed by a key. * The hash bucket spinlock must not be held. */ -static void drop_futex_key_refs(union futex_key *key) +void drop_futex_key_refs(union futex_key *key) { if (!key->both.ptr) return; @@ -305,6 +307,7 @@ static void drop_futex_key_refs(union futex_key *key) break; } } +EXPORT_SYMBOL_GPL(drop_futex_key_refs); static u32 cmpxchg_futex_value_locked(u32 __user *uaddr, u32 uval, u32 newval) { diff --git a/trunk/kernel/sysctl_check.c b/trunk/kernel/sysctl_check.c index 5a2f2b2bf888..ed6fe51df77a 100644 --- a/trunk/kernel/sysctl_check.c +++ b/trunk/kernel/sysctl_check.c @@ -1432,7 +1432,6 @@ static void set_fail(const char **fail, struct ctl_table *table, const char *str printk(KERN_ERR "sysctl table check failed: "); sysctl_print_path(table); printk(" %s\n", *fail); - dump_stack(); } *fail = str; } diff --git a/trunk/kernel/time/tick-broadcast.c b/trunk/kernel/time/tick-broadcast.c index aa82d7bf478a..8cfb8b2ce773 100644 --- a/trunk/kernel/time/tick-broadcast.c +++ b/trunk/kernel/time/tick-broadcast.c @@ -508,7 +508,7 @@ static void tick_broadcast_clear_oneshot(int cpu) } /** - * tick_broadcast_setup_oneshot - setup the broadcast device + * tick_broadcast_setup_highres - setup the broadcast device for highres */ void tick_broadcast_setup_oneshot(struct clock_event_device *bc) { diff --git a/trunk/kernel/time/tick-sched.c b/trunk/kernel/time/tick-sched.c index 27a2338deb4a..5997456ebbc9 100644 --- a/trunk/kernel/time/tick-sched.c +++ b/trunk/kernel/time/tick-sched.c @@ -321,7 +321,7 @@ ktime_t tick_nohz_get_sleep_length(void) } /** - * tick_nohz_restart_sched_tick - restart the idle tick from the idle task + * nohz_restart_sched_tick - restart the idle tick from the idle task * * Restart the idle tick when the CPU is woken up from idle */ diff --git a/trunk/kernel/timer.c b/trunk/kernel/timer.c index 00e44e2afd67..fb4e67d5dd60 100644 --- a/trunk/kernel/timer.c +++ b/trunk/kernel/timer.c @@ -790,7 +790,7 @@ static unsigned long cmp_next_hrtimer_event(unsigned long now, } /** - * get_next_timer_interrupt - return the jiffy of the next pending timer + * next_timer_interrupt - return the jiffy of the next pending timer * @now: current time (in jiffies) */ unsigned long get_next_timer_interrupt(unsigned long now) diff --git a/trunk/lib/bitmap.c b/trunk/lib/bitmap.c index 2c9242e3fed0..26ebafa8c41d 100644 --- a/trunk/lib/bitmap.c +++ b/trunk/lib/bitmap.c @@ -469,10 +469,6 @@ int bitmap_scnlistprintf(char *buf, unsigned int buflen, /* current bit is 'cur', most recently seen range is [rbot, rtop] */ int cur, rbot, rtop; - if (buflen == 0) - return 0; - buf[0] = 0; - rbot = cur = find_first_bit(maskp, nmaskbits); while (cur < nmaskbits) { rtop = cur; diff --git a/trunk/lib/libcrc32c.c b/trunk/lib/libcrc32c.c index b5c3287d8ea4..802f11f0bf5b 100644 --- a/trunk/lib/libcrc32c.c +++ b/trunk/lib/libcrc32c.c @@ -33,6 +33,7 @@ #include #include #include +#include MODULE_AUTHOR("Clay Haapala "); MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations"); @@ -160,13 +161,15 @@ static const u32 crc32c_table[256] = { */ u32 __pure -crc32c_le(u32 crc, unsigned char const *data, size_t length) +crc32c_le(u32 seed, unsigned char const *data, size_t length) { + u32 crc = __cpu_to_le32(seed); + while (length--) crc = crc32c_table[(crc ^ *data++) & 0xFFL] ^ (crc >> 8); - return crc; + return __le32_to_cpu(crc); } #endif /* CRC_LE_BITS == 8 */ diff --git a/trunk/mm/memory.c b/trunk/mm/memory.c index 9791e4786843..eefd5b68bc42 100644 --- a/trunk/mm/memory.c +++ b/trunk/mm/memory.c @@ -2748,3 +2748,4 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in return buf - old_buf; } +EXPORT_SYMBOL_GPL(access_process_vm); diff --git a/trunk/mm/slub.c b/trunk/mm/slub.c index 84f59fde1a10..bcdb2c8941a5 100644 --- a/trunk/mm/slub.c +++ b/trunk/mm/slub.c @@ -1511,8 +1511,26 @@ static void *__slab_alloc(struct kmem_cache *s, if (new) { c = get_cpu_slab(s, smp_processor_id()); - if (c->page) + if (c->page) { + /* + * Someone else populated the cpu_slab while we + * enabled interrupts, or we have gotten scheduled + * on another cpu. The page may not be on the + * requested node even if __GFP_THISNODE was + * specified. So we need to recheck. + */ + if (node_match(c, node)) { + /* + * Current cpuslab is acceptable and we + * want the current one since its cache hot + */ + discard_slab(s, new); + slab_lock(c->page); + goto load_freelist; + } + /* New slab does not fit our expectations */ flush_slab(s, c); + } slab_lock(new); SetSlabFrozen(new); c->page = new; diff --git a/trunk/net/8021q/vlan.c b/trunk/net/8021q/vlan.c index 1037748c14db..3fe4fc86055f 100644 --- a/trunk/net/8021q/vlan.c +++ b/trunk/net/8021q/vlan.c @@ -747,7 +747,6 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg) vlan_dev_set_ingress_priority(dev, args.u.skb_priority, args.vlan_qos); - err = 0; break; case SET_VLAN_EGRESS_PRIORITY_CMD: diff --git a/trunk/net/9p/mod.c b/trunk/net/9p/mod.c index 8f9763a9dc12..41d70f47375d 100644 --- a/trunk/net/9p/mod.c +++ b/trunk/net/9p/mod.c @@ -76,9 +76,9 @@ struct p9_trans_module *v9fs_match_trans(const substring_t *name) list_for_each(p, &v9fs_trans_list) { t = list_entry(p, struct p9_trans_module, list); if (strncmp(t->name, name->from, name->to-name->from) == 0) - return t; + break; } - return NULL; + return t; } EXPORT_SYMBOL(v9fs_match_trans); diff --git a/trunk/net/9p/trans_fd.c b/trunk/net/9p/trans_fd.c index 62332ed9da4a..30269a4ff22a 100644 --- a/trunk/net/9p/trans_fd.c +++ b/trunk/net/9p/trans_fd.c @@ -62,14 +62,13 @@ struct p9_trans_fd { enum { /* Options that take integer arguments */ - Opt_port, Opt_rfdno, Opt_wfdno, Opt_err, + Opt_port, Opt_rfdno, Opt_wfdno, }; static match_table_t tokens = { {Opt_port, "port=%u"}, {Opt_rfdno, "rfdno=%u"}, {Opt_wfdno, "wfdno=%u"}, - {Opt_err, NULL}, }; /** diff --git a/trunk/net/bridge/netfilter/ebt_arp.c b/trunk/net/bridge/netfilter/ebt_arp.c index 18141392a9b4..1a46952a56d9 100644 --- a/trunk/net/bridge/netfilter/ebt_arp.c +++ b/trunk/net/bridge/netfilter/ebt_arp.c @@ -34,7 +34,7 @@ static int ebt_filter_arp(const struct sk_buff *skb, const struct net_device *in ah->ar_pro, EBT_ARP_PTYPE)) return EBT_NOMATCH; - if (info->bitmask & (EBT_ARP_SRC_IP | EBT_ARP_DST_IP | EBT_ARP_GRAT)) { + if (info->bitmask & (EBT_ARP_SRC_IP | EBT_ARP_DST_IP)) { __be32 saddr, daddr, *sap, *dap; if (ah->ar_pln != sizeof(__be32) || ah->ar_pro != htons(ETH_P_IP)) diff --git a/trunk/net/core/dst.c b/trunk/net/core/dst.c index 03daead3592a..16958e64e577 100644 --- a/trunk/net/core/dst.c +++ b/trunk/net/core/dst.c @@ -18,6 +18,7 @@ #include #include +#include #include /* diff --git a/trunk/net/core/neighbour.c b/trunk/net/core/neighbour.c index 29b8ee4e35d6..05979e356963 100644 --- a/trunk/net/core/neighbour.c +++ b/trunk/net/core/neighbour.c @@ -1435,8 +1435,6 @@ int neigh_table_clear(struct neigh_table *tbl) kfree(tbl->phash_buckets); tbl->phash_buckets = NULL; - remove_proc_entry(tbl->id, init_net.proc_net_stat); - free_percpu(tbl->stats); tbl->stats = NULL; diff --git a/trunk/net/core/net_namespace.c b/trunk/net/core/net_namespace.c index 3f6d37deac45..e9f0964ce70b 100644 --- a/trunk/net/core/net_namespace.c +++ b/trunk/net/core/net_namespace.c @@ -64,20 +64,6 @@ static struct net *net_alloc(void) return kmem_cache_zalloc(net_cachep, GFP_KERNEL); } -static void net_free(struct net *net) -{ - if (!net) - return; - - if (unlikely(atomic_read(&net->use_count) != 0)) { - printk(KERN_EMERG "network namespace not free! Usage: %d\n", - atomic_read(&net->use_count)); - return; - } - - kmem_cache_free(net_cachep, net); -} - struct net *copy_net_ns(unsigned long flags, struct net *old_net) { struct net *new_net = NULL; @@ -114,6 +100,20 @@ struct net *copy_net_ns(unsigned long flags, struct net *old_net) return new_net; } +static void net_free(struct net *net) +{ + if (!net) + return; + + if (unlikely(atomic_read(&net->use_count) != 0)) { + printk(KERN_EMERG "network namespace not free! Usage: %d\n", + atomic_read(&net->use_count)); + return; + } + + kmem_cache_free(net_cachep, net); +} + static void cleanup_net(struct work_struct *work) { struct pernet_operations *ops; diff --git a/trunk/net/core/sock.c b/trunk/net/core/sock.c index 8fc2f84209e4..12ad2067a988 100644 --- a/trunk/net/core/sock.c +++ b/trunk/net/core/sock.c @@ -1801,65 +1801,11 @@ EXPORT_SYMBOL(sk_common_release); static DEFINE_RWLOCK(proto_list_lock); static LIST_HEAD(proto_list); -#ifdef CONFIG_SMP -/* - * Define default functions to keep track of inuse sockets per protocol - * Note that often used protocols use dedicated functions to get a speed increase. - * (see DEFINE_PROTO_INUSE/REF_PROTO_INUSE) - */ -static void inuse_add(struct proto *prot, int inc) -{ - per_cpu_ptr(prot->inuse_ptr, smp_processor_id())[0] += inc; -} - -static int inuse_get(const struct proto *prot) -{ - int res = 0, cpu; - for_each_possible_cpu(cpu) - res += per_cpu_ptr(prot->inuse_ptr, cpu)[0]; - return res; -} - -static int inuse_init(struct proto *prot) -{ - if (!prot->inuse_getval || !prot->inuse_add) { - prot->inuse_ptr = alloc_percpu(int); - if (prot->inuse_ptr == NULL) - return -ENOBUFS; - - prot->inuse_getval = inuse_get; - prot->inuse_add = inuse_add; - } - return 0; -} - -static void inuse_fini(struct proto *prot) -{ - if (prot->inuse_ptr != NULL) { - free_percpu(prot->inuse_ptr); - prot->inuse_ptr = NULL; - prot->inuse_getval = NULL; - prot->inuse_add = NULL; - } -} -#else -static inline int inuse_init(struct proto *prot) -{ - return 0; -} - -static inline void inuse_fini(struct proto *prot) -{ -} -#endif - int proto_register(struct proto *prot, int alloc_slab) { char *request_sock_slab_name = NULL; char *timewait_sock_slab_name; - - if (inuse_init(prot)) - goto out; + int rc = -ENOBUFS; if (alloc_slab) { prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0, @@ -1868,7 +1814,7 @@ int proto_register(struct proto *prot, int alloc_slab) if (prot->slab == NULL) { printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n", prot->name); - goto out_free_inuse; + goto out; } if (prot->rsk_prot != NULL) { @@ -1912,8 +1858,9 @@ int proto_register(struct proto *prot, int alloc_slab) write_lock(&proto_list_lock); list_add(&prot->node, &proto_list); write_unlock(&proto_list_lock); - return 0; - + rc = 0; +out: + return rc; out_free_timewait_sock_slab_name: kfree(timewait_sock_slab_name); out_free_request_sock_slab: @@ -1926,10 +1873,7 @@ int proto_register(struct proto *prot, int alloc_slab) out_free_sock_slab: kmem_cache_destroy(prot->slab); prot->slab = NULL; -out_free_inuse: - inuse_fini(prot); -out: - return -ENOBUFS; + goto out; } EXPORT_SYMBOL(proto_register); @@ -1940,7 +1884,6 @@ void proto_unregister(struct proto *prot) list_del(&prot->node); write_unlock(&proto_list_lock); - inuse_fini(prot); if (prot->slab != NULL) { kmem_cache_destroy(prot->slab); prot->slab = NULL; diff --git a/trunk/net/dccp/ipv4.c b/trunk/net/dccp/ipv4.c index db17b83e8d3e..01a6a808bdb7 100644 --- a/trunk/net/dccp/ipv4.c +++ b/trunk/net/dccp/ipv4.c @@ -922,8 +922,6 @@ static struct timewait_sock_ops dccp_timewait_sock_ops = { .twsk_obj_size = sizeof(struct inet_timewait_sock), }; -DEFINE_PROTO_INUSE(dccp_v4) - static struct proto dccp_v4_prot = { .name = "DCCP", .owner = THIS_MODULE, @@ -952,7 +950,6 @@ static struct proto dccp_v4_prot = { .compat_setsockopt = compat_dccp_setsockopt, .compat_getsockopt = compat_dccp_getsockopt, #endif - REF_PROTO_INUSE(dccp_v4) }; static struct net_protocol dccp_v4_protocol = { diff --git a/trunk/net/dccp/ipv6.c b/trunk/net/dccp/ipv6.c index 87c98fb86fa8..62428ff137dd 100644 --- a/trunk/net/dccp/ipv6.c +++ b/trunk/net/dccp/ipv6.c @@ -1107,8 +1107,6 @@ static struct timewait_sock_ops dccp6_timewait_sock_ops = { .twsk_obj_size = sizeof(struct dccp6_timewait_sock), }; -DEFINE_PROTO_INUSE(dccp_v6) - static struct proto dccp_v6_prot = { .name = "DCCPv6", .owner = THIS_MODULE, @@ -1137,7 +1135,6 @@ static struct proto dccp_v6_prot = { .compat_setsockopt = compat_dccp_setsockopt, .compat_getsockopt = compat_dccp_getsockopt, #endif - REF_PROTO_INUSE(dccp_v6) }; static struct inet6_protocol dccp_v6_protocol = { diff --git a/trunk/net/dccp/proto.c b/trunk/net/dccp/proto.c index 7a3bea9c28c1..d84973928033 100644 --- a/trunk/net/dccp/proto.c +++ b/trunk/net/dccp/proto.c @@ -1072,13 +1072,11 @@ static int __init dccp_init(void) } for (i = 0; i < dccp_hashinfo.ehash_size; i++) { + rwlock_init(&dccp_hashinfo.ehash[i].lock); INIT_HLIST_HEAD(&dccp_hashinfo.ehash[i].chain); INIT_HLIST_HEAD(&dccp_hashinfo.ehash[i].twchain); } - if (inet_ehash_locks_alloc(&dccp_hashinfo)) - goto out_free_dccp_ehash; - bhash_order = ehash_order; do { @@ -1093,7 +1091,7 @@ static int __init dccp_init(void) if (!dccp_hashinfo.bhash) { DCCP_CRIT("Failed to allocate DCCP bind hash table"); - goto out_free_dccp_locks; + goto out_free_dccp_ehash; } for (i = 0; i < dccp_hashinfo.bhash_size; i++) { @@ -1123,8 +1121,6 @@ static int __init dccp_init(void) out_free_dccp_bhash: free_pages((unsigned long)dccp_hashinfo.bhash, bhash_order); dccp_hashinfo.bhash = NULL; -out_free_dccp_locks: - inet_ehash_locks_free(&dccp_hashinfo); out_free_dccp_ehash: free_pages((unsigned long)dccp_hashinfo.ehash, ehash_order); dccp_hashinfo.ehash = NULL; @@ -1143,7 +1139,6 @@ static void __exit dccp_fini(void) free_pages((unsigned long)dccp_hashinfo.ehash, get_order(dccp_hashinfo.ehash_size * sizeof(struct inet_ehash_bucket))); - inet_ehash_locks_free(&dccp_hashinfo); kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); dccp_ackvec_exit(); dccp_sysctl_exit(); diff --git a/trunk/net/decnet/dn_dev.c b/trunk/net/decnet/dn_dev.c index 66e266fb5908..26130afd8029 100644 --- a/trunk/net/decnet/dn_dev.c +++ b/trunk/net/decnet/dn_dev.c @@ -1439,7 +1439,7 @@ static const struct file_operations dn_dev_seq_fops = { #endif /* CONFIG_PROC_FS */ -static int addr[2]; +static int __initdata addr[2]; module_param_array(addr, int, NULL, 0444); MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node"); diff --git a/trunk/net/ieee80211/ieee80211_crypt_tkip.c b/trunk/net/ieee80211/ieee80211_crypt_tkip.c index 58b22619ab15..4cce3534e408 100644 --- a/trunk/net/ieee80211/ieee80211_crypt_tkip.c +++ b/trunk/net/ieee80211/ieee80211_crypt_tkip.c @@ -25,6 +25,7 @@ #include #include +#include #include MODULE_AUTHOR("Jouni Malinen"); diff --git a/trunk/net/ieee80211/ieee80211_crypt_wep.c b/trunk/net/ieee80211/ieee80211_crypt_wep.c index 3fa30c40779f..866fc04c44f9 100644 --- a/trunk/net/ieee80211/ieee80211_crypt_wep.c +++ b/trunk/net/ieee80211/ieee80211_crypt_wep.c @@ -22,6 +22,7 @@ #include #include +#include #include MODULE_AUTHOR("Jouni Malinen"); diff --git a/trunk/net/ipv4/fib_frontend.c b/trunk/net/ipv4/fib_frontend.c index 732d8f088b13..60123905dbbf 100644 --- a/trunk/net/ipv4/fib_frontend.c +++ b/trunk/net/ipv4/fib_frontend.c @@ -59,13 +59,6 @@ struct fib_table *ip_fib_main_table; #define FIB_TABLE_HASHSZ 1 static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ]; -static void __init fib4_rules_init(void) -{ - ip_fib_local_table = fib_hash_init(RT_TABLE_LOCAL); - hlist_add_head_rcu(&ip_fib_local_table->tb_hlist, &fib_table_hash[0]); - ip_fib_main_table = fib_hash_init(RT_TABLE_MAIN); - hlist_add_head_rcu(&ip_fib_main_table->tb_hlist, &fib_table_hash[0]); -} #else #define FIB_TABLE_HASHSZ 256 @@ -912,8 +905,14 @@ void __init ip_fib_init(void) for (i = 0; i < FIB_TABLE_HASHSZ; i++) INIT_HLIST_HEAD(&fib_table_hash[i]); - +#ifndef CONFIG_IP_MULTIPLE_TABLES + ip_fib_local_table = fib_hash_init(RT_TABLE_LOCAL); + hlist_add_head_rcu(&ip_fib_local_table->tb_hlist, &fib_table_hash[0]); + ip_fib_main_table = fib_hash_init(RT_TABLE_MAIN); + hlist_add_head_rcu(&ip_fib_main_table->tb_hlist, &fib_table_hash[0]); +#else fib4_rules_init(); +#endif register_netdevice_notifier(&fib_netdev_notifier); register_inetaddr_notifier(&fib_inetaddr_notifier); diff --git a/trunk/net/ipv4/inet_diag.c b/trunk/net/ipv4/inet_diag.c index b0170732b5e9..dc429b6b0ba6 100644 --- a/trunk/net/ipv4/inet_diag.c +++ b/trunk/net/ipv4/inet_diag.c @@ -747,14 +747,13 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) for (i = s_i; i < hashinfo->ehash_size; i++) { struct inet_ehash_bucket *head = &hashinfo->ehash[i]; - rwlock_t *lock = inet_ehash_lockp(hashinfo, i); struct sock *sk; struct hlist_node *node; if (i > s_i) s_num = 0; - read_lock_bh(lock); + read_lock_bh(&head->lock); num = 0; sk_for_each(sk, node, &head->chain) { struct inet_sock *inet = inet_sk(sk); @@ -770,7 +769,7 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) r->id.idiag_dport) goto next_normal; if (inet_csk_diag_dump(sk, skb, cb) < 0) { - read_unlock_bh(lock); + read_unlock_bh(&head->lock); goto done; } next_normal: @@ -792,14 +791,14 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) r->id.idiag_dport) goto next_dying; if (inet_twsk_diag_dump(tw, skb, cb) < 0) { - read_unlock_bh(lock); + read_unlock_bh(&head->lock); goto done; } next_dying: ++num; } } - read_unlock_bh(lock); + read_unlock_bh(&head->lock); } done: diff --git a/trunk/net/ipv4/inet_hashtables.c b/trunk/net/ipv4/inet_hashtables.c index 67704da04fc4..16eecc7046a3 100644 --- a/trunk/net/ipv4/inet_hashtables.c +++ b/trunk/net/ipv4/inet_hashtables.c @@ -204,13 +204,12 @@ static int __inet_check_established(struct inet_timewait_death_row *death_row, const __portpair ports = INET_COMBINED_PORTS(inet->dport, lport); unsigned int hash = inet_ehashfn(daddr, lport, saddr, inet->dport); struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash); - rwlock_t *lock = inet_ehash_lockp(hinfo, hash); struct sock *sk2; const struct hlist_node *node; struct inet_timewait_sock *tw; prefetch(head->chain.first); - write_lock(lock); + write_lock(&head->lock); /* Check TIME-WAIT sockets first. */ sk_for_each(sk2, node, &head->twchain) { @@ -240,7 +239,7 @@ static int __inet_check_established(struct inet_timewait_death_row *death_row, BUG_TRAP(sk_unhashed(sk)); __sk_add_node(sk, &head->chain); sock_prot_inc_use(sk->sk_prot); - write_unlock(lock); + write_unlock(&head->lock); if (twp) { *twp = tw; @@ -256,7 +255,7 @@ static int __inet_check_established(struct inet_timewait_death_row *death_row, return 0; not_unique: - write_unlock(lock); + write_unlock(&head->lock); return -EADDRNOTAVAIL; } diff --git a/trunk/net/ipv4/inet_timewait_sock.c b/trunk/net/ipv4/inet_timewait_sock.c index a60b99e0ebdc..4e189e28f306 100644 --- a/trunk/net/ipv4/inet_timewait_sock.c +++ b/trunk/net/ipv4/inet_timewait_sock.c @@ -20,16 +20,16 @@ static void __inet_twsk_kill(struct inet_timewait_sock *tw, struct inet_bind_hashbucket *bhead; struct inet_bind_bucket *tb; /* Unlink from established hashes. */ - rwlock_t *lock = inet_ehash_lockp(hashinfo, tw->tw_hash); + struct inet_ehash_bucket *ehead = inet_ehash_bucket(hashinfo, tw->tw_hash); - write_lock(lock); + write_lock(&ehead->lock); if (hlist_unhashed(&tw->tw_node)) { - write_unlock(lock); + write_unlock(&ehead->lock); return; } __hlist_del(&tw->tw_node); sk_node_init(&tw->tw_node); - write_unlock(lock); + write_unlock(&ehead->lock); /* Disassociate with bind bucket. */ bhead = &hashinfo->bhash[inet_bhashfn(tw->tw_num, hashinfo->bhash_size)]; @@ -59,7 +59,6 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk, const struct inet_sock *inet = inet_sk(sk); const struct inet_connection_sock *icsk = inet_csk(sk); struct inet_ehash_bucket *ehead = inet_ehash_bucket(hashinfo, sk->sk_hash); - rwlock_t *lock = inet_ehash_lockp(hashinfo, sk->sk_hash); struct inet_bind_hashbucket *bhead; /* Step 1: Put TW into bind hash. Original socket stays there too. Note, that any socket with inet->num != 0 MUST be bound in @@ -72,7 +71,7 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk, inet_twsk_add_bind_node(tw, &tw->tw_tb->owners); spin_unlock(&bhead->lock); - write_lock(lock); + write_lock(&ehead->lock); /* Step 2: Remove SK from established hash. */ if (__sk_del_node_init(sk)) @@ -82,7 +81,7 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk, inet_twsk_add_node(tw, &ehead->twchain); atomic_inc(&tw->tw_refcnt); - write_unlock(lock); + write_unlock(&ehead->lock); } EXPORT_SYMBOL_GPL(__inet_twsk_hashdance); diff --git a/trunk/net/ipv4/ip_output.c b/trunk/net/ipv4/ip_output.c index fd99fbd685ea..e5f7dc2de303 100644 --- a/trunk/net/ipv4/ip_output.c +++ b/trunk/net/ipv4/ip_output.c @@ -1183,17 +1183,6 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, return err; } -static void ip_cork_release(struct inet_sock *inet) -{ - inet->cork.flags &= ~IPCORK_OPT; - kfree(inet->cork.opt); - inet->cork.opt = NULL; - if (inet->cork.rt) { - ip_rt_put(inet->cork.rt); - inet->cork.rt = NULL; - } -} - /* * Combined all pending IP fragments on the socket as one IP datagram * and push them out. @@ -1287,7 +1276,13 @@ int ip_push_pending_frames(struct sock *sk) } out: - ip_cork_release(inet); + inet->cork.flags &= ~IPCORK_OPT; + kfree(inet->cork.opt); + inet->cork.opt = NULL; + if (inet->cork.rt) { + ip_rt_put(inet->cork.rt); + inet->cork.rt = NULL; + } return err; error: @@ -1300,12 +1295,19 @@ int ip_push_pending_frames(struct sock *sk) */ void ip_flush_pending_frames(struct sock *sk) { + struct inet_sock *inet = inet_sk(sk); struct sk_buff *skb; while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) kfree_skb(skb); - ip_cork_release(inet_sk(sk)); + inet->cork.flags &= ~IPCORK_OPT; + kfree(inet->cork.opt); + inet->cork.opt = NULL; + if (inet->cork.rt) { + ip_rt_put(inet->cork.rt); + inet->cork.rt = NULL; + } } diff --git a/trunk/net/ipv4/ip_sockglue.c b/trunk/net/ipv4/ip_sockglue.c index 82817e554363..f51f20e487c8 100644 --- a/trunk/net/ipv4/ip_sockglue.c +++ b/trunk/net/ipv4/ip_sockglue.c @@ -437,8 +437,10 @@ static int do_ip_setsockopt(struct sock *sk, int level, /* If optlen==0, it is equivalent to val == 0 */ - if (ip_mroute_opt(optname)) +#ifdef CONFIG_IP_MROUTE + if (optname >= MRT_BASE && optname <= (MRT_BASE + 10)) return ip_mroute_setsockopt(sk,optname,optval,optlen); +#endif err = 0; lock_sock(sk); @@ -907,9 +909,11 @@ int ip_setsockopt(struct sock *sk, int level, #ifdef CONFIG_NETFILTER /* we need to exclude all possible ENOPROTOOPTs except default case */ if (err == -ENOPROTOOPT && optname != IP_HDRINCL && - optname != IP_IPSEC_POLICY && - optname != IP_XFRM_POLICY && - !ip_mroute_opt(optname)) { + optname != IP_IPSEC_POLICY && optname != IP_XFRM_POLICY +#ifdef CONFIG_IP_MROUTE + && (optname < MRT_BASE || optname > (MRT_BASE + 10)) +#endif + ) { lock_sock(sk); err = nf_setsockopt(sk, PF_INET, optname, optval, optlen); release_sock(sk); @@ -931,9 +935,11 @@ int compat_ip_setsockopt(struct sock *sk, int level, int optname, #ifdef CONFIG_NETFILTER /* we need to exclude all possible ENOPROTOOPTs except default case */ if (err == -ENOPROTOOPT && optname != IP_HDRINCL && - optname != IP_IPSEC_POLICY && - optname != IP_XFRM_POLICY && - !ip_mroute_opt(optname)) { + optname != IP_IPSEC_POLICY && optname != IP_XFRM_POLICY +#ifdef CONFIG_IP_MROUTE + && (optname < MRT_BASE || optname > (MRT_BASE + 10)) +#endif + ) { lock_sock(sk); err = compat_nf_setsockopt(sk, PF_INET, optname, optval, optlen); @@ -961,8 +967,11 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname, if (level != SOL_IP) return -EOPNOTSUPP; - if (ip_mroute_opt(optname)) +#ifdef CONFIG_IP_MROUTE + if (optname >= MRT_BASE && optname <= MRT_BASE+10) { return ip_mroute_getsockopt(sk,optname,optval,optlen); + } +#endif if (get_user(len,optlen)) return -EFAULT; @@ -1162,8 +1171,11 @@ int ip_getsockopt(struct sock *sk, int level, err = do_ip_getsockopt(sk, level, optname, optval, optlen); #ifdef CONFIG_NETFILTER /* we need to exclude all possible ENOPROTOOPTs except default case */ - if (err == -ENOPROTOOPT && optname != IP_PKTOPTIONS && - !ip_mroute_opt(optname)) { + if (err == -ENOPROTOOPT && optname != IP_PKTOPTIONS +#ifdef CONFIG_IP_MROUTE + && (optname < MRT_BASE || optname > MRT_BASE+10) +#endif + ) { int len; if (get_user(len,optlen)) @@ -1188,8 +1200,11 @@ int compat_ip_getsockopt(struct sock *sk, int level, int optname, int err = do_ip_getsockopt(sk, level, optname, optval, optlen); #ifdef CONFIG_NETFILTER /* we need to exclude all possible ENOPROTOOPTs except default case */ - if (err == -ENOPROTOOPT && optname != IP_PKTOPTIONS && - !ip_mroute_opt(optname)) { + if (err == -ENOPROTOOPT && optname != IP_PKTOPTIONS +#ifdef CONFIG_IP_MROUTE + && (optname < MRT_BASE || optname > MRT_BASE+10) +#endif + ) { int len; if (get_user(len, optlen)) diff --git a/trunk/net/ipv4/ipcomp.c b/trunk/net/ipv4/ipcomp.c index 2c44a94c2135..ca1b5fdb8d31 100644 --- a/trunk/net/ipv4/ipcomp.c +++ b/trunk/net/ipv4/ipcomp.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -345,7 +344,7 @@ static struct crypto_comp **ipcomp_alloc_tfms(const char *alg_name) for_each_possible_cpu(cpu) { struct crypto_comp *tfm = crypto_alloc_comp(alg_name, 0, CRYPTO_ALG_ASYNC); - if (IS_ERR(tfm)) + if (!tfm) goto error; *per_cpu_ptr(tfms, cpu) = tfm; } diff --git a/trunk/net/ipv4/ipvs/ip_vs_conn.c b/trunk/net/ipv4/ipvs/ip_vs_conn.c index b7eeae622d9b..4b702f708d30 100644 --- a/trunk/net/ipv4/ipvs/ip_vs_conn.c +++ b/trunk/net/ipv4/ipvs/ip_vs_conn.c @@ -425,25 +425,6 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest) } -/* - * Check if there is a destination for the connection, if so - * bind the connection to the destination. - */ -struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp) -{ - struct ip_vs_dest *dest; - - if ((cp) && (!cp->dest)) { - dest = ip_vs_find_dest(cp->daddr, cp->dport, - cp->vaddr, cp->vport, cp->protocol); - ip_vs_bind_dest(cp, dest); - return dest; - } else - return NULL; -} -EXPORT_SYMBOL(ip_vs_try_bind_dest); - - /* * Unbind a connection entry with its VS destination * Called by the ip_vs_conn_expire function. diff --git a/trunk/net/ipv4/ipvs/ip_vs_core.c b/trunk/net/ipv4/ipvs/ip_vs_core.c index 20c884a57721..c6ed7654e839 100644 --- a/trunk/net/ipv4/ipvs/ip_vs_core.c +++ b/trunk/net/ipv4/ipvs/ip_vs_core.c @@ -979,23 +979,15 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, ret = NF_ACCEPT; } - /* Increase its packet counter and check if it is needed - * to be synchronized - * - * Sync connection if it is about to close to - * encorage the standby servers to update the connections timeout - */ + /* increase its packet counter and check if it is needed + to be synchronized */ atomic_inc(&cp->in_pkts); if ((ip_vs_sync_state & IP_VS_STATE_MASTER) && - (((cp->protocol != IPPROTO_TCP || - cp->state == IP_VS_TCP_S_ESTABLISHED) && - (atomic_read(&cp->in_pkts) % sysctl_ip_vs_sync_threshold[1] - == sysctl_ip_vs_sync_threshold[0])) || - ((cp->protocol == IPPROTO_TCP) && (cp->old_state != cp->state) && - ((cp->state == IP_VS_TCP_S_FIN_WAIT) || - (cp->state == IP_VS_TCP_S_CLOSE))))) + (cp->protocol != IPPROTO_TCP || + cp->state == IP_VS_TCP_S_ESTABLISHED) && + (atomic_read(&cp->in_pkts) % sysctl_ip_vs_sync_threshold[1] + == sysctl_ip_vs_sync_threshold[0])) ip_vs_sync_conn(cp); - cp->old_state = cp->state; ip_vs_conn_put(cp); return ret; diff --git a/trunk/net/ipv4/ipvs/ip_vs_ctl.c b/trunk/net/ipv4/ipvs/ip_vs_ctl.c index 3c4d22a468ec..7345fc252a23 100644 --- a/trunk/net/ipv4/ipvs/ip_vs_ctl.c +++ b/trunk/net/ipv4/ipvs/ip_vs_ctl.c @@ -579,32 +579,6 @@ ip_vs_lookup_dest(struct ip_vs_service *svc, __be32 daddr, __be16 dport) return NULL; } -/* - * Find destination by {daddr,dport,vaddr,protocol} - * Cretaed to be used in ip_vs_process_message() in - * the backup synchronization daemon. It finds the - * destination to be bound to the received connection - * on the backup. - * - * ip_vs_lookup_real_service() looked promissing, but - * seems not working as expected. - */ -struct ip_vs_dest *ip_vs_find_dest(__be32 daddr, __be16 dport, - __be32 vaddr, __be16 vport, __u16 protocol) -{ - struct ip_vs_dest *dest; - struct ip_vs_service *svc; - - svc = ip_vs_service_get(0, protocol, vaddr, vport); - if (!svc) - return NULL; - dest = ip_vs_lookup_dest(svc, daddr, dport); - if (dest) - atomic_inc(&dest->refcnt); - ip_vs_service_put(svc); - return dest; -} -EXPORT_SYMBOL(ip_vs_find_dest); /* * Lookup dest by {svc,addr,port} in the destination trash. diff --git a/trunk/net/ipv4/ipvs/ip_vs_sync.c b/trunk/net/ipv4/ipvs/ip_vs_sync.c index bd930efc18da..0d4d9721cbd4 100644 --- a/trunk/net/ipv4/ipvs/ip_vs_sync.c +++ b/trunk/net/ipv4/ipvs/ip_vs_sync.c @@ -284,7 +284,6 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen) struct ip_vs_sync_conn_options *opt; struct ip_vs_conn *cp; struct ip_vs_protocol *pp; - struct ip_vs_dest *dest; char *p; int i; @@ -318,34 +317,20 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen) s->caddr, s->cport, s->vaddr, s->vport); if (!cp) { - /* - * Find the appropriate destination for the connection. - * If it is not found the connection will remain unbound - * but still handled. - */ - dest = ip_vs_find_dest(s->daddr, s->dport, - s->vaddr, s->vport, - s->protocol); cp = ip_vs_conn_new(s->protocol, s->caddr, s->cport, s->vaddr, s->vport, s->daddr, s->dport, - flags, dest); - if (dest) - atomic_dec(&dest->refcnt); + flags, NULL); if (!cp) { IP_VS_ERR("ip_vs_conn_new failed\n"); return; } cp->state = ntohs(s->state); } else if (!cp->dest) { - dest = ip_vs_try_bind_dest(cp); - if (!dest) { - /* it is an unbound entry created by - * synchronization */ - cp->flags = flags | IP_VS_CONN_F_HASHED; - } else - atomic_dec(&dest->refcnt); + /* it is an entry created by the synchronization */ + cp->state = ntohs(s->state); + cp->flags = flags | IP_VS_CONN_F_HASHED; } /* Note that we don't touch its state and flags if it is a normal entry. */ @@ -357,7 +342,6 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen) p += SIMPLE_CONN_SIZE; atomic_set(&cp->in_pkts, sysctl_ip_vs_sync_threshold[0]); - cp->state = ntohs(s->state); pp = ip_vs_proto_get(s->protocol); cp->timeout = pp->timeout_table[cp->state]; ip_vs_conn_put(cp); diff --git a/trunk/net/ipv4/netfilter/Makefile b/trunk/net/ipv4/netfilter/Makefile index 7456833d6ade..409d273f6f82 100644 --- a/trunk/net/ipv4/netfilter/Makefile +++ b/trunk/net/ipv4/netfilter/Makefile @@ -41,27 +41,27 @@ obj-$(CONFIG_NF_NAT) += iptable_nat.o obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o # matches -obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o -obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o -obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o obj-$(CONFIG_IP_NF_MATCH_IPRANGE) += ipt_iprange.o obj-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner.o -obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent.o obj-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos.o +obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent.o +obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o +obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o +obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o # targets -obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o +obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o +obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o -obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o -obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o -obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o +obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o obj-$(CONFIG_IP_NF_TARGET_SAME) += ipt_SAME.o -obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o -obj-$(CONFIG_IP_NF_TARGET_TTL) += ipt_TTL.o +obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o obj-$(CONFIG_IP_NF_TARGET_ULOG) += ipt_ULOG.o +obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o +obj-$(CONFIG_IP_NF_TARGET_TTL) += ipt_TTL.o # generic ARP tables obj-$(CONFIG_IP_NF_ARPTABLES) += arp_tables.o diff --git a/trunk/net/ipv4/netfilter/ip_queue.c b/trunk/net/ipv4/netfilter/ip_queue.c index 14d64a383db1..10a2ce09fd8e 100644 --- a/trunk/net/ipv4/netfilter/ip_queue.c +++ b/trunk/net/ipv4/netfilter/ip_queue.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -608,11 +607,15 @@ static ctl_table ipq_root_table[] = { { .ctl_name = 0 } }; -static int ip_queue_show(struct seq_file *m, void *v) +#ifdef CONFIG_PROC_FS +static int +ipq_get_info(char *buffer, char **start, off_t offset, int length) { + int len; + read_lock_bh(&queue_lock); - seq_printf(m, + len = sprintf(buffer, "Peer PID : %d\n" "Copy mode : %hu\n" "Copy range : %u\n" @@ -629,21 +632,16 @@ static int ip_queue_show(struct seq_file *m, void *v) queue_user_dropped); read_unlock_bh(&queue_lock); - return 0; -} -static int ip_queue_open(struct inode *inode, struct file *file) -{ - return single_open(file, ip_queue_show, NULL); + *start = buffer + offset; + len -= offset; + if (len > length) + len = length; + else if (len < 0) + len = 0; + return len; } - -static const struct file_operations ip_queue_proc_fops = { - .open = ip_queue_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .owner = THIS_MODULE, -}; +#endif /* CONFIG_PROC_FS */ static struct nf_queue_handler nfqh = { .name = "ip_queue", @@ -663,11 +661,10 @@ static int __init ip_queue_init(void) goto cleanup_netlink_notifier; } - proc = create_proc_entry(IPQ_PROC_FS_NAME, 0, init_net.proc_net); - if (proc) { + proc = proc_net_create(&init_net, IPQ_PROC_FS_NAME, 0, ipq_get_info); + if (proc) proc->owner = THIS_MODULE; - proc->proc_fops = &ip_queue_proc_fops; - } else { + else { printk(KERN_ERR "ip_queue: failed to create proc entry\n"); goto cleanup_ipqnl; } diff --git a/trunk/net/ipv4/netfilter/nf_nat_amanda.c b/trunk/net/ipv4/netfilter/nf_nat_amanda.c index c31b87668250..35a5aa69cd92 100644 --- a/trunk/net/ipv4/netfilter/nf_nat_amanda.c +++ b/trunk/net/ipv4/netfilter/nf_nat_amanda.c @@ -69,7 +69,7 @@ static void __exit nf_nat_amanda_fini(void) static int __init nf_nat_amanda_init(void) { - BUG_ON(nf_nat_amanda_hook != NULL); + BUG_ON(rcu_dereference(nf_nat_amanda_hook)); rcu_assign_pointer(nf_nat_amanda_hook, help); return 0; } diff --git a/trunk/net/ipv4/netfilter/nf_nat_ftp.c b/trunk/net/ipv4/netfilter/nf_nat_ftp.c index a1d5d58a58bf..e1a16d3ea4cb 100644 --- a/trunk/net/ipv4/netfilter/nf_nat_ftp.c +++ b/trunk/net/ipv4/netfilter/nf_nat_ftp.c @@ -147,7 +147,7 @@ static void __exit nf_nat_ftp_fini(void) static int __init nf_nat_ftp_init(void) { - BUG_ON(nf_nat_ftp_hook != NULL); + BUG_ON(rcu_dereference(nf_nat_ftp_hook)); rcu_assign_pointer(nf_nat_ftp_hook, nf_nat_ftp); return 0; } diff --git a/trunk/net/ipv4/netfilter/nf_nat_h323.c b/trunk/net/ipv4/netfilter/nf_nat_h323.c index 93e18ef114f2..a868c8c41328 100644 --- a/trunk/net/ipv4/netfilter/nf_nat_h323.c +++ b/trunk/net/ipv4/netfilter/nf_nat_h323.c @@ -544,15 +544,15 @@ static int nat_callforwarding(struct sk_buff *skb, struct nf_conn *ct, /****************************************************************************/ static int __init init(void) { - BUG_ON(set_h245_addr_hook != NULL); - BUG_ON(set_h225_addr_hook != NULL); - BUG_ON(set_sig_addr_hook != NULL); - BUG_ON(set_ras_addr_hook != NULL); - BUG_ON(nat_rtp_rtcp_hook != NULL); - BUG_ON(nat_t120_hook != NULL); - BUG_ON(nat_h245_hook != NULL); - BUG_ON(nat_callforwarding_hook != NULL); - BUG_ON(nat_q931_hook != NULL); + BUG_ON(rcu_dereference(set_h245_addr_hook) != NULL); + BUG_ON(rcu_dereference(set_h225_addr_hook) != NULL); + BUG_ON(rcu_dereference(set_sig_addr_hook) != NULL); + BUG_ON(rcu_dereference(set_ras_addr_hook) != NULL); + BUG_ON(rcu_dereference(nat_rtp_rtcp_hook) != NULL); + BUG_ON(rcu_dereference(nat_t120_hook) != NULL); + BUG_ON(rcu_dereference(nat_h245_hook) != NULL); + BUG_ON(rcu_dereference(nat_callforwarding_hook) != NULL); + BUG_ON(rcu_dereference(nat_q931_hook) != NULL); rcu_assign_pointer(set_h245_addr_hook, set_h245_addr); rcu_assign_pointer(set_h225_addr_hook, set_h225_addr); diff --git a/trunk/net/ipv4/netfilter/nf_nat_irc.c b/trunk/net/ipv4/netfilter/nf_nat_irc.c index fe6f9cef6c85..766e2c16c6b9 100644 --- a/trunk/net/ipv4/netfilter/nf_nat_irc.c +++ b/trunk/net/ipv4/netfilter/nf_nat_irc.c @@ -74,7 +74,7 @@ static void __exit nf_nat_irc_fini(void) static int __init nf_nat_irc_init(void) { - BUG_ON(nf_nat_irc_hook != NULL); + BUG_ON(rcu_dereference(nf_nat_irc_hook)); rcu_assign_pointer(nf_nat_irc_hook, help); return 0; } diff --git a/trunk/net/ipv4/netfilter/nf_nat_pptp.c b/trunk/net/ipv4/netfilter/nf_nat_pptp.c index 6817e7995f35..e1385a099079 100644 --- a/trunk/net/ipv4/netfilter/nf_nat_pptp.c +++ b/trunk/net/ipv4/netfilter/nf_nat_pptp.c @@ -281,16 +281,16 @@ static int __init nf_nat_helper_pptp_init(void) { nf_nat_need_gre(); - BUG_ON(nf_nat_pptp_hook_outbound != NULL); + BUG_ON(rcu_dereference(nf_nat_pptp_hook_outbound)); rcu_assign_pointer(nf_nat_pptp_hook_outbound, pptp_outbound_pkt); - BUG_ON(nf_nat_pptp_hook_inbound != NULL); + BUG_ON(rcu_dereference(nf_nat_pptp_hook_inbound)); rcu_assign_pointer(nf_nat_pptp_hook_inbound, pptp_inbound_pkt); - BUG_ON(nf_nat_pptp_hook_exp_gre != NULL); + BUG_ON(rcu_dereference(nf_nat_pptp_hook_exp_gre)); rcu_assign_pointer(nf_nat_pptp_hook_exp_gre, pptp_exp_gre); - BUG_ON(nf_nat_pptp_hook_expectfn != NULL); + BUG_ON(rcu_dereference(nf_nat_pptp_hook_expectfn)); rcu_assign_pointer(nf_nat_pptp_hook_expectfn, pptp_nat_expected); return 0; } diff --git a/trunk/net/ipv4/netfilter/nf_nat_sip.c b/trunk/net/ipv4/netfilter/nf_nat_sip.c index 3ca98971a1e9..ce9edbcc01e3 100644 --- a/trunk/net/ipv4/netfilter/nf_nat_sip.c +++ b/trunk/net/ipv4/netfilter/nf_nat_sip.c @@ -293,8 +293,8 @@ static void __exit nf_nat_sip_fini(void) static int __init nf_nat_sip_init(void) { - BUG_ON(nf_nat_sip_hook != NULL); - BUG_ON(nf_nat_sdp_hook != NULL); + BUG_ON(rcu_dereference(nf_nat_sip_hook)); + BUG_ON(rcu_dereference(nf_nat_sdp_hook)); rcu_assign_pointer(nf_nat_sip_hook, ip_nat_sip); rcu_assign_pointer(nf_nat_sdp_hook, ip_nat_sdp); return 0; diff --git a/trunk/net/ipv4/netfilter/nf_nat_tftp.c b/trunk/net/ipv4/netfilter/nf_nat_tftp.c index 1360a94766dd..0ecec701cb44 100644 --- a/trunk/net/ipv4/netfilter/nf_nat_tftp.c +++ b/trunk/net/ipv4/netfilter/nf_nat_tftp.c @@ -43,7 +43,7 @@ static void __exit nf_nat_tftp_fini(void) static int __init nf_nat_tftp_init(void) { - BUG_ON(nf_nat_tftp_hook != NULL); + BUG_ON(rcu_dereference(nf_nat_tftp_hook)); rcu_assign_pointer(nf_nat_tftp_hook, help); return 0; } diff --git a/trunk/net/ipv4/proc.c b/trunk/net/ipv4/proc.c index ce34b281803f..ffdccc0972e0 100644 --- a/trunk/net/ipv4/proc.c +++ b/trunk/net/ipv4/proc.c @@ -46,6 +46,17 @@ #include #include +static int fold_prot_inuse(struct proto *proto) +{ + int res = 0; + int cpu; + + for_each_possible_cpu(cpu) + res += proto->stats[cpu].inuse; + + return res; +} + /* * Report socket allocation statistics [mea@utu.fi] */ @@ -53,12 +64,12 @@ static int sockstat_seq_show(struct seq_file *seq, void *v) { socket_seq_show(seq); seq_printf(seq, "TCP: inuse %d orphan %d tw %d alloc %d mem %d\n", - sock_prot_inuse(&tcp_prot), atomic_read(&tcp_orphan_count), + fold_prot_inuse(&tcp_prot), atomic_read(&tcp_orphan_count), tcp_death_row.tw_count, atomic_read(&tcp_sockets_allocated), atomic_read(&tcp_memory_allocated)); - seq_printf(seq, "UDP: inuse %d\n", sock_prot_inuse(&udp_prot)); - seq_printf(seq, "UDPLITE: inuse %d\n", sock_prot_inuse(&udplite_prot)); - seq_printf(seq, "RAW: inuse %d\n", sock_prot_inuse(&raw_prot)); + seq_printf(seq, "UDP: inuse %d\n", fold_prot_inuse(&udp_prot)); + seq_printf(seq, "UDPLITE: inuse %d\n", fold_prot_inuse(&udplite_prot)); + seq_printf(seq, "RAW: inuse %d\n", fold_prot_inuse(&raw_prot)); seq_printf(seq, "FRAG: inuse %d memory %d\n", ip_frag_nqueues(), ip_frag_mem()); return 0; diff --git a/trunk/net/ipv4/raw.c b/trunk/net/ipv4/raw.c index 66b42f547bf9..3916faca3afe 100644 --- a/trunk/net/ipv4/raw.c +++ b/trunk/net/ipv4/raw.c @@ -760,8 +760,6 @@ static int raw_ioctl(struct sock *sk, int cmd, unsigned long arg) } } -DEFINE_PROTO_INUSE(raw) - struct proto raw_prot = { .name = "RAW", .owner = THIS_MODULE, @@ -783,7 +781,6 @@ struct proto raw_prot = { .compat_setsockopt = compat_raw_setsockopt, .compat_getsockopt = compat_raw_getsockopt, #endif - REF_PROTO_INUSE(raw) }; #ifdef CONFIG_PROC_FS diff --git a/trunk/net/ipv4/tcp.c b/trunk/net/ipv4/tcp.c index 8e65182f7af1..c64072bb504b 100644 --- a/trunk/net/ipv4/tcp.c +++ b/trunk/net/ipv4/tcp.c @@ -2456,11 +2456,11 @@ void __init tcp_init(void) thash_entries ? 0 : 512 * 1024); tcp_hashinfo.ehash_size = 1 << tcp_hashinfo.ehash_size; for (i = 0; i < tcp_hashinfo.ehash_size; i++) { + rwlock_init(&tcp_hashinfo.ehash[i].lock); INIT_HLIST_HEAD(&tcp_hashinfo.ehash[i].chain); INIT_HLIST_HEAD(&tcp_hashinfo.ehash[i].twchain); } - if (inet_ehash_locks_alloc(&tcp_hashinfo)) - panic("TCP: failed to alloc ehash_locks"); + tcp_hashinfo.bhash = alloc_large_system_hash("TCP bind", sizeof(struct inet_bind_hashbucket), diff --git a/trunk/net/ipv4/tcp_ipv4.c b/trunk/net/ipv4/tcp_ipv4.c index e566f3c67677..d438dfb0c8f3 100644 --- a/trunk/net/ipv4/tcp_ipv4.c +++ b/trunk/net/ipv4/tcp_ipv4.c @@ -2049,9 +2049,8 @@ static void *established_get_first(struct seq_file *seq) struct sock *sk; struct hlist_node *node; struct inet_timewait_sock *tw; - rwlock_t *lock = inet_ehash_lockp(&tcp_hashinfo, st->bucket); - read_lock_bh(lock); + read_lock_bh(&tcp_hashinfo.ehash[st->bucket].lock); sk_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) { if (sk->sk_family != st->family) { continue; @@ -2068,7 +2067,7 @@ static void *established_get_first(struct seq_file *seq) rc = tw; goto out; } - read_unlock_bh(lock); + read_unlock_bh(&tcp_hashinfo.ehash[st->bucket].lock); st->state = TCP_SEQ_STATE_ESTABLISHED; } out: @@ -2095,11 +2094,11 @@ static void *established_get_next(struct seq_file *seq, void *cur) cur = tw; goto out; } - read_unlock_bh(inet_ehash_lockp(&tcp_hashinfo, st->bucket)); + read_unlock_bh(&tcp_hashinfo.ehash[st->bucket].lock); st->state = TCP_SEQ_STATE_ESTABLISHED; if (++st->bucket < tcp_hashinfo.ehash_size) { - read_lock_bh(inet_ehash_lockp(&tcp_hashinfo, st->bucket)); + read_lock_bh(&tcp_hashinfo.ehash[st->bucket].lock); sk = sk_head(&tcp_hashinfo.ehash[st->bucket].chain); } else { cur = NULL; @@ -2207,7 +2206,7 @@ static void tcp_seq_stop(struct seq_file *seq, void *v) case TCP_SEQ_STATE_TIME_WAIT: case TCP_SEQ_STATE_ESTABLISHED: if (v) - read_unlock_bh(inet_ehash_lockp(&tcp_hashinfo, st->bucket)); + read_unlock_bh(&tcp_hashinfo.ehash[st->bucket].lock); break; } } @@ -2418,8 +2417,6 @@ void tcp4_proc_exit(void) } #endif /* CONFIG_PROC_FS */ -DEFINE_PROTO_INUSE(tcp) - struct proto tcp_prot = { .name = "TCP", .owner = THIS_MODULE, @@ -2454,7 +2451,6 @@ struct proto tcp_prot = { .compat_setsockopt = compat_tcp_setsockopt, .compat_getsockopt = compat_tcp_getsockopt, #endif - REF_PROTO_INUSE(tcp) }; void __init tcp_v4_init(struct net_proto_family *ops) diff --git a/trunk/net/ipv4/udp.c b/trunk/net/ipv4/udp.c index 03c400ca14c5..4bc25b46f33f 100644 --- a/trunk/net/ipv4/udp.c +++ b/trunk/net/ipv4/udp.c @@ -1430,8 +1430,6 @@ unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait) } -DEFINE_PROTO_INUSE(udp) - struct proto udp_prot = { .name = "UDP", .owner = THIS_MODULE, @@ -1454,7 +1452,6 @@ struct proto udp_prot = { .compat_setsockopt = compat_udp_setsockopt, .compat_getsockopt = compat_udp_getsockopt, #endif - REF_PROTO_INUSE(udp) }; /* ------------------------------------------------------------------------ */ diff --git a/trunk/net/ipv4/udplite.c b/trunk/net/ipv4/udplite.c index f5baeb3e8b85..94977205abb4 100644 --- a/trunk/net/ipv4/udplite.c +++ b/trunk/net/ipv4/udplite.c @@ -44,8 +44,6 @@ static struct net_protocol udplite_protocol = { .no_policy = 1, }; -DEFINE_PROTO_INUSE(udplite) - struct proto udplite_prot = { .name = "UDP-Lite", .owner = THIS_MODULE, @@ -69,7 +67,6 @@ struct proto udplite_prot = { .compat_setsockopt = compat_udp_setsockopt, .compat_getsockopt = compat_udp_getsockopt, #endif - REF_PROTO_INUSE(udplite) }; static struct inet_protosw udplite4_protosw = { diff --git a/trunk/net/ipv6/inet6_hashtables.c b/trunk/net/ipv6/inet6_hashtables.c index adc73adadfae..d6f1026f1943 100644 --- a/trunk/net/ipv6/inet6_hashtables.c +++ b/trunk/net/ipv6/inet6_hashtables.c @@ -37,8 +37,9 @@ void __inet6_hash(struct inet_hashinfo *hashinfo, } else { unsigned int hash; sk->sk_hash = hash = inet6_sk_ehashfn(sk); - list = &inet_ehash_bucket(hashinfo, hash)->chain; - lock = inet_ehash_lockp(hashinfo, hash); + hash &= (hashinfo->ehash_size - 1); + list = &hashinfo->ehash[hash].chain; + lock = &hashinfo->ehash[hash].lock; write_lock(lock); } @@ -69,10 +70,9 @@ struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo, */ unsigned int hash = inet6_ehashfn(daddr, hnum, saddr, sport); struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); - rwlock_t *lock = inet_ehash_lockp(hashinfo, hash); prefetch(head->chain.first); - read_lock(lock); + read_lock(&head->lock); sk_for_each(sk, node, &head->chain) { /* For IPV6 do the cheaper port and family tests first. */ if (INET6_MATCH(sk, hash, saddr, daddr, ports, dif)) @@ -92,12 +92,12 @@ struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo, goto hit; } } - read_unlock(lock); + read_unlock(&head->lock); return NULL; hit: sock_hold(sk); - read_unlock(lock); + read_unlock(&head->lock); return sk; } EXPORT_SYMBOL(__inet6_lookup_established); @@ -175,13 +175,12 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row, const unsigned int hash = inet6_ehashfn(daddr, lport, saddr, inet->dport); struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash); - rwlock_t *lock = inet_ehash_lockp(hinfo, hash); struct sock *sk2; const struct hlist_node *node; struct inet_timewait_sock *tw; prefetch(head->chain.first); - write_lock(lock); + write_lock(&head->lock); /* Check TIME-WAIT sockets first. */ sk_for_each(sk2, node, &head->twchain) { @@ -217,7 +216,7 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row, __sk_add_node(sk, &head->chain); sk->sk_hash = hash; sock_prot_inc_use(sk->sk_prot); - write_unlock(lock); + write_unlock(&head->lock); if (twp != NULL) { *twp = tw; @@ -232,7 +231,7 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row, return 0; not_unique: - write_unlock(lock); + write_unlock(&head->lock); return -EADDRNOTAVAIL; } diff --git a/trunk/net/ipv6/ip6_output.c b/trunk/net/ipv6/ip6_output.c index 86e1835ce4e4..653fc0a8235b 100644 --- a/trunk/net/ipv6/ip6_output.c +++ b/trunk/net/ipv6/ip6_output.c @@ -1339,19 +1339,6 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, return err; } -static void ip6_cork_release(struct inet_sock *inet, struct ipv6_pinfo *np) -{ - inet->cork.flags &= ~IPCORK_OPT; - kfree(np->cork.opt); - np->cork.opt = NULL; - if (np->cork.rt) { - dst_release(&np->cork.rt->u.dst); - np->cork.rt = NULL; - inet->cork.flags &= ~IPCORK_ALLFRAG; - } - memset(&inet->cork.fl, 0, sizeof(inet->cork.fl)); -} - int ip6_push_pending_frames(struct sock *sk) { struct sk_buff *skb, *tmp_skb; @@ -1428,7 +1415,15 @@ int ip6_push_pending_frames(struct sock *sk) } out: - ip6_cork_release(inet, np); + inet->cork.flags &= ~IPCORK_OPT; + kfree(np->cork.opt); + np->cork.opt = NULL; + if (np->cork.rt) { + dst_release(&np->cork.rt->u.dst); + np->cork.rt = NULL; + inet->cork.flags &= ~IPCORK_ALLFRAG; + } + memset(&inet->cork.fl, 0, sizeof(inet->cork.fl)); return err; error: goto out; @@ -1436,6 +1431,8 @@ int ip6_push_pending_frames(struct sock *sk) void ip6_flush_pending_frames(struct sock *sk) { + struct inet_sock *inet = inet_sk(sk); + struct ipv6_pinfo *np = inet6_sk(sk); struct sk_buff *skb; while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) { @@ -1445,5 +1442,14 @@ void ip6_flush_pending_frames(struct sock *sk) kfree_skb(skb); } - ip6_cork_release(inet_sk(sk), inet6_sk(sk)); + inet->cork.flags &= ~IPCORK_OPT; + + kfree(np->cork.opt); + np->cork.opt = NULL; + if (np->cork.rt) { + dst_release(&np->cork.rt->u.dst); + np->cork.rt = NULL; + inet->cork.flags &= ~IPCORK_ALLFRAG; + } + memset(&inet->cork.fl, 0, sizeof(inet->cork.fl)); } diff --git a/trunk/net/ipv6/ipcomp6.c b/trunk/net/ipv6/ipcomp6.c index 0cd4056f9127..85eb4798d8d2 100644 --- a/trunk/net/ipv6/ipcomp6.c +++ b/trunk/net/ipv6/ipcomp6.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -359,7 +358,7 @@ static struct crypto_comp **ipcomp6_alloc_tfms(const char *alg_name) for_each_possible_cpu(cpu) { struct crypto_comp *tfm = crypto_alloc_comp(alg_name, 0, CRYPTO_ALG_ASYNC); - if (IS_ERR(tfm)) + if (!tfm) goto error; *per_cpu_ptr(tfms, cpu) = tfm; } diff --git a/trunk/net/ipv6/netfilter/Makefile b/trunk/net/ipv6/netfilter/Makefile index e789ec44d23b..4513eab77397 100644 --- a/trunk/net/ipv6/netfilter/Makefile +++ b/trunk/net/ipv6/netfilter/Makefile @@ -4,29 +4,25 @@ # Link order matters here. obj-$(CONFIG_IP6_NF_IPTABLES) += ip6_tables.o +obj-$(CONFIG_IP6_NF_MATCH_RT) += ip6t_rt.o +obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_hbh.o +obj-$(CONFIG_IP6_NF_MATCH_IPV6HEADER) += ip6t_ipv6header.o +obj-$(CONFIG_IP6_NF_MATCH_FRAG) += ip6t_frag.o +obj-$(CONFIG_IP6_NF_MATCH_AH) += ip6t_ah.o +obj-$(CONFIG_IP6_NF_MATCH_EUI64) += ip6t_eui64.o +obj-$(CONFIG_IP6_NF_MATCH_OWNER) += ip6t_owner.o obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o obj-$(CONFIG_IP6_NF_MANGLE) += ip6table_mangle.o +obj-$(CONFIG_IP6_NF_TARGET_HL) += ip6t_HL.o obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o +obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o +obj-$(CONFIG_IP6_NF_MATCH_HL) += ip6t_hl.o +obj-$(CONFIG_IP6_NF_TARGET_REJECT) += ip6t_REJECT.o +obj-$(CONFIG_IP6_NF_MATCH_MH) += ip6t_mh.o # objects for l3 independent conntrack nf_conntrack_ipv6-objs := nf_conntrack_l3proto_ipv6.o nf_conntrack_proto_icmpv6.o nf_conntrack_reasm.o # l3 independent conntrack obj-$(CONFIG_NF_CONNTRACK_IPV6) += nf_conntrack_ipv6.o - -# matches -obj-$(CONFIG_IP6_NF_MATCH_AH) += ip6t_ah.o -obj-$(CONFIG_IP6_NF_MATCH_EUI64) += ip6t_eui64.o -obj-$(CONFIG_IP6_NF_MATCH_FRAG) += ip6t_frag.o -obj-$(CONFIG_IP6_NF_MATCH_HL) += ip6t_hl.o -obj-$(CONFIG_IP6_NF_MATCH_IPV6HEADER) += ip6t_ipv6header.o -obj-$(CONFIG_IP6_NF_MATCH_MH) += ip6t_mh.o -obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_hbh.o -obj-$(CONFIG_IP6_NF_MATCH_OWNER) += ip6t_owner.o -obj-$(CONFIG_IP6_NF_MATCH_RT) += ip6t_rt.o - -# targets -obj-$(CONFIG_IP6_NF_TARGET_HL) += ip6t_HL.o -obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o -obj-$(CONFIG_IP6_NF_TARGET_REJECT) += ip6t_REJECT.o diff --git a/trunk/net/ipv6/netfilter/ip6_queue.c b/trunk/net/ipv6/netfilter/ip6_queue.c index e273605eef85..6413a30d9f68 100644 --- a/trunk/net/ipv6/netfilter/ip6_queue.c +++ b/trunk/net/ipv6/netfilter/ip6_queue.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -597,11 +596,15 @@ static ctl_table ipq_root_table[] = { { .ctl_name = 0 } }; -static int ip6_queue_show(struct seq_file *m, void *v) +#ifdef CONFIG_PROC_FS +static int +ipq_get_info(char *buffer, char **start, off_t offset, int length) { + int len; + read_lock_bh(&queue_lock); - seq_printf(m, + len = sprintf(buffer, "Peer PID : %d\n" "Copy mode : %hu\n" "Copy range : %u\n" @@ -618,21 +621,16 @@ static int ip6_queue_show(struct seq_file *m, void *v) queue_user_dropped); read_unlock_bh(&queue_lock); - return 0; -} -static int ip6_queue_open(struct inode *inode, struct file *file) -{ - return single_open(file, ip6_queue_show, NULL); + *start = buffer + offset; + len -= offset; + if (len > length) + len = length; + else if (len < 0) + len = 0; + return len; } - -static const struct file_operations ip6_queue_proc_fops = { - .open = ip6_queue_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .owner = THIS_MODULE, -}; +#endif /* CONFIG_PROC_FS */ static struct nf_queue_handler nfqh = { .name = "ip6_queue", @@ -652,11 +650,10 @@ static int __init ip6_queue_init(void) goto cleanup_netlink_notifier; } - proc = create_proc_entry(IPQ_PROC_FS_NAME, 0, init_net.proc_net); - if (proc) { + proc = proc_net_create(&init_net, IPQ_PROC_FS_NAME, 0, ipq_get_info); + if (proc) proc->owner = THIS_MODULE; - proc->proc_fops = &ip6_queue_proc_fops; - } else { + else { printk(KERN_ERR "ip6_queue: failed to create proc entry\n"); goto cleanup_ipqnl; } diff --git a/trunk/net/ipv6/proc.c b/trunk/net/ipv6/proc.c index 8631ed7fe8a9..be526ad92543 100644 --- a/trunk/net/ipv6/proc.c +++ b/trunk/net/ipv6/proc.c @@ -32,16 +32,27 @@ static struct proc_dir_entry *proc_net_devsnmp6; +static int fold_prot_inuse(struct proto *proto) +{ + int res = 0; + int cpu; + + for_each_possible_cpu(cpu) + res += proto->stats[cpu].inuse; + + return res; +} + static int sockstat6_seq_show(struct seq_file *seq, void *v) { seq_printf(seq, "TCP6: inuse %d\n", - sock_prot_inuse(&tcpv6_prot)); + fold_prot_inuse(&tcpv6_prot)); seq_printf(seq, "UDP6: inuse %d\n", - sock_prot_inuse(&udpv6_prot)); + fold_prot_inuse(&udpv6_prot)); seq_printf(seq, "UDPLITE6: inuse %d\n", - sock_prot_inuse(&udplitev6_prot)); + fold_prot_inuse(&udplitev6_prot)); seq_printf(seq, "RAW6: inuse %d\n", - sock_prot_inuse(&rawv6_prot)); + fold_prot_inuse(&rawv6_prot)); seq_printf(seq, "FRAG6: inuse %d memory %d\n", ip6_frag_nqueues(), ip6_frag_mem()); return 0; diff --git a/trunk/net/ipv6/raw.c b/trunk/net/ipv6/raw.c index 807260d03586..ca24ef19cd8f 100644 --- a/trunk/net/ipv6/raw.c +++ b/trunk/net/ipv6/raw.c @@ -1144,8 +1144,6 @@ static int rawv6_init_sk(struct sock *sk) return(0); } -DEFINE_PROTO_INUSE(rawv6) - struct proto rawv6_prot = { .name = "RAWv6", .owner = THIS_MODULE, @@ -1168,7 +1166,6 @@ struct proto rawv6_prot = { .compat_setsockopt = compat_rawv6_setsockopt, .compat_getsockopt = compat_rawv6_getsockopt, #endif - REF_PROTO_INUSE(rawv6) }; #ifdef CONFIG_PROC_FS diff --git a/trunk/net/ipv6/route.c b/trunk/net/ipv6/route.c index 973a97abc446..95f8e4a62f68 100644 --- a/trunk/net/ipv6/route.c +++ b/trunk/net/ipv6/route.c @@ -38,8 +38,12 @@ #include #include #include + +#ifdef CONFIG_PROC_FS #include #include +#endif + #include #include #include @@ -2284,49 +2288,70 @@ struct rt6_proc_arg static int rt6_info_route(struct rt6_info *rt, void *p_arg) { - struct seq_file *m = p_arg; + struct rt6_proc_arg *arg = (struct rt6_proc_arg *) p_arg; - seq_printf(m, NIP6_SEQFMT " %02x ", NIP6(rt->rt6i_dst.addr), - rt->rt6i_dst.plen); + if (arg->skip < arg->offset / RT6_INFO_LEN) { + arg->skip++; + return 0; + } + + if (arg->len >= arg->length) + return 0; + + arg->len += sprintf(arg->buffer + arg->len, + NIP6_SEQFMT " %02x ", + NIP6(rt->rt6i_dst.addr), + rt->rt6i_dst.plen); #ifdef CONFIG_IPV6_SUBTREES - seq_printf(m, NIP6_SEQFMT " %02x ", NIP6(rt->rt6i_src.addr), - rt->rt6i_src.plen); + arg->len += sprintf(arg->buffer + arg->len, + NIP6_SEQFMT " %02x ", + NIP6(rt->rt6i_src.addr), + rt->rt6i_src.plen); #else - seq_puts(m, "00000000000000000000000000000000 00 "); + arg->len += sprintf(arg->buffer + arg->len, + "00000000000000000000000000000000 00 "); #endif if (rt->rt6i_nexthop) { - seq_printf(m, NIP6_SEQFMT, - NIP6(*((struct in6_addr *)rt->rt6i_nexthop->primary_key))); + arg->len += sprintf(arg->buffer + arg->len, + NIP6_SEQFMT, + NIP6(*((struct in6_addr *)rt->rt6i_nexthop->primary_key))); } else { - seq_puts(m, "00000000000000000000000000000000"); + arg->len += sprintf(arg->buffer + arg->len, + "00000000000000000000000000000000"); } - seq_printf(m, " %08x %08x %08x %08x %8s\n", - rt->rt6i_metric, atomic_read(&rt->u.dst.__refcnt), - rt->u.dst.__use, rt->rt6i_flags, - rt->rt6i_dev ? rt->rt6i_dev->name : ""); + arg->len += sprintf(arg->buffer + arg->len, + " %08x %08x %08x %08x %8s\n", + rt->rt6i_metric, atomic_read(&rt->u.dst.__refcnt), + rt->u.dst.__use, rt->rt6i_flags, + rt->rt6i_dev ? rt->rt6i_dev->name : ""); return 0; } -static int ipv6_route_show(struct seq_file *m, void *v) +static int rt6_proc_info(char *buffer, char **start, off_t offset, int length) { - fib6_clean_all(rt6_info_route, 0, m); - return 0; -} + struct rt6_proc_arg arg = { + .buffer = buffer, + .offset = offset, + .length = length, + }; -static int ipv6_route_open(struct inode *inode, struct file *file) -{ - return single_open(file, ipv6_route_show, NULL); -} + fib6_clean_all(rt6_info_route, 0, &arg); -static const struct file_operations ipv6_route_proc_fops = { - .owner = THIS_MODULE, - .open = ipv6_route_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; + *start = buffer; + if (offset) + *start += offset % RT6_INFO_LEN; + + arg.len -= offset % RT6_INFO_LEN; + + if (arg.len > length) + arg.len = length; + if (arg.len < 0) + arg.len = 0; + + return arg.len; +} static int rt6_stats_seq_show(struct seq_file *seq, void *v) { @@ -2464,14 +2489,22 @@ ctl_table ipv6_route_table[] = { void __init ip6_route_init(void) { +#ifdef CONFIG_PROC_FS + struct proc_dir_entry *p; +#endif ip6_dst_ops.kmem_cachep = kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops.kmem_cachep; fib6_init(); - proc_net_fops_create(&init_net, "ipv6_route", 0, &ipv6_route_proc_fops); +#ifdef CONFIG_PROC_FS + p = proc_net_create(&init_net, "ipv6_route", 0, rt6_proc_info); + if (p) + p->owner = THIS_MODULE; + proc_net_fops_create(&init_net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops); +#endif #ifdef CONFIG_XFRM xfrm6_init(); #endif diff --git a/trunk/net/ipv6/tcp_ipv6.c b/trunk/net/ipv6/tcp_ipv6.c index 3aad861975a0..06be2a1f2730 100644 --- a/trunk/net/ipv6/tcp_ipv6.c +++ b/trunk/net/ipv6/tcp_ipv6.c @@ -2107,8 +2107,6 @@ void tcp6_proc_exit(void) } #endif -DEFINE_PROTO_INUSE(tcpv6) - struct proto tcpv6_prot = { .name = "TCPv6", .owner = THIS_MODULE, @@ -2143,7 +2141,6 @@ struct proto tcpv6_prot = { .compat_setsockopt = compat_tcp_setsockopt, .compat_getsockopt = compat_tcp_getsockopt, #endif - REF_PROTO_INUSE(tcpv6) }; static struct inet6_protocol tcpv6_protocol = { diff --git a/trunk/net/ipv6/udp.c b/trunk/net/ipv6/udp.c index ee1cc3f8599f..caebad6ee510 100644 --- a/trunk/net/ipv6/udp.c +++ b/trunk/net/ipv6/udp.c @@ -205,11 +205,12 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, return err; csum_copy_err: - UDP6_INC_STATS_USER(UDP_MIB_INERRORS, is_udplite); skb_kill_datagram(sk, skb, flags); - if (flags & MSG_DONTWAIT) + if (flags & MSG_DONTWAIT) { + UDP6_INC_STATS_USER(UDP_MIB_INERRORS, is_udplite); return -EAGAIN; + } goto try_again; } @@ -970,8 +971,6 @@ void udp6_proc_exit(void) { /* ------------------------------------------------------------------------ */ -DEFINE_PROTO_INUSE(udpv6) - struct proto udpv6_prot = { .name = "UDPv6", .owner = THIS_MODULE, @@ -993,7 +992,6 @@ struct proto udpv6_prot = { .compat_setsockopt = compat_udpv6_setsockopt, .compat_getsockopt = compat_udpv6_getsockopt, #endif - REF_PROTO_INUSE(udpv6) }; static struct inet_protosw udpv6_protosw = { diff --git a/trunk/net/ipv6/udplite.c b/trunk/net/ipv6/udplite.c index 5a0379f71415..766566f7de47 100644 --- a/trunk/net/ipv6/udplite.c +++ b/trunk/net/ipv6/udplite.c @@ -40,8 +40,6 @@ static int udplite_v6_get_port(struct sock *sk, unsigned short snum) return udplite_get_port(sk, snum, ipv6_rcv_saddr_equal); } -DEFINE_PROTO_INUSE(udplitev6) - struct proto udplitev6_prot = { .name = "UDPLITEv6", .owner = THIS_MODULE, @@ -64,7 +62,6 @@ struct proto udplitev6_prot = { .compat_setsockopt = compat_udpv6_setsockopt, .compat_getsockopt = compat_udpv6_getsockopt, #endif - REF_PROTO_INUSE(udplitev6) }; static struct inet_protosw udplite6_protosw = { diff --git a/trunk/net/netfilter/Makefile b/trunk/net/netfilter/Makefile index ad0e36ebea3d..93c58f973831 100644 --- a/trunk/net/netfilter/Makefile +++ b/trunk/net/netfilter/Makefile @@ -40,15 +40,15 @@ obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o # targets obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIFY) += xt_CLASSIFY.o obj-$(CONFIG_NETFILTER_XT_TARGET_CONNMARK) += xt_CONNMARK.o -obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o obj-$(CONFIG_NETFILTER_XT_TARGET_MARK) += xt_MARK.o -obj-$(CONFIG_NETFILTER_XT_TARGET_NFLOG) += xt_NFLOG.o obj-$(CONFIG_NETFILTER_XT_TARGET_NFQUEUE) += xt_NFQUEUE.o +obj-$(CONFIG_NETFILTER_XT_TARGET_NFLOG) += xt_NFLOG.o obj-$(CONFIG_NETFILTER_XT_TARGET_NOTRACK) += xt_NOTRACK.o +obj-$(CONFIG_NETFILTER_XT_TARGET_TRACE) += xt_TRACE.o obj-$(CONFIG_NETFILTER_XT_TARGET_SECMARK) += xt_SECMARK.o obj-$(CONFIG_NETFILTER_XT_TARGET_TCPMSS) += xt_TCPMSS.o -obj-$(CONFIG_NETFILTER_XT_TARGET_TRACE) += xt_TRACE.o +obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o # matches obj-$(CONFIG_NETFILTER_XT_MATCH_COMMENT) += xt_comment.o @@ -59,22 +59,22 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_CONNTRACK) += xt_conntrack.o obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) += xt_dccp.o obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o -obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o obj-$(CONFIG_NETFILTER_XT_MATCH_LENGTH) += xt_length.o obj-$(CONFIG_NETFILTER_XT_MATCH_LIMIT) += xt_limit.o obj-$(CONFIG_NETFILTER_XT_MATCH_MAC) += xt_mac.o obj-$(CONFIG_NETFILTER_XT_MATCH_MARK) += xt_mark.o obj-$(CONFIG_NETFILTER_XT_MATCH_MULTIPORT) += xt_multiport.o -obj-$(CONFIG_NETFILTER_XT_MATCH_PHYSDEV) += xt_physdev.o -obj-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += xt_pkttype.o obj-$(CONFIG_NETFILTER_XT_MATCH_POLICY) += xt_policy.o +obj-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += xt_pkttype.o obj-$(CONFIG_NETFILTER_XT_MATCH_QUOTA) += xt_quota.o obj-$(CONFIG_NETFILTER_XT_MATCH_REALM) += xt_realm.o obj-$(CONFIG_NETFILTER_XT_MATCH_SCTP) += xt_sctp.o obj-$(CONFIG_NETFILTER_XT_MATCH_STATE) += xt_state.o obj-$(CONFIG_NETFILTER_XT_MATCH_STATISTIC) += xt_statistic.o obj-$(CONFIG_NETFILTER_XT_MATCH_STRING) += xt_string.o -obj-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += xt_tcpmss.o obj-$(CONFIG_NETFILTER_XT_MATCH_TIME) += xt_time.o +obj-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += xt_tcpmss.o +obj-$(CONFIG_NETFILTER_XT_MATCH_PHYSDEV) += xt_physdev.o obj-$(CONFIG_NETFILTER_XT_MATCH_U32) += xt_u32.o +obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o diff --git a/trunk/net/netfilter/nf_sockopt.c b/trunk/net/netfilter/nf_sockopt.c index 2dfac3253569..aa2831587b82 100644 --- a/trunk/net/netfilter/nf_sockopt.c +++ b/trunk/net/netfilter/nf_sockopt.c @@ -23,13 +23,14 @@ static inline int overlap(int min1, int max1, int min2, int max2) /* Functions to register sockopt ranges (exclusive). */ int nf_register_sockopt(struct nf_sockopt_ops *reg) { - struct nf_sockopt_ops *ops; + struct list_head *i; int ret = 0; if (mutex_lock_interruptible(&nf_sockopt_mutex) != 0) return -EINTR; - list_for_each_entry(ops, &nf_sockopts, list) { + list_for_each(i, &nf_sockopts) { + struct nf_sockopt_ops *ops = (struct nf_sockopt_ops *)i; if (ops->pf == reg->pf && (overlap(ops->set_optmin, ops->set_optmax, reg->set_optmin, reg->set_optmax) @@ -64,6 +65,7 @@ EXPORT_SYMBOL(nf_unregister_sockopt); static int nf_sockopt(struct sock *sk, int pf, int val, char __user *opt, int *len, int get) { + struct list_head *i; struct nf_sockopt_ops *ops; int ret; @@ -73,7 +75,8 @@ static int nf_sockopt(struct sock *sk, int pf, int val, if (mutex_lock_interruptible(&nf_sockopt_mutex) != 0) return -EINTR; - list_for_each_entry(ops, &nf_sockopts, list) { + list_for_each(i, &nf_sockopts) { + ops = (struct nf_sockopt_ops *)i; if (ops->pf == pf) { if (!try_module_get(ops->owner)) goto out_nosup; @@ -121,6 +124,7 @@ EXPORT_SYMBOL(nf_getsockopt); static int compat_nf_sockopt(struct sock *sk, int pf, int val, char __user *opt, int *len, int get) { + struct list_head *i; struct nf_sockopt_ops *ops; int ret; @@ -131,7 +135,8 @@ static int compat_nf_sockopt(struct sock *sk, int pf, int val, if (mutex_lock_interruptible(&nf_sockopt_mutex) != 0) return -EINTR; - list_for_each_entry(ops, &nf_sockopts, list) { + list_for_each(i, &nf_sockopts) { + ops = (struct nf_sockopt_ops *)i; if (ops->pf == pf) { if (!try_module_get(ops->owner)) goto out_nosup; diff --git a/trunk/net/netfilter/xt_connlimit.c b/trunk/net/netfilter/xt_connlimit.c index d7becf08a93a..06cff1d13690 100644 --- a/trunk/net/netfilter/xt_connlimit.c +++ b/trunk/net/netfilter/xt_connlimit.c @@ -4,8 +4,7 @@ * (c) 2000 Gerd Knorr * Nov 2002: Martin Bene : * only ignore TIME_WAIT or gone connections - * (C) CC Computer Consultants GmbH, 2007 - * Contact: + * Copyright © Jan Engelhardt , 2007 * * based on ... * @@ -307,7 +306,7 @@ static void __exit xt_connlimit_exit(void) module_init(xt_connlimit_init); module_exit(xt_connlimit_exit); -MODULE_AUTHOR("Jan Engelhardt "); +MODULE_AUTHOR("Jan Engelhardt "); MODULE_DESCRIPTION("netfilter xt_connlimit match module"); MODULE_LICENSE("GPL"); MODULE_ALIAS("ipt_connlimit"); diff --git a/trunk/net/netfilter/xt_time.c b/trunk/net/netfilter/xt_time.c index ff44f86c24ce..ef48bbd93573 100644 --- a/trunk/net/netfilter/xt_time.c +++ b/trunk/net/netfilter/xt_time.c @@ -1,7 +1,6 @@ /* * xt_time - * Copyright © CC Computer Consultants GmbH, 2007 - * Contact: + * Copyright © Jan Engelhardt , 2007 * * based on ipt_time by Fabrice MARIE * This is a module which is used for time matching diff --git a/trunk/net/netfilter/xt_u32.c b/trunk/net/netfilter/xt_u32.c index af75b8c3f20b..bec427915b30 100644 --- a/trunk/net/netfilter/xt_u32.c +++ b/trunk/net/netfilter/xt_u32.c @@ -2,8 +2,7 @@ * xt_u32 - kernel module to match u32 packet content * * Original author: Don Cohen - * (C) CC Computer Consultants GmbH, 2007 - * Contact: + * © Jan Engelhardt , 2007 */ #include @@ -130,7 +129,7 @@ static void __exit xt_u32_exit(void) module_init(xt_u32_init); module_exit(xt_u32_exit); -MODULE_AUTHOR("Jan Engelhardt "); +MODULE_AUTHOR("Jan Engelhardt "); MODULE_DESCRIPTION("netfilter u32 match module"); MODULE_LICENSE("GPL"); MODULE_ALIAS("ipt_u32"); diff --git a/trunk/net/netlink/af_netlink.c b/trunk/net/netlink/af_netlink.c index 415c97236f63..260171255576 100644 --- a/trunk/net/netlink/af_netlink.c +++ b/trunk/net/netlink/af_netlink.c @@ -752,7 +752,7 @@ struct sock *netlink_getsockbyfilp(struct file *filp) * 1: repeat lookup - reference dropped while waiting for socket memory. */ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, - long *timeo, struct sock *ssk) + long timeo, struct sock *ssk) { struct netlink_sock *nlk; @@ -761,7 +761,7 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || test_bit(0, &nlk->state)) { DECLARE_WAITQUEUE(wait, current); - if (!*timeo) { + if (!timeo) { if (!ssk || netlink_is_kernel(ssk)) netlink_overrun(sk); sock_put(sk); @@ -775,7 +775,7 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, if ((atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || test_bit(0, &nlk->state)) && !sock_flag(sk, SOCK_DEAD)) - *timeo = schedule_timeout(*timeo); + timeo = schedule_timeout(timeo); __set_current_state(TASK_RUNNING); remove_wait_queue(&nlk->wait, &wait); @@ -783,7 +783,7 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, if (signal_pending(current)) { kfree_skb(skb); - return sock_intr_errno(*timeo); + return sock_intr_errno(timeo); } return 1; } @@ -877,7 +877,7 @@ int netlink_unicast(struct sock *ssk, struct sk_buff *skb, if (netlink_is_kernel(sk)) return netlink_unicast_kernel(sk, skb); - err = netlink_attachskb(sk, skb, nonblock, &timeo, ssk); + err = netlink_attachskb(sk, skb, nonblock, timeo, ssk); if (err == 1) goto retry; if (err) diff --git a/trunk/net/sched/cls_u32.c b/trunk/net/sched/cls_u32.c index 53171029439f..9e98c6e567dd 100644 --- a/trunk/net/sched/cls_u32.c +++ b/trunk/net/sched/cls_u32.c @@ -91,7 +91,7 @@ static struct tc_u_common *u32_list; static __inline__ unsigned u32_hash_fold(u32 key, struct tc_u32_sel *sel, u8 fshift) { - unsigned h = ntohl(key & sel->hmask)>>fshift; + unsigned h = (key & sel->hmask)>>fshift; return h; } @@ -615,7 +615,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, n->handle = handle; { u8 i = 0; - u32 mask = ntohl(s->hmask); + u32 mask = s->hmask; if (mask) { while (!(mask & 1)) { i++; diff --git a/trunk/net/sched/sch_teql.c b/trunk/net/sched/sch_teql.c index c0ed06d4a504..421281d9dd1d 100644 --- a/trunk/net/sched/sch_teql.c +++ b/trunk/net/sched/sch_teql.c @@ -252,9 +252,6 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device * static inline int teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *dev) { - if (dev->qdisc == &noop_qdisc) - return -ENODEV; - if (dev->header_ops == NULL || skb->dst == NULL || skb->dst->neighbour == NULL) diff --git a/trunk/net/sctp/socket.c b/trunk/net/sctp/socket.c index a7ecf3159e53..bd6f42a15a4b 100644 --- a/trunk/net/sctp/socket.c +++ b/trunk/net/sctp/socket.c @@ -6455,8 +6455,6 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, } -DEFINE_PROTO_INUSE(sctp) - /* This proto struct describes the ULP interface for SCTP. */ struct proto sctp_prot = { .name = "SCTP", @@ -6485,12 +6483,9 @@ struct proto sctp_prot = { .memory_pressure = &sctp_memory_pressure, .enter_memory_pressure = sctp_enter_memory_pressure, .memory_allocated = &sctp_memory_allocated, - REF_PROTO_INUSE(sctp) }; #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) -DEFINE_PROTO_INUSE(sctpv6) - struct proto sctpv6_prot = { .name = "SCTPv6", .owner = THIS_MODULE, @@ -6518,6 +6513,5 @@ struct proto sctpv6_prot = { .memory_pressure = &sctp_memory_pressure, .enter_memory_pressure = sctp_enter_memory_pressure, .memory_allocated = &sctp_memory_allocated, - REF_PROTO_INUSE(sctpv6) }; #endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ diff --git a/trunk/security/selinux/ss/avtab.c b/trunk/security/selinux/ss/avtab.c index 9e70a160d7da..7551af1f7899 100644 --- a/trunk/security/selinux/ss/avtab.c +++ b/trunk/security/selinux/ss/avtab.c @@ -325,7 +325,7 @@ static uint16_t spec_order[] = { AVTAB_MEMBER }; -int avtab_read_item(struct avtab *a, void *fp, struct policydb *pol, +int avtab_read_item(void *fp, u32 vers, struct avtab *a, int (*insertf)(struct avtab *a, struct avtab_key *k, struct avtab_datum *d, void *p), void *p) @@ -333,11 +333,10 @@ int avtab_read_item(struct avtab *a, void *fp, struct policydb *pol, __le16 buf16[4]; u16 enabled; __le32 buf32[7]; - u32 items, items2, val, vers = pol->policyvers; + u32 items, items2, val; struct avtab_key key; struct avtab_datum datum; int i, rc; - unsigned set; memset(&key, 0, sizeof(struct avtab_key)); memset(&datum, 0, sizeof(struct avtab_datum)); @@ -421,35 +420,12 @@ int avtab_read_item(struct avtab *a, void *fp, struct policydb *pol, key.target_class = le16_to_cpu(buf16[items++]); key.specified = le16_to_cpu(buf16[items++]); - if (!policydb_type_isvalid(pol, key.source_type) || - !policydb_type_isvalid(pol, key.target_type) || - !policydb_class_isvalid(pol, key.target_class)) { - printk(KERN_WARNING "security: avtab: invalid type or class\n"); - return -1; - } - - set = 0; - for (i = 0; i < ARRAY_SIZE(spec_order); i++) { - if (key.specified & spec_order[i]) - set++; - } - if (!set || set > 1) { - printk(KERN_WARNING - "security: avtab: more than one specifier\n"); - return -1; - } - rc = next_entry(buf32, fp, sizeof(u32)); if (rc < 0) { printk("security: avtab: truncated entry\n"); return -1; } datum.data = le32_to_cpu(*buf32); - if ((key.specified & AVTAB_TYPE) && - !policydb_type_isvalid(pol, datum.data)) { - printk(KERN_WARNING "security: avtab: invalid type\n"); - return -1; - } return insertf(a, &key, &datum, p); } @@ -459,7 +435,7 @@ static int avtab_insertf(struct avtab *a, struct avtab_key *k, return avtab_insert(a, k, d); } -int avtab_read(struct avtab *a, void *fp, struct policydb *pol) +int avtab_read(struct avtab *a, void *fp, u32 vers) { int rc; __le32 buf[1]; @@ -483,7 +459,7 @@ int avtab_read(struct avtab *a, void *fp, struct policydb *pol) goto bad; for (i = 0; i < nel; i++) { - rc = avtab_read_item(a, fp, pol, avtab_insertf, NULL); + rc = avtab_read_item(fp,vers, a, avtab_insertf, NULL); if (rc) { if (rc == -ENOMEM) printk(KERN_ERR "security: avtab: out of memory\n"); diff --git a/trunk/security/selinux/ss/avtab.h b/trunk/security/selinux/ss/avtab.h index 8da6a8428086..d8edf8ca56d1 100644 --- a/trunk/security/selinux/ss/avtab.h +++ b/trunk/security/selinux/ss/avtab.h @@ -64,13 +64,12 @@ struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *k); void avtab_destroy(struct avtab *h); void avtab_hash_eval(struct avtab *h, char *tag); -struct policydb; -int avtab_read_item(struct avtab *a, void *fp, struct policydb *pol, +int avtab_read_item(void *fp, uint32_t vers, struct avtab *a, int (*insert)(struct avtab *a, struct avtab_key *k, struct avtab_datum *d, void *p), void *p); -int avtab_read(struct avtab *a, void *fp, struct policydb *pol); +int avtab_read(struct avtab *a, void *fp, u32 vers); struct avtab_node *avtab_insert_nonunique(struct avtab *h, struct avtab_key *key, struct avtab_datum *datum); diff --git a/trunk/security/selinux/ss/conditional.c b/trunk/security/selinux/ss/conditional.c index 50ad85d4b77c..45b93a827c80 100644 --- a/trunk/security/selinux/ss/conditional.c +++ b/trunk/security/selinux/ss/conditional.c @@ -362,8 +362,7 @@ static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list * data.head = NULL; data.tail = NULL; for (i = 0; i < len; i++) { - rc = avtab_read_item(&p->te_cond_avtab, fp, p, cond_insertf, - &data); + rc = avtab_read_item(fp, p->policyvers, &p->te_cond_avtab, cond_insertf, &data); if (rc) return rc; diff --git a/trunk/security/selinux/ss/ebitmap.c b/trunk/security/selinux/ss/ebitmap.c index 920b5e36a1af..c1a6b22d48d9 100644 --- a/trunk/security/selinux/ss/ebitmap.c +++ b/trunk/security/selinux/ss/ebitmap.c @@ -129,8 +129,8 @@ int ebitmap_netlbl_export(struct ebitmap *ebmap, cmap_sft = delta % NETLBL_CATMAP_MAPSIZE; c_iter->bitmap[cmap_idx] |= e_iter->maps[cmap_idx] << cmap_sft; + e_iter = e_iter->next; } - e_iter = e_iter->next; } return 0; diff --git a/trunk/security/selinux/ss/mls.c b/trunk/security/selinux/ss/mls.c index fb5d70a6628d..9a11deaaa9e7 100644 --- a/trunk/security/selinux/ss/mls.c +++ b/trunk/security/selinux/ss/mls.c @@ -157,55 +157,49 @@ void mls_sid_to_context(struct context *context, return; } -int mls_level_isvalid(struct policydb *p, struct mls_level *l) -{ - struct level_datum *levdatum; - struct ebitmap_node *node; - int i; - - if (!l->sens || l->sens > p->p_levels.nprim) - return 0; - levdatum = hashtab_search(p->p_levels.table, - p->p_sens_val_to_name[l->sens - 1]); - if (!levdatum) - return 0; - - ebitmap_for_each_positive_bit(&l->cat, node, i) { - if (i > p->p_cats.nprim) - return 0; - if (!ebitmap_get_bit(&levdatum->level->cat, i)) { - /* - * Category may not be associated with - * sensitivity. - */ - return 0; - } - } - - return 1; -} - -int mls_range_isvalid(struct policydb *p, struct mls_range *r) -{ - return (mls_level_isvalid(p, &r->level[0]) && - mls_level_isvalid(p, &r->level[1]) && - mls_level_dom(&r->level[1], &r->level[0])); -} - /* * Return 1 if the MLS fields in the security context * structure `c' are valid. Return 0 otherwise. */ int mls_context_isvalid(struct policydb *p, struct context *c) { + struct level_datum *levdatum; struct user_datum *usrdatum; + struct ebitmap_node *node; + int i, l; if (!selinux_mls_enabled) return 1; - if (!mls_range_isvalid(p, &c->range)) + /* + * MLS range validity checks: high must dominate low, low level must + * be valid (category set <-> sensitivity check), and high level must + * be valid (category set <-> sensitivity check) + */ + if (!mls_level_dom(&c->range.level[1], &c->range.level[0])) + /* High does not dominate low. */ return 0; + for (l = 0; l < 2; l++) { + if (!c->range.level[l].sens || c->range.level[l].sens > p->p_levels.nprim) + return 0; + levdatum = hashtab_search(p->p_levels.table, + p->p_sens_val_to_name[c->range.level[l].sens - 1]); + if (!levdatum) + return 0; + + ebitmap_for_each_positive_bit(&c->range.level[l].cat, node, i) { + if (i > p->p_cats.nprim) + return 0; + if (!ebitmap_get_bit(&levdatum->level->cat, i)) + /* + * Category may not be associated with + * sensitivity in low level. + */ + return 0; + } + } + if (c->role == OBJECT_R_VAL) return 1; diff --git a/trunk/security/selinux/ss/mls.h b/trunk/security/selinux/ss/mls.h index ab53663d9f5f..096d1b4ef7fb 100644 --- a/trunk/security/selinux/ss/mls.h +++ b/trunk/security/selinux/ss/mls.h @@ -27,8 +27,6 @@ int mls_compute_context_len(struct context *context); void mls_sid_to_context(struct context *context, char **scontext); int mls_context_isvalid(struct policydb *p, struct context *c); -int mls_range_isvalid(struct policydb *p, struct mls_range *r); -int mls_level_isvalid(struct policydb *p, struct mls_level *l); int mls_context_to_sid(char oldc, char **scontext, diff --git a/trunk/security/selinux/ss/policydb.c b/trunk/security/selinux/ss/policydb.c index b582aae3c62c..539828b229b2 100644 --- a/trunk/security/selinux/ss/policydb.c +++ b/trunk/security/selinux/ss/policydb.c @@ -713,27 +713,6 @@ int policydb_load_isids(struct policydb *p, struct sidtab *s) return rc; } -int policydb_class_isvalid(struct policydb *p, unsigned int class) -{ - if (!class || class > p->p_classes.nprim) - return 0; - return 1; -} - -int policydb_role_isvalid(struct policydb *p, unsigned int role) -{ - if (!role || role > p->p_roles.nprim) - return 0; - return 1; -} - -int policydb_type_isvalid(struct policydb *p, unsigned int type) -{ - if (!type || type > p->p_types.nprim) - return 0; - return 1; -} - /* * Return 1 if the fields in the security context * structure `c' are valid. Return 0 otherwise. @@ -1281,7 +1260,6 @@ static int mls_read_level(struct mls_level *lp, void *fp) "categories\n"); goto bad; } - return 0; bad: @@ -1585,7 +1563,7 @@ int policydb_read(struct policydb *p, void *fp) p->symtab[i].nprim = nprim; } - rc = avtab_read(&p->te_avtab, fp, p); + rc = avtab_read(&p->te_avtab, fp, p->policyvers); if (rc) goto bad; @@ -1617,12 +1595,6 @@ int policydb_read(struct policydb *p, void *fp) tr->role = le32_to_cpu(buf[0]); tr->type = le32_to_cpu(buf[1]); tr->new_role = le32_to_cpu(buf[2]); - if (!policydb_role_isvalid(p, tr->role) || - !policydb_type_isvalid(p, tr->type) || - !policydb_role_isvalid(p, tr->new_role)) { - rc = -EINVAL; - goto bad; - } ltr = tr; } @@ -1647,11 +1619,6 @@ int policydb_read(struct policydb *p, void *fp) goto bad; ra->role = le32_to_cpu(buf[0]); ra->new_role = le32_to_cpu(buf[1]); - if (!policydb_role_isvalid(p, ra->role) || - !policydb_role_isvalid(p, ra->new_role)) { - rc = -EINVAL; - goto bad; - } lra = ra; } @@ -1905,19 +1872,9 @@ int policydb_read(struct policydb *p, void *fp) rt->target_class = le32_to_cpu(buf[0]); } else rt->target_class = SECCLASS_PROCESS; - if (!policydb_type_isvalid(p, rt->source_type) || - !policydb_type_isvalid(p, rt->target_type) || - !policydb_class_isvalid(p, rt->target_class)) { - rc = -EINVAL; - goto bad; - } rc = mls_read_range_helper(&rt->target_range, fp); if (rc) goto bad; - if (!mls_range_isvalid(p, &rt->target_range)) { - printk(KERN_WARNING "security: rangetrans: invalid range\n"); - goto bad; - } lrt = rt; } } diff --git a/trunk/security/selinux/ss/policydb.h b/trunk/security/selinux/ss/policydb.h index ed6fc687c66f..844d310f4f1b 100644 --- a/trunk/security/selinux/ss/policydb.h +++ b/trunk/security/selinux/ss/policydb.h @@ -251,9 +251,6 @@ struct policydb { extern void policydb_destroy(struct policydb *p); extern int policydb_load_isids(struct policydb *p, struct sidtab *s); extern int policydb_context_isvalid(struct policydb *p, struct context *c); -extern int policydb_class_isvalid(struct policydb *p, unsigned int class); -extern int policydb_type_isvalid(struct policydb *p, unsigned int type); -extern int policydb_role_isvalid(struct policydb *p, unsigned int role); extern int policydb_read(struct policydb *p, void *fp); #define PERM_SYMTAB_SIZE 32 diff --git a/trunk/security/selinux/xfrm.c b/trunk/security/selinux/xfrm.c index e07603969033..36a191e7004e 100644 --- a/trunk/security/selinux/xfrm.c +++ b/trunk/security/selinux/xfrm.c @@ -211,27 +211,26 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx **ctxp, if (uctx->ctx_doi != XFRM_SC_ALG_SELINUX) return -EINVAL; - str_len = uctx->ctx_len; - if (str_len >= PAGE_SIZE) + if (uctx->ctx_len >= PAGE_SIZE) return -ENOMEM; *ctxp = ctx = kmalloc(sizeof(*ctx) + - str_len + 1, + uctx->ctx_len + 1, GFP_KERNEL); if (!ctx) return -ENOMEM; ctx->ctx_doi = uctx->ctx_doi; - ctx->ctx_len = str_len; + ctx->ctx_len = uctx->ctx_len; ctx->ctx_alg = uctx->ctx_alg; memcpy(ctx->ctx_str, uctx+1, - str_len); - ctx->ctx_str[str_len] = 0; + ctx->ctx_len); + ctx->ctx_str[ctx->ctx_len] = 0; rc = security_context_to_sid(ctx->ctx_str, - str_len, + ctx->ctx_len, &ctx->ctx_sid); if (rc)