]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge git://git.infradead.org/~dwmw2/mtd-2.6.23
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 3 Aug 2007 22:08:55 +0000 (15:08 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 3 Aug 2007 22:08:55 +0000 (15:08 -0700)
* git://git.infradead.org/~dwmw2/mtd-2.6.23:
  [MTD] Makefile fix for mtdsuper

59 files changed:
arch/sh/boards/renesas/rts7751r2d/setup.c
arch/sh/configs/hs7751rvoip_defconfig
arch/sh/configs/landisk_defconfig
arch/sh/configs/lboxre2_defconfig
arch/sh/configs/rts7751r2d_defconfig
arch/sh/configs/snapgear_defconfig
arch/sh/configs/systemh_defconfig
arch/sh/configs/titan_defconfig
arch/sh/kernel/cpu/sh3/entry.S
arch/sh/kernel/traps.c
arch/sh/mm/Makefile
arch/sh/mm/fault-nommu.c
arch/sh/mm/fault.c
arch/sparc/kernel/entry.S
arch/sparc/kernel/irq.c
arch/sparc/kernel/sparc_ksyms.c
drivers/firewire/fw-ohci.c
drivers/firewire/fw-sbp2.c
drivers/firewire/fw-transaction.c
drivers/firewire/fw-transaction.h
drivers/ieee1394/Kconfig
drivers/ieee1394/sbp2.c
drivers/power/Kconfig
drivers/serial/8250.c
drivers/serial/8250_early.c
drivers/video/cg6.c
include/asm-sh/rts7751r2d.h
include/asm-sparc/fcntl.h
include/asm-sparc/floppy.h
include/asm-sparc/irq.h
include/asm-sparc64/dma-mapping.h
include/asm-sparc64/fcntl.h
include/net/sctp/sctp.h
include/net/tcp.h
kernel/exit.c
kernel/printk.c
kernel/signal.c
net/ipv4/af_inet.c
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
net/ipv4/raw.c
net/ipv4/route.c
net/ipv4/tcp.c
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv6/af_inet6.c
net/ipv6/tcp_ipv6.c
net/key/af_key.c
net/netfilter/nf_conntrack_expect.c
net/sctp/input.c
net/sctp/ipv6.c
net/sctp/sm_make_chunk.c
net/sctp/sm_statefuns.c
net/sctp/socket.c
net/sctp/tsnmap.c
net/tipc/link.c
net/tipc/name_table.c
net/tipc/node.c
net/wanrouter/wanmain.c
sound/sparc/cs4231.c

index e165d85c03b5543050d721bd98ef2b5c7b4f9166..6f7029d33241db4beeb46395968c24b81e0403e0 100644 (file)
@@ -140,12 +140,19 @@ static struct platform_device sm501_device = {
 static struct platform_device *rts7751r2d_devices[] __initdata = {
        &uart_device,
        &heartbeat_device,
-       &cf_ide_device,
        &sm501_device,
 };
 
 static int __init rts7751r2d_devices_setup(void)
 {
+       int ret;
+
+       if (ctrl_inw(PA_BVERREG) == 0x10) { /* only working on R2D-PLUS */
+               ret = platform_device_register(&cf_ide_device);
+               if (ret)
+                       return ret;
+       }
+
        return platform_add_devices(rts7751r2d_devices,
                                    ARRAY_SIZE(rts7751r2d_devices));
 }
index e1a886d621dbd8fe7d34a0295b645dabb9a8b37d..5d9da5a0275924a5eb062654a4674458c8283c73 100644 (file)
@@ -145,7 +145,7 @@ CONFIG_CPU_SH4=y
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
index 07310fa03250b475dc6c73ddd78b86c37506176e..f52db125432f6c6bf0b7fd2d47be88d398dcbc8a 100644 (file)
@@ -156,7 +156,7 @@ CONFIG_CPU_SH4=y
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
index fa09d68d057a2a23e78afac25f00f438e32d83e1..9fa66d92a4e75db47a6432cacac5e5b524818f55 100644 (file)
@@ -159,7 +159,7 @@ CONFIG_CPU_SH4=y
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
index f1e979b1e4952f2d499296cc5199c5739d737d93..b64f73b704d615f19cf0f4af204d9ef104f06e19 100644 (file)
@@ -243,8 +243,8 @@ CONFIG_SH_PCLK_FREQ=60000000
 #
 # DMA support
 #
-CONFIG_SH_DMA=y
-CONFIG_NR_ONCHIP_DMA_CHANNELS=8
+# CONFIG_SH_DMA is not set
+# CONFIG_NR_ONCHIP_DMA_CHANNELS is not set
 # CONFIG_NR_DMA_CHANNELS_BOOL is not set
 
 #
@@ -280,7 +280,7 @@ CONFIG_ZERO_PAGE_OFFSET=0x00010000
 CONFIG_BOOT_LINK_OFFSET=0x00800000
 # CONFIG_UBC_WAKEUP is not set
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=bios"
+CONFIG_CMDLINE="console=tty0 console=ttySC0,115200 root=/dev/sda1 earlyprintk=serial"
 
 #
 # Bus options
@@ -1323,7 +1323,7 @@ CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_BUGVERBOSE is not set
-CONFIG_SH_STANDARD_BIOS=y
+# CONFIG_SH_STANDARD_BIOS is not set
 CONFIG_EARLY_SCIF_CONSOLE=y
 CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe80000
 CONFIG_EARLY_PRINTK=y
index 98503f16f3f5da1749c0632d4e0ce70f7d02fdc2..e4e5d21781313fc5bb05a07c9af095f44ab00011 100644 (file)
@@ -1,15 +1,24 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18
-# Tue Oct  3 12:55:47 2006
+# Linux kernel version: 2.6.23-rc1
+# Thu Jul 26 11:49:11 2007
 #
 CONFIG_SUPERH=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_BUG=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_SYS_SUPPORTS_PCI=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_NO_VIRT_TO_BUS=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
@@ -24,15 +33,18 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 #
 CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
+# CONFIG_SWAP is not set
 # CONFIG_SYSVIPC is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_UTS_NS is not set
+# CONFIG_USER_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_SYSFS_DEPRECATED is not set
 # CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
@@ -47,27 +59,25 @@ CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
-CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
 # CONFIG_MODULES is not set
-
-#
-# Block layer
-#
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
 
 #
 # IO Schedulers
@@ -85,122 +95,103 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 #
 # System type
 #
-# CONFIG_SH_SOLUTION_ENGINE is not set
-# CONFIG_SH_7751_SOLUTION_ENGINE is not set
-# CONFIG_SH_7300_SOLUTION_ENGINE is not set
-# CONFIG_SH_7343_SOLUTION_ENGINE is not set
-# CONFIG_SH_73180_SOLUTION_ENGINE is not set
-# CONFIG_SH_7751_SYSTEMH is not set
-# CONFIG_SH_HP6XX is not set
-# CONFIG_SH_EC3104 is not set
-# CONFIG_SH_SATURN is not set
-# CONFIG_SH_DREAMCAST is not set
-# CONFIG_SH_BIGSUR is not set
-# CONFIG_SH_MPC1211 is not set
-# CONFIG_SH_SH03 is not set
-CONFIG_SH_SECUREEDGE5410=y
-# CONFIG_SH_HS7751RVOIP is not set
-# CONFIG_SH_7710VOIPGW is not set
-# CONFIG_SH_RTS7751R2D is not set
-# CONFIG_SH_R7780RP is not set
-# CONFIG_SH_EDOSK7705 is not set
-# CONFIG_SH_SH4202_MICRODEV is not set
-# CONFIG_SH_LANDISK is not set
-# CONFIG_SH_TITAN is not set
-# CONFIG_SH_SHMIN is not set
-# CONFIG_SH_UNKNOWN is not set
-
-#
-# Processor selection
-#
 CONFIG_CPU_SH4=y
-
-#
-# SH-2 Processor Support
-#
-# CONFIG_CPU_SUBTYPE_SH7604 is not set
-
-#
-# SH-3 Processor Support
-#
-# CONFIG_CPU_SUBTYPE_SH7300 is not set
+# CONFIG_CPU_SUBTYPE_SH7619 is not set
+# CONFIG_CPU_SUBTYPE_SH7206 is not set
 # CONFIG_CPU_SUBTYPE_SH7705 is not set
 # CONFIG_CPU_SUBTYPE_SH7706 is not set
 # CONFIG_CPU_SUBTYPE_SH7707 is not set
 # CONFIG_CPU_SUBTYPE_SH7708 is not set
 # CONFIG_CPU_SUBTYPE_SH7709 is not set
 # CONFIG_CPU_SUBTYPE_SH7710 is not set
-
-#
-# SH-4 Processor Support
-#
+# CONFIG_CPU_SUBTYPE_SH7712 is not set
 # CONFIG_CPU_SUBTYPE_SH7750 is not set
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
-
-#
-# ST40 Processor Support
-#
 # CONFIG_CPU_SUBTYPE_ST40STB1 is not set
 # CONFIG_CPU_SUBTYPE_ST40GX1 is not set
-
-#
-# SH-4A Processor Support
-#
 # CONFIG_CPU_SUBTYPE_SH7770 is not set
 # CONFIG_CPU_SUBTYPE_SH7780 is not set
-
-#
-# SH4AL-DSP Processor Support
-#
-# CONFIG_CPU_SUBTYPE_SH73180 is not set
+# CONFIG_CPU_SUBTYPE_SH7785 is not set
+# CONFIG_CPU_SUBTYPE_SHX3 is not set
 # CONFIG_CPU_SUBTYPE_SH7343 is not set
+# CONFIG_CPU_SUBTYPE_SH7722 is not set
 
 #
 # Memory management options
 #
+CONFIG_QUICKLIST=y
 CONFIG_MMU=y
 CONFIG_PAGE_OFFSET=0x80000000
 CONFIG_MEMORY_START=0x08000000
 CONFIG_MEMORY_SIZE=0x01000000
 CONFIG_VSYSCALL=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+CONFIG_MAX_ACTIVE_REGIONS=1
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
 # CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPARSEMEM_STATIC=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_NR_QUICK=2
 
 #
 # Cache configuration
 #
 # CONFIG_SH_DIRECT_MAPPED is not set
 # CONFIG_SH_WRITETHROUGH is not set
-# CONFIG_SH_OCRAM is not set
 
 #
 # Processor features
 #
 CONFIG_CPU_LITTLE_ENDIAN=y
+# CONFIG_CPU_BIG_ENDIAN is not set
 CONFIG_SH_FPU=y
 # CONFIG_SH_DSP is not set
 # CONFIG_SH_STORE_QUEUES is not set
 CONFIG_CPU_HAS_INTEVT=y
+CONFIG_CPU_HAS_INTC_IRQ=y
+CONFIG_CPU_HAS_IPR_IRQ=y
 CONFIG_CPU_HAS_SR_RB=y
+CONFIG_CPU_HAS_PTEA=y
+
+#
+# Board support
+#
+# CONFIG_SH_7751_SYSTEMH is not set
+CONFIG_SH_SECUREEDGE5410=y
+# CONFIG_SH_HS7751RVOIP is not set
+# CONFIG_SH_RTS7751R2D is not set
+# CONFIG_SH_LANDISK is not set
+# CONFIG_SH_TITAN is not set
+# CONFIG_SH_LBOX_RE2 is not set
 
 #
-# Timer support
+# Timer and clock configuration
 #
 CONFIG_SH_TMU=y
+CONFIG_SH_TIMER_IRQ=16
 CONFIG_SH_PCLK_FREQ=60000000
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
 
 #
 # CPU Frequency scaling
@@ -210,24 +201,31 @@ CONFIG_SH_PCLK_FREQ=60000000
 #
 # DMA support
 #
+CONFIG_SH_DMA_API=y
 CONFIG_SH_DMA=y
-CONFIG_NR_ONCHIP_DMA_CHANNELS=4
+CONFIG_NR_ONCHIP_DMA_CHANNELS=8
 # CONFIG_NR_DMA_CHANNELS_BOOL is not set
 
 #
 # Companion Chips
 #
-# CONFIG_HD6446X_SERIES is not set
+
+#
+# Additional SuperH Device Drivers
+#
+# CONFIG_HEARTBEAT is not set
+# CONFIG_PUSH_SWITCH is not set
 
 #
 # Kernel features
 #
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 # CONFIG_KEXEC is not set
-# CONFIG_SMP is not set
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
@@ -243,32 +241,23 @@ CONFIG_BOOT_LINK_OFFSET=0x00800000
 #
 # Bus options
 #
+CONFIG_SH_CONCAT_FS=y
 CONFIG_PCI=y
-# CONFIG_SH_PCIDMA_NONCOHERENT is not set
+CONFIG_SH_PCIDMA_NONCOHERENT=y
 CONFIG_PCI_AUTO=y
 CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
-# CONFIG_PCI_MULTITHREAD_PROBE is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
 
 #
 # PCCARD (PCMCIA/CardBus) support
 #
 
-#
-# PCI Hotplug Support
-#
-
 #
 # Executable file formats
 #
 CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_FLAT is not set
 # CONFIG_BINFMT_MISC is not set
 
-#
-# Power management options (EXPERIMENTAL)
-#
-# CONFIG_PM is not set
-
 #
 # Networking
 #
@@ -277,21 +266,14 @@ CONFIG_NET=y
 #
 # Networking options
 #
-# CONFIG_NETDEBUG is not set
 # CONFIG_PACKET is not set
 # CONFIG_UNIX is not set
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-# CONFIG_XFRM_SUB_POLICY is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # 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 is not set
-# CONFIG_IP_PNP_RARP is not set
+# CONFIG_IP_PNP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
 # CONFIG_ARPD is not set
@@ -301,32 +283,21 @@ CONFIG_IP_PNP_DHCP=y
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
-CONFIG_INET_XFRM_MODE_TRANSPORT=y
-CONFIG_INET_XFRM_MODE_TUNNEL=y
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_DIAG is not set
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IPV6 is not set
 # CONFIG_INET6_XFRM_TUNNEL is not set
 # CONFIG_INET6_TUNNEL is not set
 # CONFIG_NETWORK_SECMARK is not set
 # CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
 # CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
 # CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
 # CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
@@ -352,7 +323,17 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
 # CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
 # Device Drivers
@@ -364,30 +345,88 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 # CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
 # CONFIG_CONNECTOR is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+# CONFIG_MTD_BLOCK is not set
+CONFIG_MTD_BLOCK_RO=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+# CONFIG_MTD_CFI_I2 is not set
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+CONFIG_MTD_RAM=y
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_PLATRAM=y
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
 # CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-# CONFIG_BLK_CPQ_DA is not set
+CONFIG_BLK_DEV=y
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
@@ -399,13 +438,9 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
-CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
+# CONFIG_MISC_DEVICES is not set
 # CONFIG_IDE is not set
 
 #
@@ -413,16 +448,9 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # CONFIG_RAID_ATTRS is not set
 # CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
 # CONFIG_SCSI_NETLINK is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
 # CONFIG_ATA is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
 # CONFIG_MD is not set
 
 #
@@ -433,35 +461,18 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # IEEE 1394 (FireWire) support
 #
+# CONFIG_FIREWIRE is not set
 # CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
 # CONFIG_I2O is not set
-
-#
-# Network device support
-#
 CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
-
-#
-# ARCnet devices
-#
 # CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
 # CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
 # CONFIG_STNIC is not set
@@ -470,10 +481,6 @@ CONFIG_MII=y
 # CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_SMC91X is not set
-
-#
-# Tulip family network device support
-#
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
 CONFIG_NET_PCI=y
@@ -488,9 +495,9 @@ CONFIG_NET_PCI=y
 # CONFIG_FEALNX is not set
 # CONFIG_NATSEMI is not set
 # CONFIG_NE2K_PCI is not set
-# CONFIG_8139CP is not set
+CONFIG_8139CP=y
 CONFIG_8139TOO=y
-# CONFIG_8139TOO_PIO is not set
+CONFIG_8139TOO_PIO=y
 # CONFIG_8139TOO_TUNE_TWISTER is not set
 # CONFIG_8139TOO_8129 is not set
 # CONFIG_8139_OLD_RX_RESET is not set
@@ -499,47 +506,16 @@ CONFIG_8139TOO=y
 # CONFIG_SUNDANCE is not set
 # CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VIA_VELOCITY is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
-# CONFIG_QLA3XXX is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-# CONFIG_MYRI10GE is not set
-
-#
-# Token Ring devices
-#
+# CONFIG_SC92031 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
 # CONFIG_TR is not set
 
 #
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
+# Wireless LAN
 #
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
 # CONFIG_WAN is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
@@ -549,15 +525,7 @@ CONFIG_8139TOO=y
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
 # CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
 # CONFIG_PHONE is not set
 
 #
@@ -565,14 +533,12 @@ CONFIG_8139TOO=y
 #
 CONFIG_INPUT=y
 # CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
 #
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_TSDEV is not set
 # CONFIG_INPUT_EVDEV is not set
@@ -584,27 +550,20 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_KEYBOARD is not set
 # CONFIG_INPUT_MOUSE is not set
 # CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 # CONFIG_INPUT_MISC is not set
 
 #
 # Hardware I/O ports
 #
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_LIBPS2 is not set
-# CONFIG_SERIO_RAW is not set
+# CONFIG_SERIO is not set
 # CONFIG_GAMEPORT is not set
 
 #
 # Character devices
 #
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_VT is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -615,42 +574,24 @@ CONFIG_HW_CONSOLE=y
 #
 # Non-8250 serial port support
 #
-# CONFIG_SERIAL_SH_SCI is not set
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_SH_SCI_NR_UARTS=2
+CONFIG_SERIAL_SH_SCI_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
 # CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-
-#
-# IPMI
-#
 # CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
 # CONFIG_WATCHDOG is not set
-CONFIG_HW_RANDOM=y
-# CONFIG_GEN_RTC is not set
-# CONFIG_DTLK is not set
+# CONFIG_HW_RANDOM is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
 # CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
-
-#
-# TPM devices
-#
 # CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
+CONFIG_DEVPORT=y
 # CONFIG_I2C is not set
 
 #
@@ -658,97 +599,45 @@ CONFIG_HW_RANDOM=y
 #
 # CONFIG_SPI is not set
 # CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
 
 #
-# Dallas's 1-wire bus
-#
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ABITUGURU is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_VT1211 is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
+# Multifunction device drivers
 #
+# CONFIG_MFD_SM501 is not set
 
 #
 # Multimedia devices
 #
 # CONFIG_VIDEO_DEV is not set
-CONFIG_VIDEO_V4L2=y
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
 
 #
 # Graphics support
 #
-CONFIG_FIRMWARE_EDID=y
-# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
-# Console display driver support
+# Display device support
 #
-CONFIG_DUMMY_CONSOLE=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
 
 #
 # Sound
 #
 # CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-# CONFIG_USB is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
 # CONFIG_MMC is not set
-
-#
-# LED devices
-#
 # CONFIG_NEW_LEDS is not set
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-
-#
-# InfiniBand support
-#
 # CONFIG_INFINIBAND is not set
 
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-
 #
 # Real Time Clock
 #
@@ -767,6 +656,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 # DMA Devices
 #
 
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
 #
 # File systems
 #
@@ -774,17 +668,18 @@ CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_EXT2_FS_XIP is not set
 # CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 CONFIG_ROMFS_FS=y
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
+# CONFIG_INOTIFY is not set
 # CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
+# CONFIG_DNOTIFY is not set
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
 # CONFIG_FUSE_FS is not set
@@ -826,6 +721,7 @@ CONFIG_RAMFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
 CONFIG_CRAMFS=y
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
@@ -836,25 +732,13 @@ CONFIG_CRAMFS=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_NFS_FS is not set
 # CONFIG_NFSD is not set
-CONFIG_ROOT_NFS=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=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
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -867,6 +751,11 @@ CONFIG_MSDOS_PARTITION=y
 #
 # CONFIG_NLS is not set
 
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
 #
 # Profiling support
 #
@@ -875,36 +764,38 @@ CONFIG_MSDOS_PARTITION=y
 #
 # Kernel hacking
 #
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
 CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
 # CONFIG_DEBUG_KERNEL is not set
-CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_BUGVERBOSE is not set
-# CONFIG_DEBUG_FS is not set
-# CONFIG_UNWIND_INFO is not set
 # CONFIG_SH_STANDARD_BIOS is not set
 # CONFIG_EARLY_SCIF_CONSOLE is not set
-# CONFIG_KGDB is not set
+# CONFIG_SH_KGDB is not set
 
 #
 # Security options
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
 # CONFIG_CRYPTO is not set
 
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index c16350dac01bf8ebc854566d9e937ff888201126..af921b5a9d4638e368a9a0cc54d0e38ecd5bd21f 100644 (file)
@@ -141,7 +141,7 @@ CONFIG_CPU_SH4=y
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
index 41049cf14b791100cfe2c8e2013f30d7044e0597..0686ed6fe17a8a5abf5038989711d781565ba08b 100644 (file)
@@ -147,7 +147,7 @@ CONFIG_CPU_SH4=y
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
index d8e122971c3e2caaa78028513b8f3a61d78de425..0d12a124055ca7d4a31ffaee1e955dc654cb7bc4 100644 (file)
@@ -149,8 +149,7 @@ call_dpf:
         lds    r10, pr
        rts
         nop
-0:     sti
-       mov.l   3f, r0
+0:     mov.l   3f, r0
        mov     r9, r6
        mov     r8, r5
        jmp     @r0
index 502d43e4785c200bf557bdcca552caaa7df5273a..67015044d74a935f75bff8c86e58dce737faeaf0 100644 (file)
@@ -854,9 +854,14 @@ void __init trap_init(void)
        set_exception_table_evt(0x800, do_reserved_inst);
        set_exception_table_evt(0x820, do_illegal_slot_inst);
 #elif defined(CONFIG_SH_FPU)
+#ifdef CONFIG_CPU_SUBTYPE_SHX3
+       set_exception_table_evt(0xd80, do_fpu_state_restore);
+       set_exception_table_evt(0xda0, do_fpu_state_restore);
+#else
        set_exception_table_evt(0x800, do_fpu_state_restore);
        set_exception_table_evt(0x820, do_fpu_state_restore);
 #endif
+#endif
 
 #ifdef CONFIG_CPU_SH2
        set_exception_table_vec(TRAP_ADDRESS_ERROR, address_error_handler);
index d677d7f3afc1d03e892eb2959f9130a71706a07c..4061e89d84d09fff645297747e28482f5364a76b 100644 (file)
@@ -8,7 +8,9 @@ obj-$(CONFIG_CPU_SH2)   += cache-sh2.o
 obj-$(CONFIG_CPU_SH3)  += cache-sh3.o
 obj-$(CONFIG_CPU_SH4)  += cache-sh4.o
 
-mmu-y                  := fault-nommu.o tlb-nommu.o pg-nommu.o
+mmu-y                  := tlb-nommu.o pg-nommu.o
+mmu-$(CONFIG_CPU_SH3)  += fault-nommu.o
+mmu-$(CONFIG_CPU_SH4)  += fault-nommu.o
 mmu-$(CONFIG_MMU)      := fault.o clear_page.o copy_page.o tlb-flush.o \
                           ioremap.o
 
index 923cb456819b0ceb79f3c66139602a45ae4f8232..c6f5b51ec2c744b7ef941f8eaa2a36a2a673a3c3 100644 (file)
@@ -1,47 +1,33 @@
-/* 
+/*
  * arch/sh/mm/fault-nommu.c
  *
- * Copyright (C) 2002 Paul Mundt
+ * Copyright (C) 2002 - 2007 Paul Mundt
  *
  * Based on linux/arch/sh/mm/fault.c:
  *  Copyright (C) 1999  Niibe Yutaka
  *
  * Released under the terms of the GNU GPL v2.0.
  */
-
-#include <linux/signal.h>
-#include <linux/sched.h>
 #include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/types.h>
-#include <linux/ptrace.h>
-#include <linux/mman.h>
 #include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/interrupt.h>
-
+#include <linux/hardirq.h>
+#include <linux/kprobes.h>
 #include <asm/system.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
-#include <asm/pgalloc.h>
-#include <asm/mmu_context.h>
-#include <asm/cacheflush.h>
-
-#if defined(CONFIG_SH_KGDB)
+#include <asm/ptrace.h>
 #include <asm/kgdb.h>
-#endif
-
-extern void die(const char *,struct pt_regs *,long);
 
 /*
  * This routine handles page faults.  It determines the address,
  * and the problem, and then passes it off to one of the appropriate
  * routines.
  */
-asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
-                             unsigned long address)
+asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
+                                       unsigned long writeaccess,
+                                       unsigned long address)
 {
+       trace_hardirqs_on();
+       local_irq_enable();
+
 #if defined(CONFIG_SH_KGDB)
        if (kgdb_nofault && kgdb_bus_err_hook)
                kgdb_bus_err_hook();
@@ -65,17 +51,14 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
        do_exit(SIGKILL);
 }
 
-asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
-                              unsigned long address)
+asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
+                                        unsigned long writeaccess,
+                                        unsigned long address)
 {
 #if defined(CONFIG_SH_KGDB)
        if (kgdb_nofault && kgdb_bus_err_hook)
                kgdb_bus_err_hook();
 #endif
 
-       if (address >= TASK_SIZE)
-               return 1;
-
-       return 0;
+       return (address >= TASK_SIZE);
 }
-
index 964c6767dc737e0dd0cd3ff361efa8e5415d8715..04a39aa7f1f97029a8c182b93077c9f2a7a67e57 100644 (file)
@@ -184,8 +184,7 @@ no_context:
                printk(KERN_ALERT "pc = %08lx\n", regs->pc);
                page = (unsigned long)get_TTB();
                if (page) {
-                       page = ((__typeof__(page) *) __va(page))[address >>
-                                                                PGDIR_SHIFT];
+                       page = ((__typeof__(page) *)page)[address >> PGDIR_SHIFT];
                        printk(KERN_ALERT "*pde = %08lx\n", page);
                        if (page & _PAGE_PRESENT) {
                                page &= PAGE_MASK;
index eac38388f5fd354bf35681e97534ba14368a27e5..88d2cefd01bee1bc25d9f8ae85413bd80dc38a17 100644 (file)
@@ -1,7 +1,6 @@
-/* $Id: entry.S,v 1.170 2001/11/13 00:57:05 davem Exp $
- * arch/sparc/kernel/entry.S:  Sparc trap low-level entry points.
+/* arch/sparc/kernel/entry.S:  Sparc trap low-level entry points.
  *
- * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
+ * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
  * Copyright (C) 1996 Eddie C. Dost   (ecd@skynet.be)
  * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
  * Copyright (C) 1996-1999 Jakub Jelinek   (jj@sunsite.mff.cuni.cz)
@@ -129,7 +128,7 @@ trap_low:
        RESTORE_ALL
 #endif
 
-#ifdef CONFIG_BLK_DEV_FD
+#if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE)
        .text
        .align  4
        .globl  floppy_hardint
index 75b2240ad0f9efe1bd73290a3ed076a700de0186..b76dc03fc3187fa50c6d80213bc8609e28fc72a3 100644 (file)
@@ -351,34 +351,14 @@ void handler_irq(int irq, struct pt_regs * regs)
        set_irq_regs(old_regs);
 }
 
-#ifdef CONFIG_BLK_DEV_FD
-extern void floppy_interrupt(int irq, void *dev_id);
-
-void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
-{
-       struct pt_regs *old_regs;
-       int cpu = smp_processor_id();
-
-       old_regs = set_irq_regs(regs);
-       disable_pil_irq(irq);
-       irq_enter();
-       kstat_cpu(cpu).irqs[irq]++;
-       floppy_interrupt(irq, dev_id);
-       irq_exit();
-       enable_pil_irq(irq);
-       set_irq_regs(old_regs);
-       // XXX Eek, it's totally changed with preempt_count() and such
-       // if (softirq_pending(cpu))
-       //      do_softirq();
-}
-#endif
+#if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE)
 
 /* Fast IRQs on the Sparc can only have one routine attached to them,
  * thus no sharing possible.
  */
-int request_fast_irq(unsigned int irq,
-                    irq_handler_t handler,
-                    unsigned long irqflags, const char *devname)
+static int request_fast_irq(unsigned int irq,
+                           void (*handler)(void),
+                           unsigned long irqflags, const char *devname)
 {
        struct irqaction *action;
        unsigned long flags;
@@ -457,7 +437,6 @@ int request_fast_irq(unsigned int irq,
         */
        flush_cache_all();
 
-       action->handler = handler;
        action->flags = irqflags;
        cpus_clear(action->mask);
        action->name = devname;
@@ -475,6 +454,61 @@ out:
        return ret;
 }
 
+/* These variables are used to access state from the assembler
+ * interrupt handler, floppy_hardint, so we cannot put these in
+ * the floppy driver image because that would not work in the
+ * modular case.
+ */
+volatile unsigned char *fdc_status;
+EXPORT_SYMBOL(fdc_status);
+
+char *pdma_vaddr;
+EXPORT_SYMBOL(pdma_vaddr);
+
+unsigned long pdma_size;
+EXPORT_SYMBOL(pdma_size);
+
+volatile int doing_pdma;
+EXPORT_SYMBOL(doing_pdma);
+
+char *pdma_base;
+EXPORT_SYMBOL(pdma_base);
+
+unsigned long pdma_areasize;
+EXPORT_SYMBOL(pdma_areasize);
+
+extern void floppy_hardint(void);
+
+static irqreturn_t (*floppy_irq_handler)(int irq, void *dev_id);
+
+void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
+{
+       struct pt_regs *old_regs;
+       int cpu = smp_processor_id();
+
+       old_regs = set_irq_regs(regs);
+       disable_pil_irq(irq);
+       irq_enter();
+       kstat_cpu(cpu).irqs[irq]++;
+       floppy_irq_handler(irq, dev_id);
+       irq_exit();
+       enable_pil_irq(irq);
+       set_irq_regs(old_regs);
+       // XXX Eek, it's totally changed with preempt_count() and such
+       // if (softirq_pending(cpu))
+       //      do_softirq();
+}
+
+int sparc_floppy_request_irq(int irq, unsigned long flags,
+                            irqreturn_t (*irq_handler)(int irq, void *))
+{
+       floppy_irq_handler = irq_handler;
+       return request_fast_irq(irq, floppy_hardint, flags, "floppy");
+}
+EXPORT_SYMBOL(sparc_floppy_request_irq);
+
+#endif
+
 int request_irq(unsigned int irq,
                irq_handler_t handler,
                unsigned long irqflags, const char * devname, void *dev_id)
index 7b4abde43028a259282c398bb88b889894ddd734..ef647acc479e4cdc00cf5f3009667454ed47a0fc 100644 (file)
@@ -143,7 +143,6 @@ EXPORT_SYMBOL(mstk48t02_regs);
 EXPORT_SYMBOL(set_auxio);
 EXPORT_SYMBOL(get_auxio);
 #endif
-EXPORT_SYMBOL(request_fast_irq);
 EXPORT_SYMBOL(io_remap_pfn_range);
   /* P3: iounit_xxx may be needed, sun4d users */
 /* EXPORT_SYMBOL(iounit_map_dma_init); */
index db703758db98c3ec0a7f26067e6d410f3fe770c7..7e427b4c74b5fe0ea5a8c87e9250a4c0b576fe95 100644 (file)
@@ -907,6 +907,8 @@ static void bus_reset_tasklet(unsigned long data)
        int self_id_count, i, j, reg;
        int generation, new_generation;
        unsigned long flags;
+       void *free_rom = NULL;
+       dma_addr_t free_rom_bus = 0;
 
        reg = reg_read(ohci, OHCI1394_NodeID);
        if (!(reg & OHCI1394_NodeID_idValid)) {
@@ -970,8 +972,8 @@ static void bus_reset_tasklet(unsigned long data)
         */
 
        if (ohci->next_config_rom != NULL) {
-               dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
-                                 ohci->config_rom, ohci->config_rom_bus);
+               free_rom     = ohci->config_rom;
+               free_rom_bus = ohci->config_rom_bus;
                ohci->config_rom      = ohci->next_config_rom;
                ohci->config_rom_bus  = ohci->next_config_rom_bus;
                ohci->next_config_rom = NULL;
@@ -990,6 +992,10 @@ static void bus_reset_tasklet(unsigned long data)
 
        spin_unlock_irqrestore(&ohci->lock, flags);
 
+       if (free_rom)
+               dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
+                                 free_rom, free_rom_bus);
+
        fw_core_handle_bus_reset(&ohci->card, ohci->node_id, generation,
                                 self_id_count, ohci->self_id_buffer);
 }
@@ -1186,7 +1192,7 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length)
 {
        struct fw_ohci *ohci;
        unsigned long flags;
-       int retval = 0;
+       int retval = -EBUSY;
        __be32 *next_config_rom;
        dma_addr_t next_config_rom_bus;
 
@@ -1240,10 +1246,7 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length)
 
                reg_write(ohci, OHCI1394_ConfigROMmap,
                          ohci->next_config_rom_bus);
-       } else {
-               dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
-                                 next_config_rom, next_config_rom_bus);
-               retval = -EBUSY;
+               retval = 0;
        }
 
        spin_unlock_irqrestore(&ohci->lock, flags);
@@ -1257,6 +1260,9 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length)
         */
        if (retval == 0)
                fw_core_initiate_bus_reset(&ohci->card, 1);
+       else
+               dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
+                                 next_config_rom, next_config_rom_bus);
 
        return retval;
 }
index 3e4a369d0057f4679dff2dcf23acedb4123ec454..ba816ef6def1b66b97a250a5b70a7d719fbee367 100644 (file)
@@ -984,6 +984,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
        struct fw_unit *unit = sd->unit;
        struct fw_device *device = fw_device(unit->device.parent);
        struct sbp2_command_orb *orb;
+       unsigned max_payload;
 
        /*
         * Bidirectional commands are not yet implemented, and unknown
@@ -1017,8 +1018,10 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
         * specifies the max payload size as 2 ^ (max_payload + 2), so
         * if we set this to max_speed + 7, we get the right value.
         */
+       max_payload = min(device->max_speed + 7,
+                         device->card->max_receive - 1);
        orb->request.misc =
-               COMMAND_ORB_MAX_PAYLOAD(device->max_speed + 7) |
+               COMMAND_ORB_MAX_PAYLOAD(max_payload) |
                COMMAND_ORB_SPEED(device->max_speed) |
                COMMAND_ORB_NOTIFY;
 
index 3ce8e2fbe15fc3d84fb6be6cf8b73cdcc195ac2c..3e1cb12e43cd13f3b8777af28f78c94f7bfb03d0 100644 (file)
@@ -734,7 +734,7 @@ fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
 }
 EXPORT_SYMBOL(fw_core_handle_response);
 
-const struct fw_address_region topology_map_region =
+static const struct fw_address_region topology_map_region =
        { .start = 0xfffff0001000ull, .end = 0xfffff0001400ull, };
 
 static void
@@ -772,7 +772,7 @@ static struct fw_address_handler topology_map = {
        .address_callback       = handle_topology_map,
 };
 
-const struct fw_address_region registers_region =
+static const struct fw_address_region registers_region =
        { .start = 0xfffff0000000ull, .end = 0xfffff0000400ull, };
 
 static void
index 5ceaccd10564cbfd7623757ba351e8490d542fe7..fa7967b57408586359f70ae5bc610f39d7a55223 100644 (file)
@@ -231,7 +231,7 @@ struct fw_card {
        unsigned long reset_jiffies;
 
        unsigned long long guid;
-       int max_receive;
+       unsigned max_receive;
        int link_speed;
        int config_rom_generation;
 
index 8012b3b0ce75b83c23ae81f872fadb645167e3f1..545663ef820b3992211d4dab31a05ea28f7272c4 100644 (file)
@@ -97,7 +97,7 @@ config IEEE1394_SBP2
 
 config IEEE1394_SBP2_PHYS_DMA
        bool "Enable replacement for physical DMA in SBP2"
-       depends on IEEE1394 && IEEE1394_SBP2 && EXPERIMENTAL && (X86_32 || PPC_32)
+       depends on IEEE1394_SBP2 && VIRT_TO_BUS && EXPERIMENTAL
        help
          This builds sbp2 for use with non-OHCI host adapters which do not
          support physical DMA or for when ohci1394 is run with phys_dma=0.
index e882cb951b474e06a11a861327f8dde7c73d316f..47dbe8f17e8210cabe7b87254b7ba1ac329a1c9d 100644 (file)
@@ -773,11 +773,6 @@ static struct sbp2_lu *sbp2_alloc_device(struct unit_directory *ud)
                        SBP2_ERR("failed to register lower 4GB address range");
                        goto failed_alloc;
                }
-#else
-               if (dma_set_mask(hi->host->device.parent, DMA_32BIT_MASK)) {
-                       SBP2_ERR("failed to set 4GB DMA mask");
-                       goto failed_alloc;
-               }
 #endif
        }
 
index 3f6e176e6ea1b5dde193fa3ad78a17d20c92a181..58c806e9c58a2a941578fe9a629d0187b8ea777b 100644 (file)
@@ -38,7 +38,7 @@ config BATTERY_DS2760
 
 config BATTERY_PMU
        tristate "Apple PMU battery"
-       depends on ADB_PMU
+       depends on PPC32 && ADB_PMU
        help
          Say Y here to expose battery information on Apple machines
          through the generic battery class.
index 2f5a5ac1b271d009ea69ac6b85608fd23406499c..301313002f6b3abc0d1fa67c1ec59d11c8c7ffab 100644 (file)
@@ -2514,7 +2514,7 @@ static int __init serial8250_console_setup(struct console *co, char *options)
        return uart_set_options(port, co, baud, parity, bits, flow);
 }
 
-static int __init serial8250_console_early_setup(void)
+static int serial8250_console_early_setup(void)
 {
        return serial8250_find_port_for_earlycon();
 }
index 150cad5c2eba1adecd0896854cfa83b7c2161639..4d4c9f01be8da7dbde5fa1951cbfbf5ab8bfb593 100644 (file)
@@ -227,7 +227,7 @@ int __init setup_early_serial8250_console(char *cmdline)
        return 0;
 }
 
-int __init serial8250_find_port_for_earlycon(void)
+int serial8250_find_port_for_earlycon(void)
 {
        struct early_serial8250_device *device = &early_device;
        struct uart_port *port = &device->port;
index 87c74712353873f14c15927556ecaf0eeeaa0f77..ee9046db9c7da58c4fe110a070a1ab28bb8cd1db 100644 (file)
@@ -677,6 +677,7 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id *
        struct fb_info *info;
        struct cg6_par *par;
        int linebytes, err;
+       int dblbuf;
 
        info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev);
 
@@ -698,7 +699,9 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id *
        linebytes = of_getintprop_default(dp, "linebytes",
                                          info->var.xres);
        par->fbsize = PAGE_ALIGN(linebytes * info->var.yres);
-       if (of_find_property(dp, "dblbuf", NULL))
+
+       dblbuf = of_getintprop_default(dp, "dblbuf", 0);
+       if (dblbuf)
                par->fbsize *= 4;
 
        par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET,
index 10565ac7966a4f7c5c43ccd534501f60ee3c9f1f..5d7800aa31b514df1954f128481569549388c622 100644 (file)
@@ -37,7 +37,7 @@
 #define PA_VERREG      0xa4000032      /* FPGA Version Register */
 #define PA_INPORT      0xa4000034      /* KEY Input Port control */
 #define PA_OUTPORT     0xa4000036      /* LED control */
-#define PA_DMPORT      0xa4000038      /* DM270 Output Port control */
+#define PA_BVERREG     0xa4000038      /* Board Revision Register */
 
 #define PA_AX88796L    0xaa000400      /* AX88796L Area */
 #define PA_VOYAGER     0xab000000      /* VOYAGER GX Area */
index 5db60b5ae7b09d26812f7dfb1d735183e721aced..7bbdfc77accd61ff48d2ed9c426b9ec71eb695d3 100644 (file)
@@ -16,6 +16,7 @@
 #define O_LARGEFILE    0x40000
 #define O_DIRECT        0x100000 /* direct disk access hint */
 #define O_NOATIME      0x200000
+#define O_CLOEXEC      0x400000
 
 #define F_GETOWN       5       /*  for sockets. */
 #define F_SETOWN       6       /*  for sockets. */
@@ -31,6 +32,5 @@
 #define __ARCH_FLOCK_PAD       short __unused;
 #define __ARCH_FLOCK64_PAD     short __unused;
 
-#include <asm-generic/fcntl.h>
 
 #endif
index 28ce2b9c3da80708af5e9c02995643a4cc3af769..acd06d8ff70a040ba5063ca99b93689c231f24eb 100644 (file)
@@ -48,7 +48,7 @@ struct sun_flpy_controller {
 
 /* You'll only ever find one controller on a SparcStation anyways. */
 static struct sun_flpy_controller *sun_fdc = NULL;
-volatile unsigned char *fdc_status;
+extern volatile unsigned char *fdc_status;
 
 struct sun_floppy_ops {
        unsigned char (*fd_inb)(int port);
@@ -225,13 +225,13 @@ static void sun_82077_fd_outb(unsigned char value, int port)
  * underruns.  If non-zero, doing_pdma encodes the direction of
  * the transfer for debugging.  1=read 2=write
  */
-char *pdma_vaddr;
-unsigned long pdma_size;
-volatile int doing_pdma = 0;
+extern char *pdma_vaddr;
+extern unsigned long pdma_size;
+extern volatile int doing_pdma;
 
 /* This is software state */
-char *pdma_base = NULL;
-unsigned long pdma_areasize;
+extern char *pdma_base;
+extern unsigned long pdma_areasize;
 
 /* Common routines to all controller types on the Sparc. */
 static __inline__ void virtual_dma_init(void)
@@ -281,7 +281,8 @@ static __inline__ void sun_fd_enable_dma(void)
 }
 
 /* Our low-level entry point in arch/sparc/kernel/entry.S */
-irqreturn_t floppy_hardint(int irq, void *unused);
+extern int sparc_floppy_request_irq(int irq, unsigned long flags,
+                                   irqreturn_t (*irq_handler)(int irq, void *));
 
 static int sun_fd_request_irq(void)
 {
@@ -290,8 +291,9 @@ static int sun_fd_request_irq(void)
 
        if(!once) {
                once = 1;
-               error = request_fast_irq(FLOPPY_IRQ, floppy_hardint,
-                                        IRQF_DISABLED, "floppy");
+               error = sparc_floppy_request_irq(FLOPPY_IRQ,
+                                                IRQF_DISABLED,
+                                                floppy_interrupt);
                return ((error == 0) ? 0 : -1);
        } else return 0;
 }
index 61fb99643afd3a5ba3d9773f79057a39ac558f85..fe205cc444b889619e82612ac3ba7ed00302035a 100644 (file)
@@ -1,7 +1,6 @@
-/* $Id: irq.h,v 1.32 2000/08/26 02:42:28 anton Exp $
- * irq.h: IRQ registers on the Sparc.
+/* irq.h: IRQ registers on the Sparc.
  *
- * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
+ * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
  */
 
 #ifndef _SPARC_IRQ_H
@@ -13,6 +12,4 @@
 
 #define irq_canonicalize(irq)  (irq)
 
-extern int request_fast_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, __const__ char *devname);
-
 #endif
index a72a5f271f3154d3069a75e83279cd355c07198e..1fc655452b812cba0421f54211ccc451f076478e 100644 (file)
@@ -108,6 +108,25 @@ static inline void dma_sync_single_for_device(struct device *dev,
        dma_ops->sync_single_for_device(dev, dma_handle, size, direction);
 }
 
+static inline void dma_sync_single_range_for_cpu(struct device *dev,
+                                                dma_addr_t dma_handle,
+                                                unsigned long offset,
+                                                size_t size,
+                                                enum dma_data_direction direction)
+{
+       dma_sync_single_for_cpu(dev, dma_handle+offset, size, direction);
+}
+
+static inline void dma_sync_single_range_for_device(struct device *dev,
+                                                   dma_addr_t dma_handle,
+                                                   unsigned long offset,
+                                                   size_t size,
+                                                   enum dma_data_direction direction)
+{
+       dma_sync_single_for_device(dev, dma_handle+offset, size, direction);
+}
+
+
 static inline void dma_sync_sg_for_cpu(struct device *dev,
                                       struct scatterlist *sg, int nelems,
                                       enum dma_data_direction direction)
index b2aecf0054bd2167b990ddc2da53dec57458aca9..111f6b3b8925a4bb30961b1c577072b2ad7724cf 100644 (file)
@@ -16,7 +16,7 @@
 #define O_LARGEFILE    0x40000
 #define O_DIRECT        0x100000 /* direct disk access hint */
 #define O_NOATIME      0x200000
-
+#define O_CLOEXEC      0x400000
 
 #define F_GETOWN       5       /*  for sockets. */
 #define F_SETOWN       6       /*  for sockets. */
index 16baef4dab7ed813729d9879be38399b85682f6a..d529045c16795b6506618b6cd047d614a0513264 100644 (file)
@@ -189,6 +189,16 @@ int sctp_assocs_proc_init(void);
 void sctp_assocs_proc_exit(void);
 
 
+/*
+ * Module global variables
+ */
+
+ /*
+  * sctp/protocol.c
+  */
+extern struct kmem_cache *sctp_chunk_cachep __read_mostly;
+extern struct kmem_cache *sctp_bucket_cachep __read_mostly;
+
 /*
  *  Section:  Macros, externs, and inlines
  */
index c209361ab74a7ff00fe62da4b7b4a6a2ed1cb5eb..185c7ecce4cc159e845c3e9afa62a7facc7b8bea 100644 (file)
@@ -281,7 +281,7 @@ extern int                  tcp_v4_remember_stamp(struct sock *sk);
 
 extern int                     tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw);
 
-extern int                     tcp_sendmsg(struct kiocb *iocb, struct sock *sk,
+extern int                     tcp_sendmsg(struct kiocb *iocb, struct socket *sock,
                                            struct msghdr *msg, size_t size);
 extern ssize_t                 tcp_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags);
 
index 464c2b172f07477ca27a453edcf93fb6eeebe1c6..9578c1ae19ca9fde7a69e27fe617d3b928438637 100644 (file)
@@ -813,7 +813,7 @@ static void exit_notify(struct task_struct *tsk)
                __kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
        }
 
-       /* Let father know we died 
+       /* Let father know we died
         *
         * Thread signals are configurable, but you aren't going to use
         * that to send signals to arbitary processes. 
@@ -826,9 +826,7 @@ static void exit_notify(struct task_struct *tsk)
         * If our self_exec id doesn't match our parent_exec_id then
         * we have changed execution domain as these two values started
         * the same after a fork.
-        *      
         */
-       
        if (tsk->exit_signal != SIGCHLD && tsk->exit_signal != -1 &&
            ( tsk->parent_exec_id != t->self_exec_id  ||
              tsk->self_exec_id != tsk->parent_exec_id)
@@ -848,9 +846,7 @@ static void exit_notify(struct task_struct *tsk)
        }
 
        state = EXIT_ZOMBIE;
-       if (tsk->exit_signal == -1 &&
-           (likely(tsk->ptrace == 0) ||
-            unlikely(tsk->parent->signal->flags & SIGNAL_GROUP_EXIT)))
+       if (tsk->exit_signal == -1 && likely(!tsk->ptrace))
                state = EXIT_DEAD;
        tsk->exit_state = state;
 
index 051d27e36a6c997e95215b90bfd3f50bfa7c9c08..bd2cd062878d6fb1f4b40895ddee7dbe9f9468da 100644 (file)
@@ -732,7 +732,7 @@ int __init add_preferred_console(char *name, int idx, char *options)
        return 0;
 }
 
-int __init update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options)
+int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options)
 {
        struct console_cmdline *c;
        int i;
index ef8156a6aad519014c030f62e856302dacf045e7..b27c01a66448a4bee1e023ccd809b28b0b719b36 100644 (file)
@@ -1561,10 +1561,6 @@ static inline int may_ptrace_stop(void)
                    (current->ptrace & PT_ATTACHED)))
                return 0;
 
-       if (unlikely(current->signal == current->parent->signal) &&
-           unlikely(current->signal->flags & SIGNAL_GROUP_EXIT))
-               return 0;
-
        /*
         * Are we in the middle of do_coredump?
         * If so and our tracer is also part of the coredump stopping
index 06c08e5740fbcca5b0aa37dade5a90f88609ee42..e68103475cca2a76a349d270d1db72c62132b4c7 100644 (file)
@@ -831,7 +831,7 @@ const struct proto_ops inet_stream_ops = {
        .shutdown          = inet_shutdown,
        .setsockopt        = sock_common_setsockopt,
        .getsockopt        = sock_common_getsockopt,
-       .sendmsg           = inet_sendmsg,
+       .sendmsg           = tcp_sendmsg,
        .recvmsg           = sock_common_recvmsg,
        .mmap              = sock_no_mmap,
        .sendpage          = tcp_sendpage,
index 27c7918e442a78f481df21fa0f4b0f0bf3c4a0df..b3dd5de9a25868c26bad3dd97546cbaafbb3fcb7 100644 (file)
@@ -294,15 +294,14 @@ static int exp_open(struct inode *inode, struct file *file)
        struct ct_expect_iter_state *st;
        int ret;
 
-       st = kmalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
-       if (st == NULL)
+       st = kzalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
+       if (!st)
                return -ENOMEM;
        ret = seq_open(file, &exp_seq_ops);
        if (ret)
                goto out_free;
        seq          = file->private_data;
        seq->private = st;
-       memset(st, 0, sizeof(struct ct_expect_iter_state));
        return ret;
 out_free:
        kfree(st);
index 24d7c9f319184aae8a894e25a20eeaad9fa4ce56..c6d71526f625b47c08c3b026fc25e42c1a43f408 100644 (file)
@@ -900,8 +900,9 @@ static int raw_seq_open(struct inode *inode, struct file *file)
 {
        struct seq_file *seq;
        int rc = -ENOMEM;
-       struct raw_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
+       struct raw_iter_state *s;
 
+       s = kzalloc(sizeof(*s), GFP_KERNEL);
        if (!s)
                goto out;
        rc = seq_open(file, &raw_seq_ops);
@@ -910,7 +911,6 @@ static int raw_seq_open(struct inode *inode, struct file *file)
 
        seq = file->private_data;
        seq->private = s;
-       memset(s, 0, sizeof(*s));
 out:
        return rc;
 out_kfree:
index df42b7fb3268bb119c64f4a94b7c24d68722ec10..c7ca94bd152cc945c99c1ab63fcf7d3985d5f639 100644 (file)
@@ -374,8 +374,9 @@ static int rt_cache_seq_open(struct inode *inode, struct file *file)
 {
        struct seq_file *seq;
        int rc = -ENOMEM;
-       struct rt_cache_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
+       struct rt_cache_iter_state *s;
 
+       s = kzalloc(sizeof(*s), GFP_KERNEL);
        if (!s)
                goto out;
        rc = seq_open(file, &rt_cache_seq_ops);
@@ -383,7 +384,6 @@ static int rt_cache_seq_open(struct inode *inode, struct file *file)
                goto out_kfree;
        seq          = file->private_data;
        seq->private = s;
-       memset(s, 0, sizeof(*s));
 out:
        return rc;
 out_kfree:
index da4c0b6ab79ab5f25b5e9accddf592796c93c4ba..7e740112b2383c93b535a0657baf3f5b6fe75d48 100644 (file)
@@ -658,9 +658,10 @@ static inline int select_size(struct sock *sk)
        return tmp;
 }
 
-int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+int tcp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
                size_t size)
 {
+       struct sock *sk = sock->sk;
        struct iovec *iov;
        struct tcp_sock *tp = tcp_sk(sk);
        struct sk_buff *skb;
index 378ca8a086a393436491b0e54638787567fd06e0..f030435e0eb4c972178f78053bd6b4028690e141 100644 (file)
@@ -102,11 +102,14 @@ int sysctl_tcp_abc __read_mostly;
 #define FLAG_DATA_LOST         0x80 /* SACK detected data lossage.             */
 #define FLAG_SLOWPATH          0x100 /* Do not skip RFC checks for window update.*/
 #define FLAG_ONLY_ORIG_SACKED  0x200 /* SACKs only non-rexmit sent before RTO */
+#define FLAG_SND_UNA_ADVANCED  0x400 /* Snd_una was changed (!= FLAG_DATA_ACKED) */
+#define FLAG_DSACKING_ACK      0x800 /* SACK blocks contained DSACK info */
 
 #define FLAG_ACKED             (FLAG_DATA_ACKED|FLAG_SYN_ACKED)
 #define FLAG_NOT_DUP           (FLAG_DATA|FLAG_WIN_UPDATE|FLAG_ACKED)
 #define FLAG_CA_ALERT          (FLAG_DATA_SACKED|FLAG_ECE)
 #define FLAG_FORWARD_PROGRESS  (FLAG_ACKED|FLAG_DATA_SACKED)
+#define FLAG_ANY_PROGRESS      (FLAG_FORWARD_PROGRESS|FLAG_SND_UNA_ADVANCED)
 
 #define IsReno(tp) ((tp)->rx_opt.sack_ok == 0)
 #define IsFack(tp) ((tp)->rx_opt.sack_ok & 2)
@@ -964,12 +967,14 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
 
        /* Check for D-SACK. */
        if (before(ntohl(sp[0].start_seq), TCP_SKB_CB(ack_skb)->ack_seq)) {
+               flag |= FLAG_DSACKING_ACK;
                found_dup_sack = 1;
                tp->rx_opt.sack_ok |= 4;
                NET_INC_STATS_BH(LINUX_MIB_TCPDSACKRECV);
        } else if (num_sacks > 1 &&
                        !after(ntohl(sp[0].end_seq), ntohl(sp[1].end_seq)) &&
                        !before(ntohl(sp[0].start_seq), ntohl(sp[1].start_seq))) {
+               flag |= FLAG_DSACKING_ACK;
                found_dup_sack = 1;
                tp->rx_opt.sack_ok |= 4;
                NET_INC_STATS_BH(LINUX_MIB_TCPDSACKOFORECV);
@@ -1856,7 +1861,7 @@ static void tcp_cwnd_down(struct sock *sk, int flag)
        struct tcp_sock *tp = tcp_sk(sk);
        int decr = tp->snd_cwnd_cnt + 1;
 
-       if ((flag&FLAG_FORWARD_PROGRESS) ||
+       if ((flag&(FLAG_ANY_PROGRESS|FLAG_DSACKING_ACK)) ||
            (IsReno(tp) && !(flag&FLAG_NOT_DUP))) {
                tp->snd_cwnd_cnt = decr&1;
                decr >>= 1;
@@ -2107,15 +2112,13 @@ static void tcp_mtup_probe_success(struct sock *sk, struct sk_buff *skb)
  * tcp_xmit_retransmit_queue().
  */
 static void
-tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una,
-                     int prior_packets, int flag)
+tcp_fastretrans_alert(struct sock *sk, int prior_packets, int flag)
 {
        struct inet_connection_sock *icsk = inet_csk(sk);
        struct tcp_sock *tp = tcp_sk(sk);
-       int is_dupack = (tp->snd_una == prior_snd_una &&
-                        (!(flag&FLAG_NOT_DUP) ||
-                         ((flag&FLAG_DATA_SACKED) &&
-                          (tp->fackets_out > tp->reordering))));
+       int is_dupack = !(flag&(FLAG_SND_UNA_ADVANCED|FLAG_NOT_DUP));
+       int do_lost = is_dupack || ((flag&FLAG_DATA_SACKED) &&
+                                   (tp->fackets_out > tp->reordering));
 
        /* Some technical things:
         * 1. Reno does not count dupacks (sacked_out) automatically. */
@@ -2192,14 +2195,14 @@ tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una,
        /* F. Process state. */
        switch (icsk->icsk_ca_state) {
        case TCP_CA_Recovery:
-               if (prior_snd_una == tp->snd_una) {
+               if (!(flag & FLAG_SND_UNA_ADVANCED)) {
                        if (IsReno(tp) && is_dupack)
                                tcp_add_reno_sack(sk);
                } else {
                        int acked = prior_packets - tp->packets_out;
                        if (IsReno(tp))
                                tcp_remove_reno_sacks(sk, acked);
-                       is_dupack = tcp_try_undo_partial(sk, acked);
+                       do_lost = tcp_try_undo_partial(sk, acked);
                }
                break;
        case TCP_CA_Loss:
@@ -2215,7 +2218,7 @@ tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una,
                /* Loss is undone; fall through to processing in Open state. */
        default:
                if (IsReno(tp)) {
-                       if (tp->snd_una != prior_snd_una)
+                       if (flag & FLAG_SND_UNA_ADVANCED)
                                tcp_reset_reno_sack(tp);
                        if (is_dupack)
                                tcp_add_reno_sack(sk);
@@ -2264,7 +2267,7 @@ tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una,
                tcp_set_ca_state(sk, TCP_CA_Recovery);
        }
 
-       if (is_dupack || tcp_head_timedout(sk))
+       if (do_lost || tcp_head_timedout(sk))
                tcp_update_scoreboard(sk);
        tcp_cwnd_down(sk, flag);
        tcp_xmit_retransmit_queue(sk);
@@ -2684,7 +2687,7 @@ static void tcp_undo_spur_to_response(struct sock *sk, int flag)
  *     to prove that the RTO is indeed spurious. It transfers the control
  *     from F-RTO to the conventional RTO recovery
  */
-static int tcp_process_frto(struct sock *sk, u32 prior_snd_una, int flag)
+static int tcp_process_frto(struct sock *sk, int flag)
 {
        struct tcp_sock *tp = tcp_sk(sk);
 
@@ -2704,8 +2707,7 @@ static int tcp_process_frto(struct sock *sk, u32 prior_snd_una, int flag)
                 * ACK isn't duplicate nor advances window, e.g., opposite dir
                 * data, winupdate
                 */
-               if ((tp->snd_una == prior_snd_una) && (flag&FLAG_NOT_DUP) &&
-                   !(flag&FLAG_FORWARD_PROGRESS))
+               if (!(flag&FLAG_ANY_PROGRESS) && (flag&FLAG_NOT_DUP))
                        return 1;
 
                if (!(flag&FLAG_DATA_ACKED)) {
@@ -2785,6 +2787,9 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
        if (before(ack, prior_snd_una))
                goto old_ack;
 
+       if (after(ack, prior_snd_una))
+               flag |= FLAG_SND_UNA_ADVANCED;
+
        if (sysctl_tcp_abc) {
                if (icsk->icsk_ca_state < TCP_CA_CWR)
                        tp->bytes_acked += ack - prior_snd_una;
@@ -2837,14 +2842,14 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
        flag |= tcp_clean_rtx_queue(sk, &seq_rtt);
 
        if (tp->frto_counter)
-               frto_cwnd = tcp_process_frto(sk, prior_snd_una, flag);
+               frto_cwnd = tcp_process_frto(sk, flag);
 
        if (tcp_ack_is_dubious(sk, flag)) {
                /* Advance CWND, if state allows this. */
                if ((flag & FLAG_DATA_ACKED) && !frto_cwnd &&
                    tcp_may_raise_cwnd(sk, flag))
                        tcp_cong_avoid(sk, ack, prior_in_flight, 0);
-               tcp_fastretrans_alert(sk, prior_snd_una, prior_packets, flag);
+               tcp_fastretrans_alert(sk, prior_packets, flag);
        } else {
                if ((flag & FLAG_DATA_ACKED) && !frto_cwnd)
                        tcp_cong_avoid(sk, ack, prior_in_flight, 1);
index 3f5f7423b95ca818463938dbaad1c8bed8903bb3..9c94627c8c7e1888c3369f42fde366efbbe6d929 100644 (file)
@@ -2425,7 +2425,6 @@ struct proto tcp_prot = {
        .shutdown               = tcp_shutdown,
        .setsockopt             = tcp_setsockopt,
        .getsockopt             = tcp_getsockopt,
-       .sendmsg                = tcp_sendmsg,
        .recvmsg                = tcp_recvmsg,
        .backlog_rcv            = tcp_v4_do_rcv,
        .hash                   = tcp_v4_hash,
index eed09373a45d8cb9685ae28eebcaa761b5ef557e..b5f96372ad7344b3b815b85a5e29a0b08ac8ad13 100644 (file)
@@ -484,7 +484,7 @@ const struct proto_ops inet6_stream_ops = {
        .shutdown          = inet_shutdown,             /* ok           */
        .setsockopt        = sock_common_setsockopt,    /* ok           */
        .getsockopt        = sock_common_getsockopt,    /* ok           */
-       .sendmsg           = inet_sendmsg,              /* ok           */
+       .sendmsg           = tcp_sendmsg,               /* ok           */
        .recvmsg           = sock_common_recvmsg,       /* ok           */
        .mmap              = sock_no_mmap,
        .sendpage          = tcp_sendpage,
index f10f3689d6710274f90676c8dccc68d1fc1dc43d..cbdb78487915de967bcf99e91d104e145c98f9fb 100644 (file)
@@ -2115,7 +2115,6 @@ struct proto tcpv6_prot = {
        .shutdown               = tcp_shutdown,
        .setsockopt             = tcp_setsockopt,
        .getsockopt             = tcp_getsockopt,
-       .sendmsg                = tcp_sendmsg,
        .recvmsg                = tcp_recvmsg,
        .backlog_rcv            = tcp_v6_do_rcv,
        .hash                   = tcp_v6_hash,
index 7b0a95abe934b471183bd88c9cc5d4928499f9c1..5502df115a633df76ea810bc6b92a8d0baa526cb 100644 (file)
@@ -1206,6 +1206,9 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct sadb_msg *hdr,
                x->sel.prefixlen_s = addr->sadb_address_prefixlen;
        }
 
+       if (!x->sel.family)
+               x->sel.family = x->props.family;
+
        if (ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]) {
                struct sadb_x_nat_t_type* n_type;
                struct xfrm_encap_tmpl *natt;
index eb6695dcd73b6b5f51ff843b14eb55a379cc1de8..3ac64e25f10cd45f5629eada35b02a217933159e 100644 (file)
@@ -477,15 +477,14 @@ static int exp_open(struct inode *inode, struct file *file)
        struct ct_expect_iter_state *st;
        int ret;
 
-       st = kmalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
-       if (st == NULL)
+       st = kzalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
+       if (!st)
                return -ENOMEM;
        ret = seq_open(file, &exp_seq_ops);
        if (ret)
                goto out_free;
        seq          = file->private_data;
        seq->private = st;
-       memset(st, 0, sizeof(struct ct_expect_iter_state));
        return ret;
 out_free:
        kfree(st);
index d57ff7f3c5764510e32c8b1812c2c89492df9da8..47e56017f4ce887716e0dee8a4ba87d3ece37ac9 100644 (file)
@@ -590,7 +590,7 @@ out_unlock:
  * Return 0 - If further processing is needed.
  * Return 1 - If the packet can be discarded right away.
  */
-int sctp_rcv_ootb(struct sk_buff *skb)
+static int sctp_rcv_ootb(struct sk_buff *skb)
 {
        sctp_chunkhdr_t *ch;
        __u8 *ch_end;
index 2c29394fd92ebf4367a24d7bb8883b657832c10f..f8aa23dda1c16a30ba07832b526b2904af3adba2 100644 (file)
@@ -641,6 +641,8 @@ static struct sock *sctp_v6_create_accept_sk(struct sock *sk,
        newsctp6sk = (struct sctp6_sock *)newsk;
        inet_sk(newsk)->pinet6 = &newsctp6sk->inet6;
 
+       sctp_sk(newsk)->v4mapped = sctp_sk(sk)->v4mapped;
+
        newinet = inet_sk(newsk);
        newnp = inet6_sk(newsk);
 
index 8d18f570c2e6186598225b330430402b9eab24a1..51c4d7fef1d23137c29fd30aabdeb261ae1e9d86 100644 (file)
@@ -65,8 +65,6 @@
 #include <net/sctp/sctp.h>
 #include <net/sctp/sm.h>
 
-extern struct kmem_cache *sctp_chunk_cachep;
-
 SCTP_STATIC
 struct sctp_chunk *sctp_make_chunk(const struct sctp_association *asoc,
                                   __u8 type, __u8 flags, int paylen);
@@ -115,15 +113,12 @@ void  sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code,
                      const void *payload, size_t paylen)
 {
        sctp_errhdr_t err;
-       int padlen;
        __u16 len;
 
        /* Cause code constants are now defined in network order.  */
        err.cause = cause_code;
        len = sizeof(sctp_errhdr_t) + paylen;
-       padlen = len % 4;
        err.length  = htons(len);
-       len += padlen;
        chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err);
        sctp_addto_chunk(chunk, paylen, payload);
 }
@@ -1454,7 +1449,6 @@ no_hmac:
                do_gettimeofday(&tv);
 
        if (!asoc && tv_lt(bear_cookie->expiration, tv)) {
-               __u16 len;
                /*
                 * Section 3.3.10.3 Stale Cookie Error (3)
                 *
index fd2dfdd7d7fd056ff06ea7422ee90186fc1536aa..71cad56dd73fe62e0e1422f23cd7eb56c5f31f70 100644 (file)
@@ -97,6 +97,13 @@ static sctp_disposition_t sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands,
                                           const struct sctp_association *asoc,
                                           struct sctp_transport *transport);
 
+static sctp_disposition_t sctp_sf_abort_violation(
+                                    const struct sctp_association *asoc,
+                                    void *arg,
+                                    sctp_cmd_seq_t *commands,
+                                    const __u8 *payload,
+                                    const size_t paylen);
+
 static sctp_disposition_t sctp_sf_violation_chunklen(
                                     const struct sctp_endpoint *ep,
                                     const struct sctp_association *asoc,
@@ -104,6 +111,13 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
                                     void *arg,
                                     sctp_cmd_seq_t *commands);
 
+static sctp_disposition_t sctp_sf_violation_ctsn(
+                                    const struct sctp_endpoint *ep,
+                                    const struct sctp_association *asoc,
+                                    const sctp_subtype_t type,
+                                    void *arg,
+                                    sctp_cmd_seq_t *commands);
+
 /* Small helper function that checks if the chunk length
  * is of the appropriate length.  The 'required_length' argument
  * is set to be the size of a specific chunk we are testing.
@@ -2880,6 +2894,13 @@ sctp_disposition_t sctp_sf_eat_sack_6_2(const struct sctp_endpoint *ep,
                return SCTP_DISPOSITION_DISCARD;
        }
 
+       /* If Cumulative TSN Ack beyond the max tsn currently
+        * send, terminating the association and respond to the
+        * sender with an ABORT.
+        */
+       if (!TSN_lt(ctsn, asoc->next_tsn))
+               return sctp_sf_violation_ctsn(ep, asoc, type, arg, commands);
+
        /* Return this SACK for further processing.  */
        sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, SCTP_SACKH(sackh));
 
@@ -3691,40 +3712,21 @@ sctp_disposition_t sctp_sf_violation(const struct sctp_endpoint *ep,
        return SCTP_DISPOSITION_VIOLATION;
 }
 
-
 /*
- * Handle a protocol violation when the chunk length is invalid.
- * "Invalid" length is identified as smaller then the minimal length a
- * given chunk can be.  For example, a SACK chunk has invalid length
- * if it's length is set to be smaller then the size of sctp_sack_chunk_t.
- *
- * We inform the other end by sending an ABORT with a Protocol Violation
- * error code.
- *
- * Section: Not specified
- * Verification Tag:  Nothing to do
- * Inputs
- * (endpoint, asoc, chunk)
- *
- * Outputs
- * (reply_msg, msg_up, counters)
- *
- * Generate an  ABORT chunk and terminate the association.
+ * Common function to handle a protocol violation.
  */
-static sctp_disposition_t sctp_sf_violation_chunklen(
-                                    const struct sctp_endpoint *ep,
+static sctp_disposition_t sctp_sf_abort_violation(
                                     const struct sctp_association *asoc,
-                                    const sctp_subtype_t type,
                                     void *arg,
-                                    sctp_cmd_seq_t *commands)
+                                    sctp_cmd_seq_t *commands,
+                                    const __u8 *payload,
+                                    const size_t paylen)
 {
        struct sctp_chunk *chunk =  arg;
        struct sctp_chunk *abort = NULL;
-       char               err_str[]="The following chunk had invalid length:";
 
        /* Make the abort chunk. */
-       abort = sctp_make_abort_violation(asoc, chunk, err_str,
-                                         sizeof(err_str));
+       abort = sctp_make_abort_violation(asoc, chunk, payload, paylen);
        if (!abort)
                goto nomem;
 
@@ -3756,6 +3758,57 @@ nomem:
        return SCTP_DISPOSITION_NOMEM;
 }
 
+/*
+ * Handle a protocol violation when the chunk length is invalid.
+ * "Invalid" length is identified as smaller then the minimal length a
+ * given chunk can be.  For example, a SACK chunk has invalid length
+ * if it's length is set to be smaller then the size of sctp_sack_chunk_t.
+ *
+ * We inform the other end by sending an ABORT with a Protocol Violation
+ * error code.
+ *
+ * Section: Not specified
+ * Verification Tag:  Nothing to do
+ * Inputs
+ * (endpoint, asoc, chunk)
+ *
+ * Outputs
+ * (reply_msg, msg_up, counters)
+ *
+ * Generate an  ABORT chunk and terminate the association.
+ */
+static sctp_disposition_t sctp_sf_violation_chunklen(
+                                    const struct sctp_endpoint *ep,
+                                    const struct sctp_association *asoc,
+                                    const sctp_subtype_t type,
+                                    void *arg,
+                                    sctp_cmd_seq_t *commands)
+{
+       char err_str[]="The following chunk had invalid length:";
+
+       return sctp_sf_abort_violation(asoc, arg, commands, err_str,
+                                       sizeof(err_str));
+}
+
+/* Handle a protocol violation when the peer trying to advance the
+ * cumulative tsn ack to a point beyond the max tsn currently sent.
+ *
+ * We inform the other end by sending an ABORT with a Protocol Violation
+ * error code.
+ */
+static sctp_disposition_t sctp_sf_violation_ctsn(
+                                    const struct sctp_endpoint *ep,
+                                    const struct sctp_association *asoc,
+                                    const sctp_subtype_t type,
+                                    void *arg,
+                                    sctp_cmd_seq_t *commands)
+{
+       char err_str[]="The cumulative tsn ack beyond the max tsn currently sent:";
+
+       return sctp_sf_abort_violation(asoc, arg, commands, err_str,
+                                       sizeof(err_str));
+}
+
 /***************************************************************************
  * These are the state functions for handling primitive (Section 10) events.
  ***************************************************************************/
index ee88f2ea5101df0e13c4d11aad349f39143aca46..01c6364245b7081ec1224ef10c8434eebdb971ed 100644 (file)
@@ -107,8 +107,6 @@ static void sctp_sock_migrate(struct sock *, struct sock *,
                              struct sctp_association *, sctp_socket_type_t);
 static char *sctp_hmac_alg = SCTP_COOKIE_HMAC_ALG;
 
-extern struct kmem_cache *sctp_bucket_cachep;
-
 /* Get the sndbuf space available at the time on the association.  */
 static inline int sctp_wspace(struct sctp_association *asoc)
 {
@@ -433,7 +431,7 @@ out:
  *
  * Only sctp_setsockopt_bindx() is supposed to call this function.
  */
-int sctp_bindx_add(struct sock *sk, struct sockaddr *addrs, int addrcnt)
+static int sctp_bindx_add(struct sock *sk, struct sockaddr *addrs, int addrcnt)
 {
        int cnt;
        int retval = 0;
@@ -602,7 +600,7 @@ out:
  *
  * Only sctp_setsockopt_bindx() is supposed to call this function.
  */
-int sctp_bindx_rem(struct sock *sk, struct sockaddr *addrs, int addrcnt)
+static int sctp_bindx_rem(struct sock *sk, struct sockaddr *addrs, int addrcnt)
 {
        struct sctp_sock *sp = sctp_sk(sk);
        struct sctp_endpoint *ep = sp->ep;
@@ -977,7 +975,7 @@ static int __sctp_connect(struct sock* sk,
        int err = 0;
        int addrcnt = 0;
        int walk_size = 0;
-       union sctp_addr *sa_addr;
+       union sctp_addr *sa_addr = NULL;
        void *addr_buf;
        unsigned short port;
        unsigned int f_flags = 0;
@@ -1011,7 +1009,10 @@ static int __sctp_connect(struct sock* sk,
                        goto out_free;
                }
 
-               err = sctp_verify_addr(sk, sa_addr, af->sockaddr_len);
+               /* Save current address so we can work with it */
+               memcpy(&to, sa_addr, af->sockaddr_len);
+
+               err = sctp_verify_addr(sk, &to, af->sockaddr_len);
                if (err)
                        goto out_free;
 
@@ -1021,12 +1022,11 @@ static int __sctp_connect(struct sock* sk,
                if (asoc && asoc->peer.port && asoc->peer.port != port)
                        goto out_free;
 
-               memcpy(&to, sa_addr, af->sockaddr_len);
 
                /* Check if there already is a matching association on the
                 * endpoint (other than the one created here).
                 */
-               asoc2 = sctp_endpoint_lookup_assoc(ep, sa_addr, &transport);
+               asoc2 = sctp_endpoint_lookup_assoc(ep, &to, &transport);
                if (asoc2 && asoc2 != asoc) {
                        if (asoc2->state >= SCTP_STATE_ESTABLISHED)
                                err = -EISCONN;
@@ -1039,7 +1039,7 @@ static int __sctp_connect(struct sock* sk,
                 * make sure that there is no peeled-off association matching
                 * the peer address even on another socket.
                 */
-               if (sctp_endpoint_is_peeled_off(ep, sa_addr)) {
+               if (sctp_endpoint_is_peeled_off(ep, &to)) {
                        err = -EADDRNOTAVAIL;
                        goto out_free;
                }
@@ -1070,7 +1070,7 @@ static int __sctp_connect(struct sock* sk,
                                }
                        }
 
-                       scope = sctp_scope(sa_addr);
+                       scope = sctp_scope(&to);
                        asoc = sctp_association_new(ep, sk, scope, GFP_KERNEL);
                        if (!asoc) {
                                err = -ENOMEM;
@@ -1079,7 +1079,7 @@ static int __sctp_connect(struct sock* sk,
                }
 
                /* Prime the peer's transport structures.  */
-               transport = sctp_assoc_add_peer(asoc, sa_addr, GFP_KERNEL,
+               transport = sctp_assoc_add_peer(asoc, &to, GFP_KERNEL,
                                                SCTP_UNKNOWN);
                if (!transport) {
                        err = -ENOMEM;
@@ -1103,8 +1103,8 @@ static int __sctp_connect(struct sock* sk,
 
        /* Initialize sk's dport and daddr for getpeername() */
        inet_sk(sk)->dport = htons(asoc->peer.port);
-       af = sctp_get_af_specific(to.sa.sa_family);
-       af->to_sk_daddr(&to, sk);
+       af = sctp_get_af_specific(sa_addr->sa.sa_family);
+       af->to_sk_daddr(sa_addr, sk);
        sk->sk_err = 0;
 
        /* in-kernel sockets don't generally have a file allocated to them
@@ -1531,7 +1531,6 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
                        goto out_unlock;
                }
                if (sinfo_flags & SCTP_ABORT) {
-                       struct sctp_chunk *chunk;
 
                        chunk = sctp_make_abort_user(asoc, msg, msg_len);
                        if (!chunk) {
@@ -4353,7 +4352,7 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
                                                space_left, &bytes_copied);
                        if (cnt < 0) {
                                err = cnt;
-                               goto error;
+                               goto error_lock;
                        }
                        goto copy_getaddrs;
                }
@@ -4367,7 +4366,7 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, int len,
                addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len;
                if (space_left < addrlen) {
                        err =  -ENOMEM; /*fixme: right error?*/
-                       goto error;
+                       goto error_lock;
                }
                memcpy(buf, &temp, addrlen);
                buf += addrlen;
@@ -4381,15 +4380,21 @@ copy_getaddrs:
 
        if (copy_to_user(to, addrs, bytes_copied)) {
                err = -EFAULT;
-               goto error;
+               goto out;
        }
        if (put_user(cnt, &((struct sctp_getaddrs __user *)optval)->addr_num)) {
                err = -EFAULT;
-               goto error;
+               goto out;
        }
        if (put_user(bytes_copied, optlen))
                err = -EFAULT;
-error:
+
+       goto out;
+
+error_lock:
+       sctp_read_unlock(addr_lock);
+
+out:
        kfree(addrs);
        return err;
 }
@@ -5964,7 +5969,7 @@ static int sctp_wait_for_accept(struct sock *sk, long timeo)
        return err;
 }
 
-void sctp_wait_for_close(struct sock *sk, long timeout)
+static void sctp_wait_for_close(struct sock *sk, long timeout)
 {
        DEFINE_WAIT(wait);
 
index d3192a1babccb96645c8f3d54db2621a62073fc1..1ff0daade304ae68ddae5630f390faea8a979058 100644 (file)
@@ -161,7 +161,7 @@ SCTP_STATIC int sctp_tsnmap_next_gap_ack(const struct sctp_tsnmap *map,
                                         __u16 *start, __u16 *end)
 {
        int started, ended;
-       __u16 _start, _end, offset;
+       __u16 start_, end_, offset;
 
        /* We haven't found a gap yet.  */
        started = ended = 0;
@@ -175,7 +175,7 @@ SCTP_STATIC int sctp_tsnmap_next_gap_ack(const struct sctp_tsnmap *map,
 
                offset = iter->start - map->base_tsn;
                sctp_tsnmap_find_gap_ack(map->tsn_map, offset, map->len, 0,
-                                        &started, &_start, &ended, &_end);
+                                        &started, &start_, &ended, &end_);
        }
 
        /* Do we need to check the overflow map? */
@@ -193,8 +193,8 @@ SCTP_STATIC int sctp_tsnmap_next_gap_ack(const struct sctp_tsnmap *map,
                                         offset,
                                         map->len,
                                         map->len,
-                                        &started, &_start,
-                                        &ended, &_end);
+                                        &started, &start_,
+                                        &ended, &end_);
        }
 
        /* The Gap Ack Block happens to end at the end of the
@@ -202,7 +202,7 @@ SCTP_STATIC int sctp_tsnmap_next_gap_ack(const struct sctp_tsnmap *map,
         */
        if (started && !ended) {
                ended++;
-               _end = map->len + map->len - 1;
+               end_ = map->len + map->len - 1;
        }
 
        /* If we found a Gap Ack Block, return the start and end and
@@ -215,8 +215,8 @@ SCTP_STATIC int sctp_tsnmap_next_gap_ack(const struct sctp_tsnmap *map,
                int gap = map->cumulative_tsn_ack_point -
                        map->base_tsn;
 
-               *start = _start - gap;
-               *end = _end - gap;
+               *start = start_ - gap;
+               *end = end_ - gap;
 
                /* Move the iterator forward.  */
                iter->start = map->cumulative_tsn_ack_point + *end + 1;
index 1d674e0848fa4d475cd5a391c4b3c382d83c7de9..1b17fecee74784cd2a2f701a374eb0769607fb29 100644 (file)
@@ -2383,10 +2383,10 @@ void tipc_link_changeover(struct link *l_ptr)
                struct tipc_msg *msg = buf_msg(crs);
 
                if ((msg_user(msg) == MSG_BUNDLER) && split_bundles) {
-                       u32 msgcount = msg_msgcnt(msg);
                        struct tipc_msg *m = msg_get_wrapped(msg);
                        unchar* pos = (unchar*)m;
 
+                       msgcount = msg_msgcnt(msg);
                        while (msgcount--) {
                                msg_set_seqno(m,msg_seqno(msg));
                                tipc_link_tunnel(l_ptr, &tunnel_hdr, m,
index d8473eefcd2390fca7008b9ac021fa2735f783f6..ac7dfdda79737f652e540dfd0297611a986aba12 100644 (file)
@@ -501,7 +501,7 @@ end_node:
  * sequence overlapping with the requested sequence
  */
 
-void tipc_nameseq_subscribe(struct name_seq *nseq, struct subscription *s)
+static void tipc_nameseq_subscribe(struct name_seq *nseq, struct subscription *s)
 {
        struct sub_seq *sseq = nseq->sseqs;
 
index e2e452a62ba181238399c7fc3ddc730cd07e8100..598f4d3a0098e4f9b1ba5ae5f166f5166db1e069 100644 (file)
@@ -241,8 +241,6 @@ struct node *tipc_node_attach_link(struct link *l_ptr)
                char addr_string[16];
 
                if (n_ptr->link_cnt >= 2) {
-                       char addr_string[16];
-
                        err("Attempt to create third link to %s\n",
                            addr_string_fill(addr_string, n_ptr->addr));
                        return NULL;
index 849cc06bd9141a62da44061a230e7bc70c472761..9ab31a3ce3ade9c4a40a3dc0f3d34ce3bfe2b192 100644 (file)
@@ -46,7 +46,6 @@
 #include <linux/capability.h>
 #include <linux/errno.h>       /* return codes */
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/module.h>      /* support for loadable modules */
 #include <linux/slab.h>                /* kmalloc(), kfree() */
 #include <linux/mm.h>
index dca0344cc1bc393734a06d6eb0e71b8a634238b3..f2950cab74a62d0dabbe3322706753f8e0951300 100644 (file)
@@ -74,7 +74,6 @@ struct cs4231_dma_control {
         void           (*enable)(struct cs4231_dma_control *dma_cont, int on);
         int            (*request)(struct cs4231_dma_control *dma_cont, dma_addr_t bus_addr, size_t len);
         unsigned int   (*address)(struct cs4231_dma_control *dma_cont);
-        void           (*reset)(struct snd_cs4231 *chip); 
         void           (*preallocate)(struct snd_cs4231 *chip, struct snd_pcm *pcm); 
 #ifdef EBUS_SUPPORT
        struct          ebus_dma_info   ebus_info;
@@ -1214,10 +1213,6 @@ static int __init snd_cs4231_probe(struct snd_cs4231 *chip)
 
        spin_lock_irqsave(&chip->lock, flags);
 
-
-       /* Reset DMA engine (sbus only).  */
-       chip->p_dma.reset(chip);
-
        __cs4231_readb(chip, CS4231P(chip, STATUS));    /* clear any pendings IRQ */
        __cs4231_writeb(chip, 0, CS4231P(chip, STATUS));
        mb();
@@ -1861,14 +1856,13 @@ static void sbus_dma_enable(struct cs4231_dma_control *dma_cont, int on)
        if (!on) {
                sbus_writel(0, base->regs + base->dir + APCNC);
                sbus_writel(0, base->regs + base->dir + APCNVA);
-               sbus_writel(0, base->regs + base->dir + APCC);
-               sbus_writel(0, base->regs + base->dir + APCVA);
+               if ( base->dir == APC_PLAY ) {
+                       sbus_writel(0, base->regs + base->dir + APCC);
+                       sbus_writel(0, base->regs + base->dir + APCVA);
+               }
 
-               /* ACK any APC interrupts. */
-               csr = sbus_readl(base->regs + APCCSR);
-               sbus_writel(csr, base->regs + APCCSR);
+               udelay(1200);
        } 
-       udelay(1000);
        csr = sbus_readl(base->regs + APCCSR);
        shift = 0;
        if ( base->dir == APC_PLAY )
@@ -1894,23 +1888,6 @@ static unsigned int sbus_dma_addr(struct cs4231_dma_control *dma_cont)
         return sbus_readl(base->regs + base->dir + APCVA);
 }
 
-static void sbus_dma_reset(struct snd_cs4231 *chip)
-{
-        sbus_writel(APC_CHIP_RESET, chip->port + APCCSR);
-        sbus_writel(0x00, chip->port + APCCSR);
-        sbus_writel(sbus_readl(chip->port + APCCSR) | APC_CDC_RESET,
-                   chip->port + APCCSR);
-  
-        udelay(20);
-  
-        sbus_writel(sbus_readl(chip->port + APCCSR) & ~APC_CDC_RESET,
-                   chip->port + APCCSR);
-        sbus_writel(sbus_readl(chip->port + APCCSR) | (APC_XINT_ENA |
-                      APC_XINT_PENA |
-                      APC_XINT_CENA),
-                      chip->port + APCCSR);
-}
-
 static void sbus_dma_preallocate(struct snd_cs4231 *chip, struct snd_pcm *pcm)
 {
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_SBUS,
@@ -1986,14 +1963,12 @@ static int __init snd_cs4231_sbus_create(struct snd_card *card,
        chip->p_dma.enable = sbus_dma_enable;
        chip->p_dma.request = sbus_dma_request;
        chip->p_dma.address = sbus_dma_addr;
-       chip->p_dma.reset = sbus_dma_reset;
        chip->p_dma.preallocate = sbus_dma_preallocate;
 
        chip->c_dma.prepare = sbus_dma_prepare;
        chip->c_dma.enable = sbus_dma_enable;
        chip->c_dma.request = sbus_dma_request;
        chip->c_dma.address = sbus_dma_addr;
-       chip->c_dma.reset = sbus_dma_reset;
        chip->c_dma.preallocate = sbus_dma_preallocate;
 
        if (request_irq(sdev->irqs[0], snd_cs4231_sbus_interrupt,
@@ -2087,11 +2062,6 @@ static unsigned int _ebus_dma_addr(struct cs4231_dma_control *dma_cont)
        return ebus_dma_addr(&dma_cont->ebus_info);
 }
 
-static void _ebus_dma_reset(struct snd_cs4231 *chip)
-{
-       return;
-}
-
 static void _ebus_dma_preallocate(struct snd_cs4231 *chip, struct snd_pcm *pcm)
 {
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
@@ -2171,14 +2141,12 @@ static int __init snd_cs4231_ebus_create(struct snd_card *card,
        chip->p_dma.enable = _ebus_dma_enable;
        chip->p_dma.request = _ebus_dma_request;
        chip->p_dma.address = _ebus_dma_addr;
-       chip->p_dma.reset = _ebus_dma_reset;
        chip->p_dma.preallocate = _ebus_dma_preallocate;
 
        chip->c_dma.prepare = _ebus_dma_prepare;
        chip->c_dma.enable = _ebus_dma_enable;
        chip->c_dma.request = _ebus_dma_request;
        chip->c_dma.address = _ebus_dma_addr;
-       chip->c_dma.reset = _ebus_dma_reset;
        chip->c_dma.preallocate = _ebus_dma_preallocate;
 
        chip->port = ioremap(edev->resource[0].start, 0x10);