diff options
202 files changed, 4160 insertions, 2787 deletions
diff --git a/Documentation/networking/fib_trie.txt b/Documentation/networking/fib_trie.txt new file mode 100644 index 000000000000..f50d0c673c57 --- /dev/null +++ b/Documentation/networking/fib_trie.txt | |||
| @@ -0,0 +1,145 @@ | |||
| 1 | LC-trie implementation notes. | ||
| 2 | |||
| 3 | Node types | ||
| 4 | ---------- | ||
| 5 | leaf | ||
| 6 | An end node with data. This has a copy of the relevant key, along | ||
| 7 | with 'hlist' with routing table entries sorted by prefix length. | ||
| 8 | See struct leaf and struct leaf_info. | ||
| 9 | |||
| 10 | trie node or tnode | ||
| 11 | An internal node, holding an array of child (leaf or tnode) pointers, | ||
| 12 | indexed through a subset of the key. See Level Compression. | ||
| 13 | |||
| 14 | A few concepts explained | ||
| 15 | ------------------------ | ||
| 16 | Bits (tnode) | ||
| 17 | The number of bits in the key segment used for indexing into the | ||
| 18 | child array - the "child index". See Level Compression. | ||
| 19 | |||
| 20 | Pos (tnode) | ||
| 21 | The position (in the key) of the key segment used for indexing into | ||
| 22 | the child array. See Path Compression. | ||
| 23 | |||
| 24 | Path Compression / skipped bits | ||
| 25 | Any given tnode is linked to from the child array of its parent, using | ||
| 26 | a segment of the key specified by the parent's "pos" and "bits" | ||
| 27 | In certain cases, this tnode's own "pos" will not be immediately | ||
| 28 | adjacent to the parent (pos+bits), but there will be some bits | ||
| 29 | in the key skipped over because they represent a single path with no | ||
| 30 | deviations. These "skipped bits" constitute Path Compression. | ||
| 31 | Note that the search algorithm will simply skip over these bits when | ||
| 32 | searching, making it necessary to save the keys in the leaves to | ||
| 33 | verify that they actually do match the key we are searching for. | ||
| 34 | |||
| 35 | Level Compression / child arrays | ||
| 36 | the trie is kept level balanced moving, under certain conditions, the | ||
| 37 | children of a full child (see "full_children") up one level, so that | ||
| 38 | instead of a pure binary tree, each internal node ("tnode") may | ||
| 39 | contain an arbitrarily large array of links to several children. | ||
| 40 | Conversely, a tnode with a mostly empty child array (see empty_children) | ||
| 41 | may be "halved", having some of its children moved downwards one level, | ||
| 42 | in order to avoid ever-increasing child arrays. | ||
| 43 | |||
| 44 | empty_children | ||
| 45 | the number of positions in the child array of a given tnode that are | ||
| 46 | NULL. | ||
| 47 | |||
| 48 | full_children | ||
| 49 | the number of children of a given tnode that aren't path compressed. | ||
| 50 | (in other words, they aren't NULL or leaves and their "pos" is equal | ||
| 51 | to this tnode's "pos"+"bits"). | ||
| 52 | |||
| 53 | (The word "full" here is used more in the sense of "complete" than | ||
| 54 | as the opposite of "empty", which might be a tad confusing.) | ||
| 55 | |||
| 56 | Comments | ||
| 57 | --------- | ||
| 58 | |||
| 59 | We have tried to keep the structure of the code as close to fib_hash as | ||
| 60 | possible to allow verification and help up reviewing. | ||
| 61 | |||
| 62 | fib_find_node() | ||
| 63 | A good start for understanding this code. This function implements a | ||
| 64 | straightforward trie lookup. | ||
| 65 | |||
| 66 | fib_insert_node() | ||
| 67 | Inserts a new leaf node in the trie. This is bit more complicated than | ||
| 68 | fib_find_node(). Inserting a new node means we might have to run the | ||
| 69 | level compression algorithm on part of the trie. | ||
| 70 | |||
| 71 | trie_leaf_remove() | ||
| 72 | Looks up a key, deletes it and runs the level compression algorithm. | ||
| 73 | |||
| 74 | trie_rebalance() | ||
| 75 | The key function for the dynamic trie after any change in the trie | ||
| 76 | it is run to optimize and reorganize. Tt will walk the trie upwards | ||
| 77 | towards the root from a given tnode, doing a resize() at each step | ||
| 78 | to implement level compression. | ||
| 79 | |||
| 80 | resize() | ||
| 81 | Analyzes a tnode and optimizes the child array size by either inflating | ||
| 82 | or shrinking it repeatedly until it fullfills the criteria for optimal | ||
| 83 | level compression. This part follows the original paper pretty closely | ||
| 84 | and there may be some room for experimentation here. | ||
| 85 | |||
| 86 | inflate() | ||
| 87 | Doubles the size of the child array within a tnode. Used by resize(). | ||
| 88 | |||
| 89 | halve() | ||
| 90 | Halves the size of the child array within a tnode - the inverse of | ||
| 91 | inflate(). Used by resize(); | ||
| 92 | |||
| 93 | fn_trie_insert(), fn_trie_delete(), fn_trie_select_default() | ||
| 94 | The route manipulation functions. Should conform pretty closely to the | ||
| 95 | corresponding functions in fib_hash. | ||
| 96 | |||
| 97 | fn_trie_flush() | ||
| 98 | This walks the full trie (using nextleaf()) and searches for empty | ||
| 99 | leaves which have to be removed. | ||
| 100 | |||
| 101 | fn_trie_dump() | ||
| 102 | Dumps the routing table ordered by prefix length. This is somewhat | ||
| 103 | slower than the corresponding fib_hash function, as we have to walk the | ||
| 104 | entire trie for each prefix length. In comparison, fib_hash is organized | ||
| 105 | as one "zone"/hash per prefix length. | ||
| 106 | |||
| 107 | Locking | ||
| 108 | ------- | ||
| 109 | |||
| 110 | fib_lock is used for an RW-lock in the same way that this is done in fib_hash. | ||
| 111 | However, the functions are somewhat separated for other possible locking | ||
| 112 | scenarios. It might conceivably be possible to run trie_rebalance via RCU | ||
| 113 | to avoid read_lock in the fn_trie_lookup() function. | ||
| 114 | |||
| 115 | Main lookup mechanism | ||
| 116 | --------------------- | ||
| 117 | fn_trie_lookup() is the main lookup function. | ||
| 118 | |||
| 119 | The lookup is in its simplest form just like fib_find_node(). We descend the | ||
| 120 | trie, key segment by key segment, until we find a leaf. check_leaf() does | ||
| 121 | the fib_semantic_match in the leaf's sorted prefix hlist. | ||
| 122 | |||
| 123 | If we find a match, we are done. | ||
| 124 | |||
| 125 | If we don't find a match, we enter prefix matching mode. The prefix length, | ||
| 126 | starting out at the same as the key length, is reduced one step at a time, | ||
| 127 | and we backtrack upwards through the trie trying to find a longest matching | ||
| 128 | prefix. The goal is always to reach a leaf and get a positive result from the | ||
| 129 | fib_semantic_match mechanism. | ||
| 130 | |||
| 131 | Inside each tnode, the search for longest matching prefix consists of searching | ||
| 132 | through the child array, chopping off (zeroing) the least significant "1" of | ||
| 133 | the child index until we find a match or the child index consists of nothing but | ||
| 134 | zeros. | ||
| 135 | |||
| 136 | At this point we backtrack (t->stats.backtrack++) up the trie, continuing to | ||
| 137 | chop off part of the key in order to find the longest matching prefix. | ||
| 138 | |||
| 139 | At this point we will repeatedly descend subtries to look for a match, and there | ||
| 140 | are some optimizations available that can provide us with "shortcuts" to avoid | ||
| 141 | descending into dead ends. Look for "HL_OPTIMIZE" sections in the code. | ||
| 142 | |||
| 143 | To alleviate any doubts about the correctness of the route selection process, | ||
| 144 | a new netlink operation has been added. Look for NETLINK_FIB_LOOKUP, which | ||
| 145 | gives userland access to fib_lookup(). | ||
| @@ -1,7 +1,7 @@ | |||
| 1 | VERSION = 2 | 1 | VERSION = 2 |
| 2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
| 3 | SUBLEVEL = 13 | 3 | SUBLEVEL = 13 |
| 4 | EXTRAVERSION =-rc1 | 4 | EXTRAVERSION =-rc2 |
| 5 | NAME=Woozy Numbat | 5 | NAME=Woozy Numbat |
| 6 | 6 | ||
| 7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index e6ded33c6e22..9d34ce26e5ef 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c | |||
| @@ -55,6 +55,8 @@ do_entInt(unsigned long type, unsigned long vector, | |||
| 55 | #ifdef CONFIG_SMP | 55 | #ifdef CONFIG_SMP |
| 56 | { | 56 | { |
| 57 | long cpu; | 57 | long cpu; |
| 58 | |||
| 59 | local_irq_disable(); | ||
| 58 | smp_percpu_timer_interrupt(regs); | 60 | smp_percpu_timer_interrupt(regs); |
| 59 | cpu = smp_processor_id(); | 61 | cpu = smp_processor_id(); |
| 60 | if (cpu != boot_cpuid) { | 62 | if (cpu != boot_cpuid) { |
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index fd7bd17cc960..6f509a644bdd 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c | |||
| @@ -240,7 +240,7 @@ do_entIF(unsigned long type, struct pt_regs *regs) | |||
| 240 | siginfo_t info; | 240 | siginfo_t info; |
| 241 | int signo, code; | 241 | int signo, code; |
| 242 | 242 | ||
| 243 | if (regs->ps == 0) { | 243 | if ((regs->ps & ~IPL_MAX) == 0) { |
| 244 | if (type == 1) { | 244 | if (type == 1) { |
| 245 | const unsigned int *data | 245 | const unsigned int *data |
| 246 | = (const unsigned int *) regs->pc; | 246 | = (const unsigned int *) regs->pc; |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 8330495e2448..eb933dcafba0 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
| @@ -56,7 +56,7 @@ tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) | |||
| 56 | tune-$(CONFIG_CPU_V6) :=-mtune=strongarm | 56 | tune-$(CONFIG_CPU_V6) :=-mtune=strongarm |
| 57 | 57 | ||
| 58 | # Need -Uarm for gcc < 3.x | 58 | # Need -Uarm for gcc < 3.x |
| 59 | CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) | 59 | CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) |
| 60 | CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm | 60 | CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm |
| 61 | AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float | 61 | AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float |
| 62 | 62 | ||
diff --git a/arch/arm/configs/omnimeter_defconfig b/arch/arm/configs/omnimeter_defconfig deleted file mode 100644 index 78fdb4a428b1..000000000000 --- a/arch/arm/configs/omnimeter_defconfig +++ /dev/null | |||
| @@ -1,803 +0,0 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.12-rc1-bk2 | ||
| 4 | # Sun Mar 27 21:31:45 2005 | ||
| 5 | # | ||
| 6 | CONFIG_ARM=y | ||
| 7 | CONFIG_MMU=y | ||
| 8 | CONFIG_UID16=y | ||
| 9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
| 10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 11 | CONFIG_GENERIC_IOMAP=y | ||
| 12 | |||
| 13 | # | ||
| 14 | # Code maturity level options | ||
| 15 | # | ||
| 16 | CONFIG_EXPERIMENTAL=y | ||
| 17 | CONFIG_CLEAN_COMPILE=y | ||
| 18 | CONFIG_BROKEN_ON_SMP=y | ||
| 19 | |||
| 20 | # | ||
| 21 | # General setup | ||
| 22 | # | ||
| 23 | CONFIG_LOCALVERSION="" | ||
| 24 | CONFIG_SWAP=y | ||
| 25 | CONFIG_SYSVIPC=y | ||
| 26 | # CONFIG_POSIX_MQUEUE is not set | ||
| 27 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 28 | CONFIG_SYSCTL=y | ||
| 29 | # CONFIG_AUDIT is not set | ||
| 30 | CONFIG_HOTPLUG=y | ||
| 31 | CONFIG_KOBJECT_UEVENT=y | ||
| 32 | # CONFIG_IKCONFIG is not set | ||
| 33 | # CONFIG_EMBEDDED is not set | ||
| 34 | CONFIG_KALLSYMS=y | ||
| 35 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
| 36 | CONFIG_BASE_FULL=y | ||
| 37 | CONFIG_FUTEX=y | ||
| 38 | CONFIG_EPOLL=y | ||
| 39 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
| 40 | CONFIG_SHMEM=y | ||
| 41 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
| 42 | CONFIG_CC_ALIGN_LABELS=0 | ||
| 43 | CONFIG_CC_ALIGN_LOOPS=0 | ||
| 44 | CONFIG_CC_ALIGN_JUMPS=0 | ||
| 45 | # CONFIG_TINY_SHMEM is not set | ||
| 46 | CONFIG_BASE_SMALL=0 | ||
| 47 | |||
| 48 | # | ||
| 49 | # Loadable module support | ||
| 50 | # | ||
| 51 | CONFIG_MODULES=y | ||
| 52 | # CONFIG_MODULE_UNLOAD is not set | ||
| 53 | CONFIG_OBSOLETE_MODPARM=y | ||
| 54 | # CONFIG_MODVERSIONS is not set | ||
| 55 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 56 | CONFIG_KMOD=y | ||
| 57 | |||
| 58 | # | ||
| 59 | # System Type | ||
| 60 | # | ||
| 61 | # CONFIG_ARCH_CLPS7500 is not set | ||
| 62 | # CONFIG_ARCH_CLPS711X is not set | ||
| 63 | # CONFIG_ARCH_CO285 is not set | ||
| 64 | # CONFIG_ARCH_EBSA110 is not set | ||
| 65 | # CONFIG_ARCH_CAMELOT is not set | ||
| 66 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
| 67 | # CONFIG_ARCH_INTEGRATOR is not set | ||
| 68 | # CONFIG_ARCH_IOP3XX is not set | ||
| 69 | # CONFIG_ARCH_IXP4XX is not set | ||
| 70 | # CONFIG_ARCH_IXP2000 is not set | ||
| 71 | # CONFIG_ARCH_L7200 is not set | ||
| 72 | # CONFIG_ARCH_PXA is not set | ||
| 73 | # CONFIG_ARCH_RPC is not set | ||
| 74 | CONFIG_ARCH_SA1100=y | ||
| 75 | # CONFIG_ARCH_S3C2410 is not set | ||
| 76 | # CONFIG_ARCH_SHARK is not set | ||
| 77 | # CONFIG_ARCH_LH7A40X is not set | ||
| 78 | # CONFIG_ARCH_OMAP is not set | ||
| 79 | # CONFIG_ARCH_VERSATILE is not set | ||
| 80 | # CONFIG_ARCH_IMX is not set | ||
| 81 | # CONFIG_ARCH_H720X is not set | ||
| 82 | |||
| 83 | # | ||
| 84 | # SA11x0 Implementations | ||
| 85 | # | ||
| 86 | # CONFIG_SA1100_ASSABET is not set | ||
| 87 | # CONFIG_SA1100_CERF is not set | ||
| 88 | # CONFIG_SA1100_COLLIE is not set | ||
| 89 | # CONFIG_SA1100_H3100 is not set | ||
| 90 | # CONFIG_SA1100_H3600 is not set | ||
| 91 | # CONFIG_SA1100_H3800 is not set | ||
| 92 | # CONFIG_SA1100_BADGE4 is not set | ||
| 93 | # CONFIG_SA1100_JORNADA720 is not set | ||
| 94 | # CONFIG_SA1100_HACKKIT is not set | ||
| 95 | # CONFIG_SA1100_LART is not set | ||
| 96 | # CONFIG_SA1100_PLEB is not set | ||
| 97 | # CONFIG_SA1100_SHANNON is not set | ||
| 98 | # CONFIG_SA1100_SIMPAD is not set | ||
| 99 | # CONFIG_SA1100_SSP is not set | ||
| 100 | |||
| 101 | # | ||
| 102 | # Processor Type | ||
| 103 | # | ||
| 104 | CONFIG_CPU_32=y | ||
| 105 | CONFIG_CPU_SA1100=y | ||
| 106 | CONFIG_CPU_32v4=y | ||
| 107 | CONFIG_CPU_ABRT_EV4=y | ||
| 108 | CONFIG_CPU_CACHE_V4WB=y | ||
| 109 | CONFIG_CPU_CACHE_VIVT=y | ||
| 110 | CONFIG_CPU_TLB_V4WB=y | ||
| 111 | CONFIG_CPU_MINICACHE=y | ||
| 112 | |||
| 113 | # | ||
| 114 | # Processor Features | ||
| 115 | # | ||
| 116 | |||
| 117 | # | ||
| 118 | # Bus support | ||
| 119 | # | ||
| 120 | CONFIG_ISA=y | ||
| 121 | |||
| 122 | # | ||
| 123 | # PCCARD (PCMCIA/CardBus) support | ||
| 124 | # | ||
| 125 | CONFIG_PCCARD=y | ||
| 126 | # CONFIG_PCMCIA_DEBUG is not set | ||
| 127 | CONFIG_PCMCIA=y | ||
| 128 | |||
| 129 | # | ||
| 130 | # PC-card bridges | ||
| 131 | # | ||
| 132 | CONFIG_I82365=y | ||
| 133 | # CONFIG_TCIC is not set | ||
| 134 | CONFIG_PCMCIA_SA1100=y | ||
| 135 | CONFIG_PCCARD_NONSTATIC=y | ||
| 136 | |||
| 137 | # | ||
| 138 | # Kernel Features | ||
| 139 | # | ||
| 140 | # CONFIG_PREEMPT is not set | ||
| 141 | CONFIG_DISCONTIGMEM=y | ||
| 142 | # CONFIG_LEDS is not set | ||
| 143 | CONFIG_ALIGNMENT_TRAP=y | ||
| 144 | |||
| 145 | # | ||
| 146 | # Boot options | ||
| 147 | # | ||
| 148 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
| 149 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
| 150 | CONFIG_CMDLINE="keepinitrd mem=16M root=/dev/ram ramdisk=8192 initrd=0xd0000000,4M" | ||
| 151 | # CONFIG_XIP_KERNEL is not set | ||
| 152 | |||
| 153 | # | ||
| 154 | # CPU Frequency scaling | ||
| 155 | # | ||
| 156 | # CONFIG_CPU_FREQ is not set | ||
| 157 | |||
| 158 | # | ||
| 159 | # Floating point emulation | ||
| 160 | # | ||
| 161 | |||
| 162 | # | ||
| 163 | # At least one emulation must be selected | ||
| 164 | # | ||
| 165 | # CONFIG_FPE_NWFPE is not set | ||
| 166 | # CONFIG_FPE_FASTFPE is not set | ||
| 167 | |||
| 168 | # | ||
| 169 | # Userspace binary formats | ||
| 170 | # | ||
| 171 | CONFIG_BINFMT_ELF=y | ||
| 172 | CONFIG_BINFMT_AOUT=y | ||
| 173 | # CONFIG_BINFMT_MISC is not set | ||
| 174 | # CONFIG_ARTHUR is not set | ||
| 175 | |||
| 176 | # | ||
| 177 | # Power management options | ||
| 178 | # | ||
| 179 | # CONFIG_PM is not set | ||
| 180 | |||
| 181 | # | ||
| 182 | # Device Drivers | ||
| 183 | # | ||
| 184 | |||
| 185 | # | ||
| 186 | # Generic Driver Options | ||
| 187 | # | ||
| 188 | CONFIG_STANDALONE=y | ||
| 189 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 190 | # CONFIG_FW_LOADER is not set | ||
| 191 | |||
| 192 | # | ||
| 193 | # Memory Technology Devices (MTD) | ||
| 194 | # | ||
| 195 | # CONFIG_MTD is not set | ||
| 196 | |||
| 197 | # | ||
| 198 | # Parallel port support | ||
| 199 | # | ||
| 200 | # CONFIG_PARPORT is not set | ||
| 201 | |||
| 202 | # | ||
| 203 | # Plug and Play support | ||
| 204 | # | ||
| 205 | # CONFIG_PNP is not set | ||
| 206 | |||
| 207 | # | ||
| 208 | # Block devices | ||
| 209 | # | ||
| 210 | # CONFIG_BLK_DEV_FD is not set | ||
| 211 | # CONFIG_BLK_DEV_XD is not set | ||
| 212 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 213 | CONFIG_BLK_DEV_LOOP=m | ||
| 214 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
| 215 | CONFIG_BLK_DEV_NBD=m | ||
| 216 | # CONFIG_BLK_DEV_RAM is not set | ||
| 217 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 218 | CONFIG_INITRAMFS_SOURCE="" | ||
| 219 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 220 | |||
| 221 | # | ||
| 222 | # IO Schedulers | ||
| 223 | # | ||
| 224 | CONFIG_IOSCHED_NOOP=y | ||
| 225 | CONFIG_IOSCHED_AS=y | ||
| 226 | CONFIG_IOSCHED_DEADLINE=y | ||
| 227 | CONFIG_IOSCHED_CFQ=y | ||
| 228 | # CONFIG_ATA_OVER_ETH is not set | ||
| 229 | |||
| 230 | # | ||
| 231 | # ATA/ATAPI/MFM/RLL support | ||
| 232 | # | ||
| 233 | CONFIG_IDE=y | ||
| 234 | CONFIG_BLK_DEV_IDE=y | ||
| 235 | |||
| 236 | # | ||
| 237 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
| 238 | # | ||
| 239 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
| 240 | CONFIG_BLK_DEV_IDEDISK=y | ||
| 241 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
| 242 | # CONFIG_BLK_DEV_IDECS is not set | ||
| 243 | # CONFIG_BLK_DEV_IDECD is not set | ||
| 244 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
| 245 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
| 246 | # CONFIG_IDE_TASK_IOCTL is not set | ||
| 247 | |||
| 248 | # | ||
| 249 | # IDE chipset support/bugfixes | ||
| 250 | # | ||
| 251 | CONFIG_IDE_GENERIC=y | ||
| 252 | # CONFIG_IDE_ARM is not set | ||
| 253 | # CONFIG_IDE_CHIPSETS is not set | ||
| 254 | # CONFIG_BLK_DEV_IDEDMA is not set | ||
| 255 | # CONFIG_IDEDMA_AUTO is not set | ||
| 256 | # CONFIG_BLK_DEV_HD is not set | ||
| 257 | |||
| 258 | # | ||
| 259 | # SCSI device support | ||
| 260 | # | ||
| 261 | # CONFIG_SCSI is not set | ||
| 262 | |||
| 263 | # | ||
| 264 | # Multi-device support (RAID and LVM) | ||
| 265 | # | ||
| 266 | # CONFIG_MD is not set | ||
| 267 | |||
| 268 | # | ||
| 269 | # Fusion MPT device support | ||
| 270 | # | ||
| 271 | |||
| 272 | # | ||
| 273 | # IEEE 1394 (FireWire) support | ||
| 274 | # | ||
| 275 | |||
| 276 | # | ||
| 277 | # I2O device support | ||
| 278 | # | ||
| 279 | |||
| 280 | # | ||
| 281 | # Networking support | ||
| 282 | # | ||
| 283 | CONFIG_NET=y | ||
| 284 | |||
| 285 | # | ||
| 286 | # Networking options | ||
| 287 | # | ||
| 288 | CONFIG_PACKET=y | ||
| 289 | CONFIG_PACKET_MMAP=y | ||
| 290 | # CONFIG_NETLINK_DEV is not set | ||
| 291 | CONFIG_UNIX=y | ||
| 292 | # CONFIG_NET_KEY is not set | ||
| 293 | CONFIG_INET=y | ||
| 294 | CONFIG_IP_MULTICAST=y | ||
| 295 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 296 | # CONFIG_IP_PNP is not set | ||
| 297 | # CONFIG_NET_IPIP is not set | ||
| 298 | # CONFIG_NET_IPGRE is not set | ||
| 299 | # CONFIG_IP_MROUTE is not set | ||
| 300 | # CONFIG_ARPD is not set | ||
| 301 | # CONFIG_SYN_COOKIES is not set | ||
| 302 | # CONFIG_INET_AH is not set | ||
| 303 | # CONFIG_INET_ESP is not set | ||
| 304 | # CONFIG_INET_IPCOMP is not set | ||
| 305 | # CONFIG_INET_TUNNEL is not set | ||
| 306 | CONFIG_IP_TCPDIAG=y | ||
| 307 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
| 308 | |||
| 309 | # | ||
| 310 | # IP: Virtual Server Configuration | ||
| 311 | # | ||
| 312 | # CONFIG_IP_VS is not set | ||
| 313 | # CONFIG_IPV6 is not set | ||
| 314 | CONFIG_NETFILTER=y | ||
| 315 | # CONFIG_NETFILTER_DEBUG is not set | ||
| 316 | |||
| 317 | # | ||
| 318 | # IP: Netfilter Configuration | ||
| 319 | # | ||
| 320 | # CONFIG_IP_NF_CONNTRACK is not set | ||
| 321 | # CONFIG_IP_NF_CONNTRACK_MARK is not set | ||
| 322 | # CONFIG_IP_NF_QUEUE is not set | ||
| 323 | # CONFIG_IP_NF_IPTABLES is not set | ||
| 324 | # CONFIG_IP_NF_ARPTABLES is not set | ||
| 325 | |||
| 326 | # | ||
| 327 | # SCTP Configuration (EXPERIMENTAL) | ||
| 328 | # | ||
| 329 | # CONFIG_IP_SCTP is not set | ||
| 330 | # CONFIG_ATM is not set | ||
| 331 | # CONFIG_BRIDGE is not set | ||
| 332 | # CONFIG_VLAN_8021Q is not set | ||
| 333 | # CONFIG_DECNET is not set | ||
| 334 | # CONFIG_LLC2 is not set | ||
| 335 | # CONFIG_IPX is not set | ||
| 336 | # CONFIG_ATALK is not set | ||
| 337 | # CONFIG_X25 is not set | ||
| 338 | # CONFIG_LAPB is not set | ||
| 339 | # CONFIG_NET_DIVERT is not set | ||
| 340 | # CONFIG_ECONET is not set | ||
| 341 | # CONFIG_WAN_ROUTER is not set | ||
| 342 | |||
| 343 | # | ||
| 344 | # QoS and/or fair queueing | ||
| 345 | # | ||
| 346 | # CONFIG_NET_SCHED is not set | ||
| 347 | # CONFIG_NET_CLS_ROUTE is not set | ||
| 348 | |||
| 349 | # | ||
| 350 | # Network testing | ||
| 351 | # | ||
| 352 | # CONFIG_NET_PKTGEN is not set | ||
| 353 | # CONFIG_NETPOLL is not set | ||
| 354 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 355 | # CONFIG_HAMRADIO is not set | ||
| 356 | # CONFIG_IRDA is not set | ||
| 357 | # CONFIG_BT is not set | ||
| 358 | CONFIG_NETDEVICES=y | ||
| 359 | # CONFIG_DUMMY is not set | ||
| 360 | # CONFIG_BONDING is not set | ||
| 361 | # CONFIG_EQUALIZER is not set | ||
| 362 | # CONFIG_TUN is not set | ||
| 363 | |||
| 364 | # | ||
| 365 | # ARCnet devices | ||
| 366 | # | ||
| 367 | # CONFIG_ARCNET is not set | ||
| 368 | |||
| 369 | # | ||
| 370 | # Ethernet (10 or 100Mbit) | ||
| 371 | # | ||
| 372 | CONFIG_NET_ETHERNET=y | ||
| 373 | # CONFIG_MII is not set | ||
| 374 | # CONFIG_NET_VENDOR_3COM is not set | ||
| 375 | # CONFIG_LANCE is not set | ||
| 376 | # CONFIG_NET_VENDOR_SMC is not set | ||
| 377 | # CONFIG_SMC91X is not set | ||
| 378 | # CONFIG_NET_VENDOR_RACAL is not set | ||
| 379 | # CONFIG_AT1700 is not set | ||
| 380 | # CONFIG_DEPCA is not set | ||
| 381 | # CONFIG_HP100 is not set | ||
| 382 | # CONFIG_NET_ISA is not set | ||
| 383 | # CONFIG_NET_PCI is not set | ||
| 384 | # CONFIG_NET_POCKET is not set | ||
| 385 | |||
| 386 | # | ||
| 387 | # Ethernet (1000 Mbit) | ||
| 388 | # | ||
| 389 | |||
| 390 | # | ||
| 391 | # Ethernet (10000 Mbit) | ||
| 392 | # | ||
| 393 | |||
| 394 | # | ||
| 395 | # Token Ring devices | ||
| 396 | # | ||
| 397 | # CONFIG_TR is not set | ||
| 398 | |||
| 399 | # | ||
| 400 | # Wireless LAN (non-hamradio) | ||
| 401 | # | ||
| 402 | CONFIG_NET_RADIO=y | ||
| 403 | |||
| 404 | # | ||
| 405 | # Obsolete Wireless cards support (pre-802.11) | ||
| 406 | # | ||
| 407 | # CONFIG_STRIP is not set | ||
| 408 | # CONFIG_ARLAN is not set | ||
| 409 | # CONFIG_WAVELAN is not set | ||
| 410 | CONFIG_PCMCIA_WAVELAN=y | ||
| 411 | # CONFIG_PCMCIA_NETWAVE is not set | ||
| 412 | |||
| 413 | # | ||
| 414 | # Wireless 802.11 Frequency Hopping cards support | ||
| 415 | # | ||
| 416 | # CONFIG_PCMCIA_RAYCS is not set | ||
| 417 | |||
| 418 | # | ||
| 419 | # Wireless 802.11b ISA/PCI cards support | ||
| 420 | # | ||
| 421 | # CONFIG_HERMES is not set | ||
| 422 | # CONFIG_ATMEL is not set | ||
| 423 | |||
| 424 | # | ||
| 425 | # Wireless 802.11b Pcmcia/Cardbus cards support | ||
| 426 | # | ||
| 427 | CONFIG_AIRO_CS=y | ||
| 428 | CONFIG_PCMCIA_WL3501=y | ||
| 429 | CONFIG_NET_WIRELESS=y | ||
| 430 | |||
| 431 | # | ||
| 432 | # PCMCIA network device support | ||
| 433 | # | ||
| 434 | CONFIG_NET_PCMCIA=y | ||
| 435 | CONFIG_PCMCIA_3C589=y | ||
| 436 | # CONFIG_PCMCIA_3C574 is not set | ||
| 437 | # CONFIG_PCMCIA_FMVJ18X is not set | ||
| 438 | CONFIG_PCMCIA_PCNET=y | ||
| 439 | # CONFIG_PCMCIA_NMCLAN is not set | ||
| 440 | # CONFIG_PCMCIA_SMC91C92 is not set | ||
| 441 | # CONFIG_PCMCIA_XIRC2PS is not set | ||
| 442 | # CONFIG_PCMCIA_AXNET is not set | ||
| 443 | |||
| 444 | # | ||
| 445 | # Wan interfaces | ||
| 446 | # | ||
| 447 | # CONFIG_WAN is not set | ||
| 448 | # CONFIG_PPP is not set | ||
| 449 | # CONFIG_SLIP is not set | ||
| 450 | # CONFIG_SHAPER is not set | ||
| 451 | # CONFIG_NETCONSOLE is not set | ||
| 452 | |||
| 453 | # | ||
| 454 | # ISDN subsystem | ||
| 455 | # | ||
| 456 | # CONFIG_ISDN is not set | ||
| 457 | |||
| 458 | # | ||
| 459 | # Input device support | ||
| 460 | # | ||
| 461 | CONFIG_INPUT=y | ||
| 462 | |||
| 463 | # | ||
| 464 | # Userland interfaces | ||
| 465 | # | ||
| 466 | CONFIG_INPUT_MOUSEDEV=y | ||
| 467 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
| 468 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
| 469 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
| 470 | # CONFIG_INPUT_JOYDEV is not set | ||
| 471 | # CONFIG_INPUT_TSDEV is not set | ||
| 472 | # CONFIG_INPUT_EVDEV is not set | ||
| 473 | # CONFIG_INPUT_EVBUG is not set | ||
| 474 | |||
| 475 | # | ||
| 476 | # Input Device Drivers | ||
| 477 | # | ||
| 478 | CONFIG_INPUT_KEYBOARD=y | ||
| 479 | CONFIG_KEYBOARD_ATKBD=y | ||
| 480 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
| 481 | # CONFIG_KEYBOARD_LKKBD is not set | ||
| 482 | # CONFIG_KEYBOARD_XTKBD is not set | ||
| 483 | # CONFIG_KEYBOARD_NEWTON is not set | ||
| 484 | CONFIG_INPUT_MOUSE=y | ||
| 485 | CONFIG_MOUSE_PS2=y | ||
| 486 | # CONFIG_MOUSE_SERIAL is not set | ||
| 487 | # CONFIG_MOUSE_INPORT is not set | ||
| 488 | # CONFIG_MOUSE_LOGIBM is not set | ||
| 489 | # CONFIG_MOUSE_PC110PAD is not set | ||
| 490 | # CONFIG_MOUSE_VSXXXAA is not set | ||
| 491 | # CONFIG_INPUT_JOYSTICK is not set | ||
| 492 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
| 493 | # CONFIG_INPUT_MISC is not set | ||
| 494 | |||
| 495 | # | ||
| 496 | # Hardware I/O ports | ||
| 497 | # | ||
| 498 | CONFIG_SERIO=y | ||
| 499 | CONFIG_SERIO_SERPORT=y | ||
| 500 | CONFIG_SERIO_LIBPS2=y | ||
| 501 | # CONFIG_SERIO_RAW is not set | ||
| 502 | # CONFIG_GAMEPORT is not set | ||
| 503 | CONFIG_SOUND_GAMEPORT=y | ||
| 504 | |||
| 505 | # | ||
| 506 | # Character devices | ||
| 507 | # | ||
| 508 | CONFIG_VT=y | ||
| 509 | CONFIG_VT_CONSOLE=y | ||
| 510 | CONFIG_HW_CONSOLE=y | ||
| 511 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 512 | |||
| 513 | # | ||
| 514 | # Serial drivers | ||
| 515 | # | ||
| 516 | # CONFIG_SERIAL_8250 is not set | ||
| 517 | |||
| 518 | # | ||
| 519 | # Non-8250 serial port support | ||
| 520 | # | ||
| 521 | CONFIG_SERIAL_SA1100=y | ||
| 522 | CONFIG_SERIAL_SA1100_CONSOLE=y | ||
| 523 | CONFIG_SERIAL_CORE=y | ||
| 524 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 525 | CONFIG_UNIX98_PTYS=y | ||
| 526 | CONFIG_LEGACY_PTYS=y | ||
| 527 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 528 | |||
| 529 | # | ||
| 530 | # IPMI | ||
| 531 | # | ||
| 532 | # CONFIG_IPMI_HANDLER is not set | ||
| 533 | |||
| 534 | # | ||
| 535 | # Watchdog Cards | ||
| 536 | # | ||
| 537 | # CONFIG_WATCHDOG is not set | ||
| 538 | # CONFIG_NVRAM is not set | ||
| 539 | # CONFIG_RTC is not set | ||
| 540 | # CONFIG_DTLK is not set | ||
| 541 | # CONFIG_R3964 is not set | ||
| 542 | |||
| 543 | # | ||
| 544 | # Ftape, the floppy tape device driver | ||
| 545 | # | ||
| 546 | # CONFIG_DRM is not set | ||
| 547 | |||
| 548 | # | ||
| 549 | # PCMCIA character devices | ||
| 550 | # | ||
| 551 | # CONFIG_SYNCLINK_CS is not set | ||
| 552 | # CONFIG_RAW_DRIVER is not set | ||
| 553 | |||
| 554 | # | ||
| 555 | # TPM devices | ||
| 556 | # | ||
| 557 | # CONFIG_TCG_TPM is not set | ||
| 558 | |||
| 559 | # | ||
| 560 | # I2C support | ||
| 561 | # | ||
| 562 | # CONFIG_I2C is not set | ||
| 563 | |||
| 564 | # | ||
| 565 | # Misc devices | ||
| 566 | # | ||
| 567 | |||
| 568 | # | ||
| 569 | # Multimedia devices | ||
| 570 | # | ||
| 571 | # CONFIG_VIDEO_DEV is not set | ||
| 572 | |||
| 573 | # | ||
| 574 | # Digital Video Broadcasting Devices | ||
| 575 | # | ||
| 576 | # CONFIG_DVB is not set | ||
| 577 | |||
| 578 | # | ||
| 579 | # Graphics support | ||
| 580 | # | ||
| 581 | CONFIG_FB=y | ||
| 582 | CONFIG_FB_CFB_FILLRECT=y | ||
| 583 | CONFIG_FB_CFB_COPYAREA=y | ||
| 584 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
| 585 | CONFIG_FB_SOFT_CURSOR=y | ||
| 586 | # CONFIG_FB_MODE_HELPERS is not set | ||
| 587 | # CONFIG_FB_TILEBLITTING is not set | ||
| 588 | CONFIG_FB_SA1100=y | ||
| 589 | # CONFIG_FB_VIRTUAL is not set | ||
| 590 | |||
| 591 | # | ||
| 592 | # Console display driver support | ||
| 593 | # | ||
| 594 | # CONFIG_VGA_CONSOLE is not set | ||
| 595 | # CONFIG_MDA_CONSOLE is not set | ||
| 596 | CONFIG_DUMMY_CONSOLE=y | ||
| 597 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
| 598 | CONFIG_FONTS=y | ||
| 599 | CONFIG_FONT_8x8=y | ||
| 600 | # CONFIG_FONT_8x16 is not set | ||
| 601 | # CONFIG_FONT_6x11 is not set | ||
| 602 | # CONFIG_FONT_PEARL_8x8 is not set | ||
| 603 | # CONFIG_FONT_ACORN_8x8 is not set | ||
| 604 | # CONFIG_FONT_MINI_4x6 is not set | ||
| 605 | # CONFIG_FONT_SUN8x16 is not set | ||
| 606 | # CONFIG_FONT_SUN12x22 is not set | ||
| 607 | |||
| 608 | # | ||
| 609 | # Logo configuration | ||
| 610 | # | ||
| 611 | # CONFIG_LOGO is not set | ||
| 612 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 613 | |||
| 614 | # | ||
| 615 | # Sound | ||
| 616 | # | ||
| 617 | # CONFIG_SOUND is not set | ||
| 618 | |||
| 619 | # | ||
| 620 | # USB support | ||
| 621 | # | ||
| 622 | CONFIG_USB_ARCH_HAS_HCD=y | ||
| 623 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
| 624 | # CONFIG_USB is not set | ||
| 625 | |||
| 626 | # | ||
| 627 | # USB Gadget Support | ||
| 628 | # | ||
| 629 | # CONFIG_USB_GADGET is not set | ||
| 630 | |||
| 631 | # | ||
| 632 | # MMC/SD Card support | ||
| 633 | # | ||
| 634 | # CONFIG_MMC is not set | ||
| 635 | |||
| 636 | # | ||
| 637 | # File systems | ||
| 638 | # | ||
| 639 | CONFIG_EXT2_FS=y | ||
| 640 | # CONFIG_EXT2_FS_XATTR is not set | ||
| 641 | # CONFIG_EXT3_FS is not set | ||
| 642 | # CONFIG_JBD is not set | ||
| 643 | # CONFIG_REISERFS_FS is not set | ||
| 644 | # CONFIG_JFS_FS is not set | ||
| 645 | |||
| 646 | # | ||
| 647 | # XFS support | ||
| 648 | # | ||
| 649 | # CONFIG_XFS_FS is not set | ||
| 650 | # CONFIG_MINIX_FS is not set | ||
| 651 | # CONFIG_ROMFS_FS is not set | ||
| 652 | # CONFIG_QUOTA is not set | ||
| 653 | CONFIG_DNOTIFY=y | ||
| 654 | # CONFIG_AUTOFS_FS is not set | ||
| 655 | # CONFIG_AUTOFS4_FS is not set | ||
| 656 | |||
| 657 | # | ||
| 658 | # CD-ROM/DVD Filesystems | ||
| 659 | # | ||
| 660 | # CONFIG_ISO9660_FS is not set | ||
| 661 | # CONFIG_UDF_FS is not set | ||
| 662 | |||
| 663 | # | ||
| 664 | # DOS/FAT/NT Filesystems | ||
| 665 | # | ||
| 666 | CONFIG_FAT_FS=y | ||
| 667 | CONFIG_MSDOS_FS=y | ||
| 668 | # CONFIG_VFAT_FS is not set | ||
| 669 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
| 670 | # CONFIG_NTFS_FS is not set | ||
| 671 | |||
| 672 | # | ||
| 673 | # Pseudo filesystems | ||
| 674 | # | ||
| 675 | CONFIG_PROC_FS=y | ||
| 676 | CONFIG_SYSFS=y | ||
| 677 | # CONFIG_DEVFS_FS is not set | ||
| 678 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
| 679 | # CONFIG_TMPFS is not set | ||
| 680 | # CONFIG_HUGETLB_PAGE is not set | ||
| 681 | CONFIG_RAMFS=y | ||
| 682 | |||
| 683 | # | ||
| 684 | # Miscellaneous filesystems | ||
| 685 | # | ||
| 686 | # CONFIG_ADFS_FS is not set | ||
| 687 | # CONFIG_AFFS_FS is not set | ||
| 688 | # CONFIG_HFS_FS is not set | ||
| 689 | # CONFIG_HFSPLUS_FS is not set | ||
| 690 | # CONFIG_BEFS_FS is not set | ||
| 691 | # CONFIG_BFS_FS is not set | ||
| 692 | # CONFIG_EFS_FS is not set | ||
| 693 | # CONFIG_CRAMFS is not set | ||
| 694 | # CONFIG_VXFS_FS is not set | ||
| 695 | # CONFIG_HPFS_FS is not set | ||
| 696 | # CONFIG_QNX4FS_FS is not set | ||
| 697 | # CONFIG_SYSV_FS is not set | ||
| 698 | # CONFIG_UFS_FS is not set | ||
| 699 | |||
| 700 | # | ||
| 701 | # Network File Systems | ||
| 702 | # | ||
| 703 | CONFIG_NFS_FS=y | ||
| 704 | # CONFIG_NFS_V3 is not set | ||
| 705 | # CONFIG_NFS_V4 is not set | ||
| 706 | # CONFIG_NFS_DIRECTIO is not set | ||
| 707 | # CONFIG_NFSD is not set | ||
| 708 | CONFIG_LOCKD=y | ||
| 709 | CONFIG_SUNRPC=y | ||
| 710 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
| 711 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
| 712 | # CONFIG_SMB_FS is not set | ||
| 713 | # CONFIG_CIFS is not set | ||
| 714 | # CONFIG_NCP_FS is not set | ||
| 715 | # CONFIG_CODA_FS is not set | ||
| 716 | # CONFIG_AFS_FS is not set | ||
| 717 | |||
| 718 | # | ||
| 719 | # Partition Types | ||
| 720 | # | ||
| 721 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 722 | CONFIG_MSDOS_PARTITION=y | ||
| 723 | |||
| 724 | # | ||
| 725 | # Native Language Support | ||
| 726 | # | ||
| 727 | CONFIG_NLS=y | ||
| 728 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
| 729 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
| 730 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
| 731 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
| 732 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
| 733 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
| 734 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
| 735 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
| 736 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
| 737 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
| 738 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
| 739 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
| 740 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
| 741 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
| 742 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
| 743 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
| 744 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
| 745 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
| 746 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
| 747 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
| 748 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
| 749 | # CONFIG_NLS_ISO8859_8 is not set | ||
| 750 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
| 751 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
| 752 | # CONFIG_NLS_ASCII is not set | ||
| 753 | # CONFIG_NLS_ISO8859_1 is not set | ||
| 754 | # CONFIG_NLS_ISO8859_2 is not set | ||
| 755 | # CONFIG_NLS_ISO8859_3 is not set | ||
| 756 | # CONFIG_NLS_ISO8859_4 is not set | ||
| 757 | # CONFIG_NLS_ISO8859_5 is not set | ||
| 758 | # CONFIG_NLS_ISO8859_6 is not set | ||
| 759 | # CONFIG_NLS_ISO8859_7 is not set | ||
| 760 | # CONFIG_NLS_ISO8859_9 is not set | ||
| 761 | # CONFIG_NLS_ISO8859_13 is not set | ||
| 762 | # CONFIG_NLS_ISO8859_14 is not set | ||
| 763 | # CONFIG_NLS_ISO8859_15 is not set | ||
| 764 | # CONFIG_NLS_KOI8_R is not set | ||
| 765 | # CONFIG_NLS_KOI8_U is not set | ||
| 766 | # CONFIG_NLS_UTF8 is not set | ||
| 767 | |||
| 768 | # | ||
| 769 | # Profiling support | ||
| 770 | # | ||
| 771 | # CONFIG_PROFILING is not set | ||
| 772 | |||
| 773 | # | ||
| 774 | # Kernel hacking | ||
| 775 | # | ||
| 776 | # CONFIG_PRINTK_TIME is not set | ||
| 777 | # CONFIG_DEBUG_KERNEL is not set | ||
| 778 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 779 | CONFIG_DEBUG_BUGVERBOSE=y | ||
| 780 | CONFIG_FRAME_POINTER=y | ||
| 781 | # CONFIG_DEBUG_USER is not set | ||
| 782 | |||
| 783 | # | ||
| 784 | # Security options | ||
| 785 | # | ||
| 786 | # CONFIG_KEYS is not set | ||
| 787 | # CONFIG_SECURITY is not set | ||
| 788 | |||
| 789 | # | ||
| 790 | # Cryptographic options | ||
| 791 | # | ||
| 792 | # CONFIG_CRYPTO is not set | ||
| 793 | |||
| 794 | # | ||
| 795 | # Hardware crypto devices | ||
| 796 | # | ||
| 797 | |||
| 798 | # | ||
| 799 | # Library routines | ||
| 800 | # | ||
| 801 | # CONFIG_CRC_CCITT is not set | ||
| 802 | CONFIG_CRC32=y | ||
| 803 | # CONFIG_LIBCRC32C is not set | ||
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index bd4823c74645..1155cf07c871 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
| @@ -344,9 +344,9 @@ __create_page_tables: | |||
| 344 | str r6, [r0] | 344 | str r6, [r0] |
| 345 | #endif | 345 | #endif |
| 346 | 346 | ||
| 347 | #ifdef CONFIG_DEBUG_LL | ||
| 347 | bic r7, r7, #0x0c @ turn off cacheable | 348 | bic r7, r7, #0x0c @ turn off cacheable |
| 348 | @ and bufferable bits | 349 | @ and bufferable bits |
| 349 | #ifdef CONFIG_DEBUG_LL | ||
| 350 | /* | 350 | /* |
| 351 | * Map in IO space for serial debugging. | 351 | * Map in IO space for serial debugging. |
| 352 | * This allows debug messages to be output | 352 | * This allows debug messages to be output |
| @@ -372,28 +372,24 @@ __create_page_tables: | |||
| 372 | teq r1, #MACH_TYPE_NETWINDER | 372 | teq r1, #MACH_TYPE_NETWINDER |
| 373 | teqne r1, #MACH_TYPE_CATS | 373 | teqne r1, #MACH_TYPE_CATS |
| 374 | bne 1f | 374 | bne 1f |
| 375 | add r0, r4, #0x3fc0 @ ff000000 | 375 | add r0, r4, #0xff000000 >> 18 |
| 376 | mov r3, #0x7c000000 | 376 | orr r3, r7, #0x7c000000 |
| 377 | orr r3, r3, r7 | 377 | str r3, [r0] |
| 378 | str r3, [r0], #4 | ||
| 379 | add r3, r3, #1 << 20 | ||
| 380 | str r3, [r0], #4 | ||
| 381 | 1: | 378 | 1: |
| 382 | #endif | 379 | #endif |
| 383 | #endif | ||
| 384 | #ifdef CONFIG_ARCH_RPC | 380 | #ifdef CONFIG_ARCH_RPC |
| 385 | /* | 381 | /* |
| 386 | * Map in screen at 0x02000000 & SCREEN2_BASE | 382 | * Map in screen at 0x02000000 & SCREEN2_BASE |
| 387 | * Similar reasons here - for debug. This is | 383 | * Similar reasons here - for debug. This is |
| 388 | * only for Acorn RiscPC architectures. | 384 | * only for Acorn RiscPC architectures. |
| 389 | */ | 385 | */ |
| 390 | add r0, r4, #0x80 @ 02000000 | 386 | add r0, r4, #0x02000000 >> 18 |
| 391 | mov r3, #0x02000000 | 387 | orr r3, r7, #0x02000000 |
| 392 | orr r3, r3, r7 | ||
| 393 | str r3, [r0] | 388 | str r3, [r0] |
| 394 | add r0, r4, #0x3600 @ d8000000 | 389 | add r0, r4, #0xd8000000 >> 18 |
| 395 | str r3, [r0] | 390 | str r3, [r0] |
| 396 | #endif | 391 | #endif |
| 392 | #endif | ||
| 397 | mov pc, lr | 393 | mov pc, lr |
| 398 | .ltorg | 394 | .ltorg |
| 399 | 395 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 35b7273cfdb4..c9b69771f92e 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
| @@ -737,8 +737,8 @@ void __init setup_arch(char **cmdline_p) | |||
| 737 | if (mdesc->soft_reboot) | 737 | if (mdesc->soft_reboot) |
| 738 | reboot_setup("s"); | 738 | reboot_setup("s"); |
| 739 | 739 | ||
| 740 | if (mdesc->param_offset) | 740 | if (mdesc->boot_params) |
| 741 | tags = phys_to_virt(mdesc->param_offset); | 741 | tags = phys_to_virt(mdesc->boot_params); |
| 742 | 742 | ||
| 743 | /* | 743 | /* |
| 744 | * If we have the old style parameters, convert them to | 744 | * If we have the old style parameters, convert them to |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 2fb0a4cfb37a..df2cb06ce424 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
| @@ -230,16 +230,8 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | |||
| 230 | do_exit(SIGSEGV); | 230 | do_exit(SIGSEGV); |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | void die_if_kernel(const char *str, struct pt_regs *regs, int err) | 233 | void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, |
| 234 | { | 234 | unsigned long err, unsigned long trap) |
| 235 | if (user_mode(regs)) | ||
| 236 | return; | ||
| 237 | |||
| 238 | die(str, regs, err); | ||
| 239 | } | ||
| 240 | |||
| 241 | static void notify_die(const char *str, struct pt_regs *regs, siginfo_t *info, | ||
| 242 | unsigned long err, unsigned long trap) | ||
| 243 | { | 235 | { |
| 244 | if (user_mode(regs)) { | 236 | if (user_mode(regs)) { |
| 245 | current->thread.error_code = err; | 237 | current->thread.error_code = err; |
diff --git a/arch/arm/mach-aaec2000/aaed2000.c b/arch/arm/mach-aaec2000/aaed2000.c index 5417ca3f4621..c9d899886648 100644 --- a/arch/arm/mach-aaec2000/aaed2000.c +++ b/arch/arm/mach-aaec2000/aaed2000.c | |||
| @@ -40,9 +40,11 @@ static void __init aaed2000_map_io(void) | |||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform") | 42 | MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform") |
| 43 | MAINTAINER("Nicolas Bellido Y Ortega") | 43 | /* Maintainer: Nicolas Bellido Y Ortega */ |
| 44 | BOOT_MEM(0xf0000000, PIO_BASE, VIO_BASE) | 44 | .phys_ram = 0xf0000000, |
| 45 | MAPIO(aaed2000_map_io) | 45 | .phys_io = PIO_BASE, |
| 46 | INITIRQ(aaed2000_init_irq) | 46 | .io_pg_offst = ((VIO_BASE) >> 18) & 0xfffc, |
| 47 | .map_io = aaed2000_map_io, | ||
| 48 | .init_irq = aaed2000_init_irq, | ||
| 47 | .timer = &aaec2000_timer, | 49 | .timer = &aaec2000_timer, |
| 48 | MACHINE_END | 50 | MACHINE_END |
diff --git a/arch/arm/mach-clps711x/autcpu12.c b/arch/arm/mach-clps711x/autcpu12.c index c106704a2c34..dc73feb1ffb0 100644 --- a/arch/arm/mach-clps711x/autcpu12.c +++ b/arch/arm/mach-clps711x/autcpu12.c | |||
| @@ -59,11 +59,13 @@ void __init autcpu12_map_io(void) | |||
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | MACHINE_START(AUTCPU12, "autronix autcpu12") | 61 | MACHINE_START(AUTCPU12, "autronix autcpu12") |
| 62 | MAINTAINER("Thomas Gleixner") | 62 | /* Maintainer: Thomas Gleixner */ |
| 63 | BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) | 63 | .phys_ram = 0xc0000000, |
| 64 | BOOT_PARAMS(0xc0020000) | 64 | .phys_io = 0x80000000, |
| 65 | MAPIO(autcpu12_map_io) | 65 | .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, |
| 66 | INITIRQ(clps711x_init_irq) | 66 | .boot_params = 0xc0020000, |
| 67 | .map_io = autcpu12_map_io, | ||
| 68 | .init_irq = clps711x_init_irq, | ||
| 67 | .timer = &clps711x_timer, | 69 | .timer = &clps711x_timer, |
| 68 | MACHINE_END | 70 | MACHINE_END |
| 69 | 71 | ||
diff --git a/arch/arm/mach-clps711x/cdb89712.c b/arch/arm/mach-clps711x/cdb89712.c index 7664f9cf83b8..a46c82cd2711 100644 --- a/arch/arm/mach-clps711x/cdb89712.c +++ b/arch/arm/mach-clps711x/cdb89712.c | |||
| @@ -49,10 +49,12 @@ static void __init cdb89712_map_io(void) | |||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | MACHINE_START(CDB89712, "Cirrus-CDB89712") | 51 | MACHINE_START(CDB89712, "Cirrus-CDB89712") |
| 52 | MAINTAINER("Ray Lehtiniemi") | 52 | /* Maintainer: Ray Lehtiniemi */ |
| 53 | BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) | 53 | .phys_ram = 0xc0000000, |
| 54 | BOOT_PARAMS(0xc0000100) | 54 | .phys_io = 0x80000000, |
| 55 | MAPIO(cdb89712_map_io) | 55 | .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, |
| 56 | INITIRQ(clps711x_init_irq) | 56 | .boot_params = 0xc0000100, |
| 57 | .map_io = cdb89712_map_io, | ||
| 58 | .init_irq = clps711x_init_irq, | ||
| 57 | .timer = &clps711x_timer, | 59 | .timer = &clps711x_timer, |
| 58 | MACHINE_END | 60 | MACHINE_END |
diff --git a/arch/arm/mach-clps711x/ceiva.c b/arch/arm/mach-clps711x/ceiva.c index e4093be3c4cb..780d91805984 100644 --- a/arch/arm/mach-clps711x/ceiva.c +++ b/arch/arm/mach-clps711x/ceiva.c | |||
| @@ -53,10 +53,12 @@ static void __init ceiva_map_io(void) | |||
| 53 | 53 | ||
| 54 | 54 | ||
| 55 | MACHINE_START(CEIVA, "CEIVA/Polaroid Photo MAX Digital Picture Frame") | 55 | MACHINE_START(CEIVA, "CEIVA/Polaroid Photo MAX Digital Picture Frame") |
| 56 | MAINTAINER("Rob Scott") | 56 | /* Maintainer: Rob Scott */ |
| 57 | BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) | 57 | .phys_ram = 0xc0000000, |
| 58 | BOOT_PARAMS(0xc0000100) | 58 | .phys_io = 0x80000000, |
| 59 | MAPIO(ceiva_map_io) | 59 | .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, |
| 60 | INITIRQ(clps711x_init_irq) | 60 | .boot_params = 0xc0000100, |
| 61 | .map_io = ceiva_map_io, | ||
| 62 | .init_irq = clps711x_init_irq, | ||
| 61 | .timer = &clps711x_timer, | 63 | .timer = &clps711x_timer, |
| 62 | MACHINE_END | 64 | MACHINE_END |
diff --git a/arch/arm/mach-clps711x/clep7312.c b/arch/arm/mach-clps711x/clep7312.c index 9ca21cb481ba..c83f3fd68fcd 100644 --- a/arch/arm/mach-clps711x/clep7312.c +++ b/arch/arm/mach-clps711x/clep7312.c | |||
| @@ -37,12 +37,14 @@ fixup_clep7312(struct machine_desc *desc, struct tag *tags, | |||
| 37 | 37 | ||
| 38 | 38 | ||
| 39 | MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") | 39 | MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") |
| 40 | MAINTAINER("Nobody") | 40 | /* Maintainer: Nobody */ |
| 41 | BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) | 41 | .phys_ram = 0xc0000000, |
| 42 | BOOT_PARAMS(0xc0000100) | 42 | .phys_io = 0x80000000, |
| 43 | FIXUP(fixup_clep7312) | 43 | .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, |
| 44 | MAPIO(clps711x_map_io) | 44 | .boot_params = 0xc0000100, |
| 45 | INITIRQ(clps711x_init_irq) | 45 | .fixup = fixup_clep7312, |
| 46 | .map_io = clps711x_map_io, | ||
| 47 | .init_irq = clps711x_init_irq, | ||
| 46 | .timer = &clps711x_timer, | 48 | .timer = &clps711x_timer, |
| 47 | MACHINE_END | 49 | MACHINE_END |
| 48 | 50 | ||
diff --git a/arch/arm/mach-clps711x/edb7211-arch.c b/arch/arm/mach-clps711x/edb7211-arch.c index c6c46324a2e3..255c98b63e15 100644 --- a/arch/arm/mach-clps711x/edb7211-arch.c +++ b/arch/arm/mach-clps711x/edb7211-arch.c | |||
| @@ -51,11 +51,13 @@ fixup_edb7211(struct machine_desc *desc, struct tag *tags, | |||
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") | 53 | MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") |
| 54 | MAINTAINER("Jon McClintock") | 54 | /* Maintainer: Jon McClintock */ |
| 55 | BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) | 55 | .phys_ram = 0xc0000000, |
| 56 | BOOT_PARAMS(0xc0020100) /* 0xc0000000 - 0xc001ffff can be video RAM */ | 56 | .phys_io = 0x80000000, |
| 57 | FIXUP(fixup_edb7211) | 57 | .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, |
| 58 | MAPIO(edb7211_map_io) | 58 | .boot_params = 0xc0020100, /* 0xc0000000 - 0xc001ffff can be video RAM */ |
| 59 | INITIRQ(clps711x_init_irq) | 59 | .fixup = fixup_edb7211, |
| 60 | .map_io = edb7211_map_io, | ||
| 61 | .init_irq = clps711x_init_irq, | ||
| 60 | .timer = &clps711x_timer, | 62 | .timer = &clps711x_timer, |
| 61 | MACHINE_END | 63 | MACHINE_END |
diff --git a/arch/arm/mach-clps711x/fortunet.c b/arch/arm/mach-clps711x/fortunet.c index c1c5b8e01549..f83a59761e02 100644 --- a/arch/arm/mach-clps711x/fortunet.c +++ b/arch/arm/mach-clps711x/fortunet.c | |||
| @@ -75,11 +75,13 @@ fortunet_fixup(struct machine_desc *desc, struct tag *tags, | |||
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | MACHINE_START(FORTUNET, "ARM-FortuNet") | 77 | MACHINE_START(FORTUNET, "ARM-FortuNet") |
| 78 | MAINTAINER("FortuNet Inc.") | 78 | /* Maintainer: FortuNet Inc. */ |
| 79 | BOOT_MEM(0xc0000000, 0x80000000, 0xf0000000) | 79 | .phys_ram = 0xc0000000, |
| 80 | BOOT_PARAMS(0x00000000) | 80 | .phys_io = 0x80000000, |
| 81 | FIXUP(fortunet_fixup) | 81 | .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc, |
| 82 | MAPIO(clps711x_map_io) | 82 | .boot_params = 0x00000000, |
| 83 | INITIRQ(clps711x_init_irq) | 83 | .fixup = fortunet_fixup, |
| 84 | .map_io = clps711x_map_io, | ||
| 85 | .init_irq = clps711x_init_irq, | ||
| 84 | .timer = &clps711x_timer, | 86 | .timer = &clps711x_timer, |
| 85 | MACHINE_END | 87 | MACHINE_END |
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c index 29269df054f5..5bdb90edf992 100644 --- a/arch/arm/mach-clps711x/p720t.c +++ b/arch/arm/mach-clps711x/p720t.c | |||
| @@ -79,12 +79,14 @@ static void __init p720t_map_io(void) | |||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | MACHINE_START(P720T, "ARM-Prospector720T") | 81 | MACHINE_START(P720T, "ARM-Prospector720T") |
| 82 | MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") | 82 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 83 | BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) | 83 | .phys_ram = 0xc0000000, |
| 84 | BOOT_PARAMS(0xc0000100) | 84 | .phys_io = 0x80000000, |
| 85 | FIXUP(fixup_p720t) | 85 | .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, |
| 86 | MAPIO(p720t_map_io) | 86 | .boot_params = 0xc0000100, |
| 87 | INITIRQ(clps711x_init_irq) | 87 | .fixup = fixup_p720t, |
| 88 | .map_io = p720t_map_io, | ||
| 89 | .init_irq = clps711x_init_irq, | ||
| 88 | .timer = &clps711x_timer, | 90 | .timer = &clps711x_timer, |
| 89 | MACHINE_END | 91 | MACHINE_END |
| 90 | 92 | ||
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c index 90e85f434f6f..112f1d68fb2b 100644 --- a/arch/arm/mach-clps7500/core.c +++ b/arch/arm/mach-clps7500/core.c | |||
| @@ -366,11 +366,13 @@ static void __init clps7500_init(void) | |||
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | MACHINE_START(CLPS7500, "CL-PS7500") | 368 | MACHINE_START(CLPS7500, "CL-PS7500") |
| 369 | MAINTAINER("Philip Blundell") | 369 | /* Maintainer: Philip Blundell */ |
| 370 | BOOT_MEM(0x10000000, 0x03000000, 0xe0000000) | 370 | .phys_ram = 0x10000000, |
| 371 | MAPIO(clps7500_map_io) | 371 | .phys_io = 0x03000000, |
| 372 | INITIRQ(clps7500_init_irq) | 372 | .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, |
| 373 | .init_machine = clps7500_init, | 373 | .map_io = clps7500_map_io, |
| 374 | .timer = &clps7500_timer, | 374 | .init_irq = clps7500_init_irq, |
| 375 | .init_machine = clps7500_init, | ||
| 376 | .timer = &clps7500_timer, | ||
| 375 | MACHINE_END | 377 | MACHINE_END |
| 376 | 378 | ||
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c index 86ffdbb5626e..23c4da10101b 100644 --- a/arch/arm/mach-ebsa110/core.c +++ b/arch/arm/mach-ebsa110/core.c | |||
| @@ -233,13 +233,15 @@ static int __init ebsa110_init(void) | |||
| 233 | arch_initcall(ebsa110_init); | 233 | arch_initcall(ebsa110_init); |
| 234 | 234 | ||
| 235 | MACHINE_START(EBSA110, "EBSA110") | 235 | MACHINE_START(EBSA110, "EBSA110") |
| 236 | MAINTAINER("Russell King") | 236 | /* Maintainer: Russell King */ |
| 237 | BOOT_MEM(0x00000000, 0xe0000000, 0xe0000000) | 237 | .phys_ram = 0x00000000, |
| 238 | BOOT_PARAMS(0x00000400) | 238 | .phys_io = 0xe0000000, |
| 239 | DISABLE_PARPORT(0) | 239 | .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, |
| 240 | DISABLE_PARPORT(2) | 240 | .boot_params = 0x00000400, |
| 241 | SOFT_REBOOT | 241 | .reserve_lp0 = 1, |
| 242 | MAPIO(ebsa110_map_io) | 242 | .reserve_lp2 = 1, |
| 243 | INITIRQ(ebsa110_init_irq) | 243 | .soft_reboot = 1, |
| 244 | .map_io = ebsa110_map_io, | ||
| 245 | .init_irq = ebsa110_init_irq, | ||
| 244 | .timer = &ebsa110_timer, | 246 | .timer = &ebsa110_timer, |
| 245 | MACHINE_END | 247 | MACHINE_END |
diff --git a/arch/arm/mach-epxa10db/arch.c b/arch/arm/mach-epxa10db/arch.c index 1b40340e8a21..7daa021676d0 100644 --- a/arch/arm/mach-epxa10db/arch.c +++ b/arch/arm/mach-epxa10db/arch.c | |||
| @@ -63,10 +63,12 @@ extern void epxa10db_init_irq(void); | |||
| 63 | extern struct sys_timer epxa10db_timer; | 63 | extern struct sys_timer epxa10db_timer; |
| 64 | 64 | ||
| 65 | MACHINE_START(CAMELOT, "Altera Epxa10db") | 65 | MACHINE_START(CAMELOT, "Altera Epxa10db") |
| 66 | MAINTAINER("Altera Corporation") | 66 | /* Maintainer: Altera Corporation */ |
| 67 | BOOT_MEM(0x00000000, 0x7fffc000, 0xffffc000) | 67 | .phys_ram = 0x00000000, |
| 68 | MAPIO(epxa10db_map_io) | 68 | .phys_io = 0x7fffc000, |
| 69 | INITIRQ(epxa10db_init_irq) | 69 | .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc, |
| 70 | .map_io = epxa10db_map_io, | ||
| 71 | .init_irq = epxa10db_init_irq, | ||
| 70 | .timer = &epxa10db_timer, | 72 | .timer = &epxa10db_timer, |
| 71 | MACHINE_END | 73 | MACHINE_END |
| 72 | 74 | ||
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c index d1ced86c379c..49b898af0032 100644 --- a/arch/arm/mach-footbridge/cats-hw.c +++ b/arch/arm/mach-footbridge/cats-hw.c | |||
| @@ -84,12 +84,14 @@ fixup_cats(struct machine_desc *desc, struct tag *tags, | |||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | MACHINE_START(CATS, "Chalice-CATS") | 86 | MACHINE_START(CATS, "Chalice-CATS") |
| 87 | MAINTAINER("Philip Blundell") | 87 | /* Maintainer: Philip Blundell */ |
| 88 | BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) | 88 | .phys_ram = 0x00000000, |
| 89 | BOOT_PARAMS(0x00000100) | 89 | .phys_io = DC21285_ARMCSR_BASE, |
| 90 | SOFT_REBOOT | 90 | .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc, |
| 91 | FIXUP(fixup_cats) | 91 | .boot_params = 0x00000100, |
| 92 | MAPIO(footbridge_map_io) | 92 | .soft_reboot = 1, |
| 93 | INITIRQ(footbridge_init_irq) | 93 | .fixup = fixup_cats, |
| 94 | .map_io = footbridge_map_io, | ||
| 95 | .init_irq = footbridge_init_irq, | ||
| 94 | .timer = &isa_timer, | 96 | .timer = &isa_timer, |
| 95 | MACHINE_END | 97 | MACHINE_END |
diff --git a/arch/arm/mach-footbridge/co285.c b/arch/arm/mach-footbridge/co285.c index e1541914fdcd..548a79081688 100644 --- a/arch/arm/mach-footbridge/co285.c +++ b/arch/arm/mach-footbridge/co285.c | |||
| @@ -28,11 +28,13 @@ fixup_coebsa285(struct machine_desc *desc, struct tag *tags, | |||
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | MACHINE_START(CO285, "co-EBSA285") | 30 | MACHINE_START(CO285, "co-EBSA285") |
| 31 | MAINTAINER("Mark van Doesburg") | 31 | /* Maintainer: Mark van Doesburg */ |
| 32 | BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0x7cf00000) | 32 | .phys_ram = 0x00000000, |
| 33 | FIXUP(fixup_coebsa285) | 33 | .phys_io = DC21285_ARMCSR_BASE, |
| 34 | MAPIO(footbridge_map_io) | 34 | .io_pg_offst = ((0x7cf00000) >> 18) & 0xfffc, |
| 35 | INITIRQ(footbridge_init_irq) | 35 | .fixup = fixup_coebsa285, |
| 36 | .map_io = footbridge_map_io, | ||
| 37 | .init_irq = footbridge_init_irq, | ||
| 36 | .timer = &footbridge_timer, | 38 | .timer = &footbridge_timer, |
| 37 | MACHINE_END | 39 | MACHINE_END |
| 38 | 40 | ||
diff --git a/arch/arm/mach-footbridge/ebsa285.c b/arch/arm/mach-footbridge/ebsa285.c index d0931f5a63c8..1c37605268d5 100644 --- a/arch/arm/mach-footbridge/ebsa285.c +++ b/arch/arm/mach-footbridge/ebsa285.c | |||
| @@ -13,12 +13,15 @@ | |||
| 13 | #include "common.h" | 13 | #include "common.h" |
| 14 | 14 | ||
| 15 | MACHINE_START(EBSA285, "EBSA285") | 15 | MACHINE_START(EBSA285, "EBSA285") |
| 16 | MAINTAINER("Russell King") | 16 | /* Maintainer: Russell King */ |
| 17 | BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) | 17 | .phys_ram = 0x00000000, |
| 18 | BOOT_PARAMS(0x00000100) | 18 | .phys_io = DC21285_ARMCSR_BASE, |
| 19 | VIDEO(0x000a0000, 0x000bffff) | 19 | .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc, |
| 20 | MAPIO(footbridge_map_io) | 20 | .boot_params = 0x00000100, |
| 21 | INITIRQ(footbridge_init_irq) | 21 | .video_start = 0x000a0000, |
| 22 | .video_end = 0x000bffff, | ||
| 23 | .map_io = footbridge_map_io, | ||
| 24 | .init_irq = footbridge_init_irq, | ||
| 22 | .timer = &footbridge_timer, | 25 | .timer = &footbridge_timer, |
| 23 | MACHINE_END | 26 | MACHINE_END |
| 24 | 27 | ||
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c index 1e1dfd79f4fe..775f85fc8513 100644 --- a/arch/arm/mach-footbridge/netwinder-hw.c +++ b/arch/arm/mach-footbridge/netwinder-hw.c | |||
| @@ -647,14 +647,17 @@ fixup_netwinder(struct machine_desc *desc, struct tag *tags, | |||
| 647 | } | 647 | } |
| 648 | 648 | ||
| 649 | MACHINE_START(NETWINDER, "Rebel-NetWinder") | 649 | MACHINE_START(NETWINDER, "Rebel-NetWinder") |
| 650 | MAINTAINER("Russell King/Rebel.com") | 650 | /* Maintainer: Russell King/Rebel.com */ |
| 651 | BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) | 651 | .phys_ram = 0x00000000, |
| 652 | BOOT_PARAMS(0x00000100) | 652 | .phys_io = DC21285_ARMCSR_BASE, |
| 653 | VIDEO(0x000a0000, 0x000bffff) | 653 | .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc, |
| 654 | DISABLE_PARPORT(0) | 654 | .boot_params = 0x00000100, |
| 655 | DISABLE_PARPORT(2) | 655 | .video_start = 0x000a0000, |
| 656 | FIXUP(fixup_netwinder) | 656 | .video_end = 0x000bffff, |
| 657 | MAPIO(footbridge_map_io) | 657 | .reserve_lp0 = 1, |
| 658 | INITIRQ(footbridge_init_irq) | 658 | .reserve_lp2 = 1, |
| 659 | .fixup = fixup_netwinder, | ||
| 660 | .map_io = footbridge_map_io, | ||
| 661 | .init_irq = footbridge_init_irq, | ||
| 659 | .timer = &isa_timer, | 662 | .timer = &isa_timer, |
| 660 | MACHINE_END | 663 | MACHINE_END |
diff --git a/arch/arm/mach-footbridge/personal.c b/arch/arm/mach-footbridge/personal.c index 415086d7bbee..0146b8bb59da 100644 --- a/arch/arm/mach-footbridge/personal.c +++ b/arch/arm/mach-footbridge/personal.c | |||
| @@ -13,11 +13,13 @@ | |||
| 13 | #include "common.h" | 13 | #include "common.h" |
| 14 | 14 | ||
| 15 | MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer") | 15 | MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer") |
| 16 | MAINTAINER("Jamey Hicks / George France") | 16 | /* Maintainer: Jamey Hicks / George France */ |
| 17 | BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) | 17 | .phys_ram = 0x00000000, |
| 18 | BOOT_PARAMS(0x00000100) | 18 | .phys_io = DC21285_ARMCSR_BASE, |
| 19 | MAPIO(footbridge_map_io) | 19 | .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc, |
| 20 | INITIRQ(footbridge_init_irq) | 20 | .boot_params = 0x00000100, |
| 21 | .map_io = footbridge_map_io, | ||
| 22 | .init_irq = footbridge_init_irq, | ||
| 21 | .timer = &footbridge_timer, | 23 | .timer = &footbridge_timer, |
| 22 | MACHINE_END | 24 | MACHINE_END |
| 23 | 25 | ||
diff --git a/arch/arm/mach-h720x/h7201-eval.c b/arch/arm/mach-h720x/h7201-eval.c index 9b24b9b0db15..fa59e9e2a5c8 100644 --- a/arch/arm/mach-h720x/h7201-eval.c +++ b/arch/arm/mach-h720x/h7201-eval.c | |||
| @@ -30,10 +30,12 @@ | |||
| 30 | #include "common.h" | 30 | #include "common.h" |
| 31 | 31 | ||
| 32 | MACHINE_START(H7201, "Hynix GMS30C7201") | 32 | MACHINE_START(H7201, "Hynix GMS30C7201") |
| 33 | MAINTAINER("Robert Schwebel, Pengutronix") | 33 | /* Maintainer: Robert Schwebel, Pengutronix */ |
| 34 | BOOT_MEM(0x40000000, 0x80000000, 0xf0000000) | 34 | .phys_ram = 0x40000000, |
| 35 | BOOT_PARAMS(0xc0001000) | 35 | .phys_io = 0x80000000, |
| 36 | MAPIO(h720x_map_io) | 36 | .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc, |
| 37 | INITIRQ(h720x_init_irq) | 37 | .boot_params = 0xc0001000, |
| 38 | .timer = &h7201_timer, | 38 | .map_io = h720x_map_io, |
| 39 | .init_irq = h720x_init_irq, | ||
| 40 | .timer = &h7201_timer, | ||
| 39 | MACHINE_END | 41 | MACHINE_END |
diff --git a/arch/arm/mach-h720x/h7202-eval.c b/arch/arm/mach-h720x/h7202-eval.c index 3456a00d5f5c..db9078ad008c 100644 --- a/arch/arm/mach-h720x/h7202-eval.c +++ b/arch/arm/mach-h720x/h7202-eval.c | |||
| @@ -71,11 +71,13 @@ static void __init init_eval_h7202(void) | |||
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | MACHINE_START(H7202, "Hynix HMS30C7202") | 73 | MACHINE_START(H7202, "Hynix HMS30C7202") |
| 74 | MAINTAINER("Robert Schwebel, Pengutronix") | 74 | /* Maintainer: Robert Schwebel, Pengutronix */ |
| 75 | BOOT_MEM(0x40000000, 0x80000000, 0xf0000000) | 75 | .phys_ram = 0x40000000, |
| 76 | BOOT_PARAMS(0x40000100) | 76 | .phys_io = 0x80000000, |
| 77 | MAPIO(h720x_map_io) | 77 | .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc, |
| 78 | INITIRQ(h7202_init_irq) | 78 | .boot_params = 0x40000100, |
| 79 | .timer = &h7202_timer, | 79 | .map_io = h720x_map_io, |
| 80 | INIT_MACHINE(init_eval_h7202) | 80 | .init_irq = h7202_init_irq, |
| 81 | .timer = &h7202_timer, | ||
| 82 | .init_machine = init_eval_h7202, | ||
| 81 | MACHINE_END | 83 | MACHINE_END |
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c index 625dd01c2578..5d25434d332c 100644 --- a/arch/arm/mach-imx/mx1ads.c +++ b/arch/arm/mach-imx/mx1ads.c | |||
| @@ -78,11 +78,13 @@ mx1ads_map_io(void) | |||
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | MACHINE_START(MX1ADS, "Motorola MX1ADS") | 80 | MACHINE_START(MX1ADS, "Motorola MX1ADS") |
| 81 | MAINTAINER("Sascha Hauer, Pengutronix") | 81 | /* Maintainer: Sascha Hauer, Pengutronix */ |
| 82 | BOOT_MEM(0x08000000, 0x00200000, 0xe0200000) | 82 | .phys_ram = 0x08000000, |
| 83 | BOOT_PARAMS(0x08000100) | 83 | .phys_io = 0x00200000, |
| 84 | MAPIO(mx1ads_map_io) | 84 | .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc, |
| 85 | INITIRQ(imx_init_irq) | 85 | .boot_params = 0x08000100, |
| 86 | .map_io = mx1ads_map_io, | ||
| 87 | .init_irq = imx_init_irq, | ||
| 86 | .timer = &imx_timer, | 88 | .timer = &imx_timer, |
| 87 | INIT_MACHINE(mx1ads_init) | 89 | .init_machine = mx1ads_init, |
| 88 | MACHINE_END | 90 | MACHINE_END |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 91ba9fd79c87..36e2b6eb67b7 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
| @@ -292,11 +292,13 @@ static struct sys_timer ap_timer = { | |||
| 292 | }; | 292 | }; |
| 293 | 293 | ||
| 294 | MACHINE_START(INTEGRATOR, "ARM-Integrator") | 294 | MACHINE_START(INTEGRATOR, "ARM-Integrator") |
| 295 | MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") | 295 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 296 | BOOT_MEM(0x00000000, 0x16000000, 0xf1600000) | 296 | .phys_ram = 0x00000000, |
| 297 | BOOT_PARAMS(0x00000100) | 297 | .phys_io = 0x16000000, |
| 298 | MAPIO(ap_map_io) | 298 | .io_pg_offst = ((0xf1600000) >> 18) & 0xfffc, |
| 299 | INITIRQ(ap_init_irq) | 299 | .boot_params = 0x00000100, |
| 300 | .map_io = ap_map_io, | ||
| 301 | .init_irq = ap_init_irq, | ||
| 300 | .timer = &ap_timer, | 302 | .timer = &ap_timer, |
| 301 | INIT_MACHINE(ap_init) | 303 | .init_machine = ap_init, |
| 302 | MACHINE_END | 304 | MACHINE_END |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index e0a01eef0993..569f328c479d 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
| @@ -532,11 +532,13 @@ static struct sys_timer cp_timer = { | |||
| 532 | }; | 532 | }; |
| 533 | 533 | ||
| 534 | MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") | 534 | MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") |
| 535 | MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") | 535 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 536 | BOOT_MEM(0x00000000, 0x16000000, 0xf1600000) | 536 | .phys_ram = 0x00000000, |
| 537 | BOOT_PARAMS(0x00000100) | 537 | .phys_io = 0x16000000, |
| 538 | MAPIO(intcp_map_io) | 538 | .io_pg_offst = ((0xf1600000) >> 18) & 0xfffc, |
| 539 | INITIRQ(intcp_init_irq) | 539 | .boot_params = 0x00000100, |
| 540 | .map_io = intcp_map_io, | ||
| 541 | .init_irq = intcp_init_irq, | ||
| 540 | .timer = &cp_timer, | 542 | .timer = &cp_timer, |
| 541 | INIT_MACHINE(intcp_init) | 543 | .init_machine = intcp_init, |
| 542 | MACHINE_END | 544 | MACHINE_END |
diff --git a/arch/arm/mach-iop3xx/iop321-setup.c b/arch/arm/mach-iop3xx/iop321-setup.c index bf23e0fd2843..0f921ba2750c 100644 --- a/arch/arm/mach-iop3xx/iop321-setup.c +++ b/arch/arm/mach-iop3xx/iop321-setup.c | |||
| @@ -146,23 +146,27 @@ extern void iop321_init_time(void); | |||
| 146 | 146 | ||
| 147 | #if defined(CONFIG_ARCH_IQ80321) | 147 | #if defined(CONFIG_ARCH_IQ80321) |
| 148 | MACHINE_START(IQ80321, "Intel IQ80321") | 148 | MACHINE_START(IQ80321, "Intel IQ80321") |
| 149 | MAINTAINER("Intel Corporation") | 149 | /* Maintainer: Intel Corporation */ |
| 150 | BOOT_MEM(PHYS_OFFSET, IQ80321_UART, IQ80321_UART) | 150 | .phys_ram = PHYS_OFFSET, |
| 151 | MAPIO(iq80321_map_io) | 151 | .phys_io = IQ80321_UART, |
| 152 | INITIRQ(iop321_init_irq) | 152 | .io_pg_offst = ((IQ80321_UART) >> 18) & 0xfffc, |
| 153 | .map_io = iq80321_map_io, | ||
| 154 | .init_irq = iop321_init_irq, | ||
| 153 | .timer = &iop321_timer, | 155 | .timer = &iop321_timer, |
| 154 | BOOT_PARAMS(0xa0000100) | 156 | .boot_params = 0xa0000100, |
| 155 | INIT_MACHINE(iop32x_init) | 157 | .init_machine = iop32x_init, |
| 156 | MACHINE_END | 158 | MACHINE_END |
| 157 | #elif defined(CONFIG_ARCH_IQ31244) | 159 | #elif defined(CONFIG_ARCH_IQ31244) |
| 158 | MACHINE_START(IQ31244, "Intel IQ31244") | 160 | MACHINE_START(IQ31244, "Intel IQ31244") |
| 159 | MAINTAINER("Intel Corp.") | 161 | /* Maintainer: Intel Corp. */ |
| 160 | BOOT_MEM(PHYS_OFFSET, IQ31244_UART, IQ31244_UART) | 162 | .phys_ram = PHYS_OFFSET, |
| 161 | MAPIO(iq31244_map_io) | 163 | .phys_io = IQ31244_UART, |
| 162 | INITIRQ(iop321_init_irq) | 164 | .io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc, |
| 165 | .map_io = iq31244_map_io, | ||
| 166 | .init_irq = iop321_init_irq, | ||
| 163 | .timer = &iop321_timer, | 167 | .timer = &iop321_timer, |
| 164 | BOOT_PARAMS(0xa0000100) | 168 | .boot_params = 0xa0000100, |
| 165 | INIT_MACHINE(iop32x_init) | 169 | .init_machine = iop32x_init, |
| 166 | MACHINE_END | 170 | MACHINE_END |
| 167 | #else | 171 | #else |
| 168 | #error No machine descriptor defined for this IOP3XX implementation | 172 | #error No machine descriptor defined for this IOP3XX implementation |
diff --git a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c index 622e7914819a..fc74b722f72f 100644 --- a/arch/arm/mach-iop3xx/iop331-setup.c +++ b/arch/arm/mach-iop3xx/iop331-setup.c | |||
| @@ -148,26 +148,28 @@ extern void iq80332_map_io(void); | |||
| 148 | 148 | ||
| 149 | #if defined(CONFIG_ARCH_IQ80331) | 149 | #if defined(CONFIG_ARCH_IQ80331) |
| 150 | MACHINE_START(IQ80331, "Intel IQ80331") | 150 | MACHINE_START(IQ80331, "Intel IQ80331") |
| 151 | MAINTAINER("Intel Corp.") | 151 | /* Maintainer: Intel Corp. */ |
| 152 | BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical | 152 | .phys_ram = PHYS_OFFSET, |
| 153 | //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS) | 153 | .phys_io = 0xfefff000, |
| 154 | MAPIO(iq80331_map_io) | 154 | .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical |
| 155 | INITIRQ(iop331_init_irq) | 155 | .map_io = iq80331_map_io, |
| 156 | .init_irq = iop331_init_irq, | ||
| 156 | .timer = &iop331_timer, | 157 | .timer = &iop331_timer, |
| 157 | BOOT_PARAMS(0x0100) | 158 | .boot_params = 0x0100, |
| 158 | INIT_MACHINE(iop33x_init) | 159 | .init_machine = iop33x_init, |
| 159 | MACHINE_END | 160 | MACHINE_END |
| 160 | 161 | ||
| 161 | #elif defined(CONFIG_MACH_IQ80332) | 162 | #elif defined(CONFIG_MACH_IQ80332) |
| 162 | MACHINE_START(IQ80332, "Intel IQ80332") | 163 | MACHINE_START(IQ80332, "Intel IQ80332") |
| 163 | MAINTAINER("Intel Corp.") | 164 | /* Maintainer: Intel Corp. */ |
| 164 | BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical | 165 | .phys_ram = PHYS_OFFSET, |
| 165 | //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS) | 166 | .phys_io = 0xfefff000, |
| 166 | MAPIO(iq80332_map_io) | 167 | .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical |
| 167 | INITIRQ(iop331_init_irq) | 168 | .map_io = iq80332_map_io, |
| 169 | .init_irq = iop331_init_irq, | ||
| 168 | .timer = &iop331_timer, | 170 | .timer = &iop331_timer, |
| 169 | BOOT_PARAMS(0x0100) | 171 | .boot_params = 0x0100, |
| 170 | INIT_MACHINE(iop33x_init) | 172 | .init_machine = iop33x_init, |
| 171 | MACHINE_END | 173 | MACHINE_END |
| 172 | 174 | ||
| 173 | #else | 175 | #else |
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c index f3a291b6a9fb..b7ebf3898fc5 100644 --- a/arch/arm/mach-ixp2000/enp2611.c +++ b/arch/arm/mach-ixp2000/enp2611.c | |||
| @@ -223,13 +223,15 @@ static void __init enp2611_init_machine(void) | |||
| 223 | 223 | ||
| 224 | 224 | ||
| 225 | MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board") | 225 | MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board") |
| 226 | MAINTAINER("Lennert Buytenhek <buytenh@wantstofly.org>") | 226 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ |
| 227 | BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) | 227 | .phys_ram = 0x00000000, |
| 228 | BOOT_PARAMS(0x00000100) | 228 | .phys_io = IXP2000_UART_PHYS_BASE, |
| 229 | MAPIO(ixp2000_map_io) | 229 | .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, |
| 230 | INITIRQ(ixp2000_init_irq) | 230 | .boot_params = 0x00000100, |
| 231 | .map_io = ixp2000_map_io, | ||
| 232 | .init_irq = ixp2000_init_irq, | ||
| 231 | .timer = &enp2611_timer, | 233 | .timer = &enp2611_timer, |
| 232 | INIT_MACHINE(enp2611_init_machine) | 234 | .init_machine = enp2611_init_machine, |
| 233 | MACHINE_END | 235 | MACHINE_END |
| 234 | 236 | ||
| 235 | 237 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c index df3ff26c8cdd..fd280a93637e 100644 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ b/arch/arm/mach-ixp2000/ixdp2400.c | |||
| @@ -168,12 +168,14 @@ void ixdp2400_init_irq(void) | |||
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform") | 170 | MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform") |
| 171 | MAINTAINER("MontaVista Software, Inc.") | 171 | /* Maintainer: MontaVista Software, Inc. */ |
| 172 | BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) | 172 | .phys_ram = 0x00000000, |
| 173 | BOOT_PARAMS(0x00000100) | 173 | .phys_io = IXP2000_UART_PHYS_BASE, |
| 174 | MAPIO(ixdp2x00_map_io) | 174 | .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, |
| 175 | INITIRQ(ixdp2400_init_irq) | 175 | .boot_params = 0x00000100, |
| 176 | .map_io = ixdp2x00_map_io, | ||
| 177 | .init_irq = ixdp2400_init_irq, | ||
| 176 | .timer = &ixdp2400_timer, | 178 | .timer = &ixdp2400_timer, |
| 177 | INIT_MACHINE(ixdp2x00_init_machine) | 179 | .init_machine = ixdp2x00_init_machine, |
| 178 | MACHINE_END | 180 | MACHINE_END |
| 179 | 181 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c index 468a4bbfb724..f9073aa28615 100644 --- a/arch/arm/mach-ixp2000/ixdp2800.c +++ b/arch/arm/mach-ixp2000/ixdp2800.c | |||
| @@ -284,12 +284,14 @@ void ixdp2800_init_irq(void) | |||
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform") | 286 | MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform") |
| 287 | MAINTAINER("MontaVista Software, Inc.") | 287 | /* Maintainer: MontaVista Software, Inc. */ |
| 288 | BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) | 288 | .phys_ram = 0x00000000, |
| 289 | BOOT_PARAMS(0x00000100) | 289 | .phys_io = IXP2000_UART_PHYS_BASE, |
| 290 | MAPIO(ixdp2x00_map_io) | 290 | .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, |
| 291 | INITIRQ(ixdp2800_init_irq) | 291 | .boot_params = 0x00000100, |
| 292 | .map_io = ixdp2x00_map_io, | ||
| 293 | .init_irq = ixdp2800_init_irq, | ||
| 292 | .timer = &ixdp2800_timer, | 294 | .timer = &ixdp2800_timer, |
| 293 | INIT_MACHINE(ixdp2x00_init_machine) | 295 | .init_machine = ixdp2x00_init_machine, |
| 294 | MACHINE_END | 296 | MACHINE_END |
| 295 | 297 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index e94dace3d412..c73588743ee1 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
| @@ -375,25 +375,29 @@ static void __init ixdp2x01_init_machine(void) | |||
| 375 | 375 | ||
| 376 | #ifdef CONFIG_ARCH_IXDP2401 | 376 | #ifdef CONFIG_ARCH_IXDP2401 |
| 377 | MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform") | 377 | MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform") |
| 378 | MAINTAINER("MontaVista Software, Inc.") | 378 | /* Maintainer: MontaVista Software, Inc. */ |
| 379 | BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) | 379 | .phys_ram = 0x00000000, |
| 380 | BOOT_PARAMS(0x00000100) | 380 | .phys_io = IXP2000_UART_PHYS_BASE, |
| 381 | MAPIO(ixdp2x01_map_io) | 381 | .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, |
| 382 | INITIRQ(ixdp2x01_init_irq) | 382 | .boot_params = 0x00000100, |
| 383 | .map_io = ixdp2x01_map_io, | ||
| 384 | .init_irq = ixdp2x01_init_irq, | ||
| 383 | .timer = &ixdp2x01_timer, | 385 | .timer = &ixdp2x01_timer, |
| 384 | INIT_MACHINE(ixdp2x01_init_machine) | 386 | .init_machine = ixdp2x01_init_machine, |
| 385 | MACHINE_END | 387 | MACHINE_END |
| 386 | #endif | 388 | #endif |
| 387 | 389 | ||
| 388 | #ifdef CONFIG_ARCH_IXDP2801 | 390 | #ifdef CONFIG_ARCH_IXDP2801 |
| 389 | MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform") | 391 | MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform") |
| 390 | MAINTAINER("MontaVista Software, Inc.") | 392 | /* Maintainer: MontaVista Software, Inc. */ |
| 391 | BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) | 393 | .phys_ram = 0x00000000, |
| 392 | BOOT_PARAMS(0x00000100) | 394 | .phys_io = IXP2000_UART_PHYS_BASE, |
| 393 | MAPIO(ixdp2x01_map_io) | 395 | .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, |
| 394 | INITIRQ(ixdp2x01_init_irq) | 396 | .boot_params = 0x00000100, |
| 397 | .map_io = ixdp2x01_map_io, | ||
| 398 | .init_irq = ixdp2x01_init_irq, | ||
| 395 | .timer = &ixdp2x01_timer, | 399 | .timer = &ixdp2x01_timer, |
| 396 | INIT_MACHINE(ixdp2x01_init_machine) | 400 | .init_machine = ixdp2x01_init_machine, |
| 397 | MACHINE_END | 401 | MACHINE_END |
| 398 | #endif | 402 | #endif |
| 399 | 403 | ||
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c index 8a05a1227e5f..c6335f51907d 100644 --- a/arch/arm/mach-ixp4xx/coyote-setup.c +++ b/arch/arm/mach-ixp4xx/coyote-setup.c | |||
| @@ -100,14 +100,15 @@ static void __init coyote_init(void) | |||
| 100 | 100 | ||
| 101 | #ifdef CONFIG_ARCH_ADI_COYOTE | 101 | #ifdef CONFIG_ARCH_ADI_COYOTE |
| 102 | MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote") | 102 | MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote") |
| 103 | MAINTAINER("MontaVista Software, Inc.") | 103 | /* Maintainer: MontaVista Software, Inc. */ |
| 104 | BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, | 104 | .phys_ram = PHYS_OFFSET, |
| 105 | IXP4XX_PERIPHERAL_BASE_VIRT) | 105 | .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, |
| 106 | MAPIO(coyote_map_io) | 106 | .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, |
| 107 | INITIRQ(ixp4xx_init_irq) | 107 | .map_io = coyote_map_io, |
| 108 | .init_irq = ixp4xx_init_irq, | ||
| 108 | .timer = &ixp4xx_timer, | 109 | .timer = &ixp4xx_timer, |
| 109 | BOOT_PARAMS(0x0100) | 110 | .boot_params = 0x0100, |
| 110 | INIT_MACHINE(coyote_init) | 111 | .init_machine = coyote_init, |
| 111 | MACHINE_END | 112 | MACHINE_END |
| 112 | #endif | 113 | #endif |
| 113 | 114 | ||
| @@ -117,14 +118,15 @@ MACHINE_END | |||
| 117 | */ | 118 | */ |
| 118 | #ifdef CONFIG_MACH_IXDPG425 | 119 | #ifdef CONFIG_MACH_IXDPG425 |
| 119 | MACHINE_START(IXDPG425, "Intel IXDPG425") | 120 | MACHINE_START(IXDPG425, "Intel IXDPG425") |
| 120 | MAINTAINER("MontaVista Software, Inc.") | 121 | /* Maintainer: MontaVista Software, Inc. */ |
| 121 | BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, | 122 | .phys_ram = PHYS_OFFSET, |
| 122 | IXP4XX_PERIPHERAL_BASE_VIRT) | 123 | .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, |
| 123 | MAPIO(coyote_map_io) | 124 | .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, |
| 124 | INITIRQ(ixp4xx_init_irq) | 125 | .map_io = coyote_map_io, |
| 126 | .init_irq = ixp4xx_init_irq, | ||
| 125 | .timer = &ixp4xx_timer, | 127 | .timer = &ixp4xx_timer, |
| 126 | BOOT_PARAMS(0x0100) | 128 | .boot_params = 0x0100, |
| 127 | INIT_MACHINE(coyote_init) | 129 | .init_machine = coyote_init, |
| 128 | MACHINE_END | 130 | MACHINE_END |
| 129 | #endif | 131 | #endif |
| 130 | 132 | ||
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c index e77c86efd21d..8ba1cd9406e7 100644 --- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c | |||
| @@ -140,14 +140,15 @@ static void __init gtwx5715_init(void) | |||
| 140 | 140 | ||
| 141 | 141 | ||
| 142 | MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)") | 142 | MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)") |
| 143 | MAINTAINER("George Joseph") | 143 | /* Maintainer: George Joseph */ |
| 144 | BOOT_MEM(PHYS_OFFSET, IXP4XX_UART2_BASE_PHYS, | 144 | .phys_ram = PHYS_OFFSET, |
| 145 | IXP4XX_UART2_BASE_VIRT) | 145 | .phys_io = IXP4XX_UART2_BASE_PHYS, |
| 146 | MAPIO(gtwx5715_map_io) | 146 | .io_pg_offst = ((IXP4XX_UART2_BASE_VIRT) >> 18) & 0xfffc, |
| 147 | INITIRQ(ixp4xx_init_irq) | 147 | .map_io = gtwx5715_map_io, |
| 148 | .timer = &ixp4xx_timer, | 148 | .init_irq = ixp4xx_init_irq, |
| 149 | BOOT_PARAMS(0x0100) | 149 | .timer = &ixp4xx_timer, |
| 150 | INIT_MACHINE(gtwx5715_init) | 150 | .boot_params = 0x0100, |
| 151 | .init_machine = gtwx5715_init, | ||
| 151 | MACHINE_END | 152 | MACHINE_END |
| 152 | 153 | ||
| 153 | 154 | ||
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c index 77346c1f676b..f2e9c0ea0501 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c | |||
| @@ -128,36 +128,39 @@ static void __init ixdp425_init(void) | |||
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | MACHINE_START(IXDP425, "Intel IXDP425 Development Platform") | 130 | MACHINE_START(IXDP425, "Intel IXDP425 Development Platform") |
| 131 | MAINTAINER("MontaVista Software, Inc.") | 131 | /* Maintainer: MontaVista Software, Inc. */ |
| 132 | BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, | 132 | .phys_ram = PHYS_OFFSET, |
| 133 | IXP4XX_PERIPHERAL_BASE_VIRT) | 133 | .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, |
| 134 | MAPIO(ixdp425_map_io) | 134 | .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, |
| 135 | INITIRQ(ixp4xx_init_irq) | 135 | .map_io = ixdp425_map_io, |
| 136 | .init_irq = ixp4xx_init_irq, | ||
| 136 | .timer = &ixp4xx_timer, | 137 | .timer = &ixp4xx_timer, |
| 137 | BOOT_PARAMS(0x0100) | 138 | .boot_params = 0x0100, |
| 138 | INIT_MACHINE(ixdp425_init) | 139 | .init_machine = ixdp425_init, |
| 139 | MACHINE_END | 140 | MACHINE_END |
| 140 | 141 | ||
| 141 | MACHINE_START(IXDP465, "Intel IXDP465 Development Platform") | 142 | MACHINE_START(IXDP465, "Intel IXDP465 Development Platform") |
| 142 | MAINTAINER("MontaVista Software, Inc.") | 143 | /* Maintainer: MontaVista Software, Inc. */ |
| 143 | BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, | 144 | .phys_ram = PHYS_OFFSET, |
| 144 | IXP4XX_PERIPHERAL_BASE_VIRT) | 145 | .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, |
| 145 | MAPIO(ixdp425_map_io) | 146 | .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, |
| 146 | INITIRQ(ixp4xx_init_irq) | 147 | .map_io = ixdp425_map_io, |
| 148 | .init_irq = ixp4xx_init_irq, | ||
| 147 | .timer = &ixp4xx_timer, | 149 | .timer = &ixp4xx_timer, |
| 148 | BOOT_PARAMS(0x0100) | 150 | .boot_params = 0x0100, |
| 149 | INIT_MACHINE(ixdp425_init) | 151 | .init_machine = ixdp425_init, |
| 150 | MACHINE_END | 152 | MACHINE_END |
| 151 | 153 | ||
| 152 | MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform") | 154 | MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform") |
| 153 | MAINTAINER("MontaVista Software, Inc.") | 155 | /* Maintainer: MontaVista Software, Inc. */ |
| 154 | BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, | 156 | .phys_ram = PHYS_OFFSET, |
| 155 | IXP4XX_PERIPHERAL_BASE_VIRT) | 157 | .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, |
| 156 | MAPIO(ixdp425_map_io) | 158 | .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, |
| 157 | INITIRQ(ixp4xx_init_irq) | 159 | .map_io = ixdp425_map_io, |
| 160 | .init_irq = ixp4xx_init_irq, | ||
| 158 | .timer = &ixp4xx_timer, | 161 | .timer = &ixp4xx_timer, |
| 159 | BOOT_PARAMS(0x0100) | 162 | .boot_params = 0x0100, |
| 160 | INIT_MACHINE(ixdp425_init) | 163 | .init_machine = ixdp425_init, |
| 161 | MACHINE_END | 164 | MACHINE_END |
| 162 | 165 | ||
| 163 | /* | 166 | /* |
| @@ -168,14 +171,15 @@ MACHINE_END | |||
| 168 | */ | 171 | */ |
| 169 | #ifdef CONFIG_ARCH_AVILA | 172 | #ifdef CONFIG_ARCH_AVILA |
| 170 | MACHINE_START(AVILA, "Gateworks Avila Network Platform") | 173 | MACHINE_START(AVILA, "Gateworks Avila Network Platform") |
| 171 | MAINTAINER("Deepak Saxena <dsaxena@plexity.net>") | 174 | /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */ |
| 172 | BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, | 175 | .phys_ram = PHYS_OFFSET, |
| 173 | IXP4XX_PERIPHERAL_BASE_VIRT) | 176 | .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, |
| 174 | MAPIO(ixdp425_map_io) | 177 | .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, |
| 175 | INITIRQ(ixp4xx_init_irq) | 178 | .map_io = ixdp425_map_io, |
| 179 | .init_irq = ixp4xx_init_irq, | ||
| 176 | .timer = &ixp4xx_timer, | 180 | .timer = &ixp4xx_timer, |
| 177 | BOOT_PARAMS(0x0100) | 181 | .boot_params = 0x0100, |
| 178 | INIT_MACHINE(ixdp425_init) | 182 | .init_machine = ixdp425_init, |
| 179 | MACHINE_END | 183 | MACHINE_END |
| 180 | #endif | 184 | #endif |
| 181 | 185 | ||
diff --git a/arch/arm/mach-l7200/core.c b/arch/arm/mach-l7200/core.c index 606ca95f8217..2a7fee2a7635 100644 --- a/arch/arm/mach-l7200/core.c +++ b/arch/arm/mach-l7200/core.c | |||
| @@ -81,9 +81,11 @@ static void __init l7200_map_io(void) | |||
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | MACHINE_START(L7200, "LinkUp Systems L7200") | 83 | MACHINE_START(L7200, "LinkUp Systems L7200") |
| 84 | MAINTAINER("Steve Hill / Scott McConnell") | 84 | /* Maintainer: Steve Hill / Scott McConnell */ |
| 85 | BOOT_MEM(0xf0000000, 0x80040000, 0xd0000000) | 85 | .phys_ram = 0xf0000000, |
| 86 | MAPIO(l7200_map_io) | 86 | .phys_io = 0x80040000, |
| 87 | INITIRQ(l7200_init_irq) | 87 | .io_pg_offst = ((0xd0000000) >> 18) & 0xfffc, |
| 88 | .map_io = l7200_map_io, | ||
| 89 | .init_irq = l7200_init_irq, | ||
| 88 | MACHINE_END | 90 | MACHINE_END |
| 89 | 91 | ||
diff --git a/arch/arm/mach-lh7a40x/arch-kev7a400.c b/arch/arm/mach-lh7a40x/arch-kev7a400.c index be5d17fe9dcb..cb3dcd3bd00a 100644 --- a/arch/arm/mach-lh7a40x/arch-kev7a400.c +++ b/arch/arm/mach-lh7a40x/arch-kev7a400.c | |||
| @@ -102,10 +102,12 @@ void __init lh7a40x_init_board_irq (void) | |||
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | MACHINE_START (KEV7A400, "Sharp KEV7a400") | 104 | MACHINE_START (KEV7A400, "Sharp KEV7a400") |
| 105 | MAINTAINER ("Marc Singer") | 105 | /* Maintainer: Marc Singer */ |
| 106 | BOOT_MEM (0xc0000000, 0x80000000, io_p2v (0x80000000)) | 106 | .phys_ram = 0xc0000000, |
| 107 | BOOT_PARAMS (0xc0000100) | 107 | .phys_io = 0x80000000, |
| 108 | MAPIO (kev7a400_map_io) | 108 | .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc, |
| 109 | INITIRQ (lh7a400_init_irq) | 109 | .boot_params = 0xc0000100, |
| 110 | .map_io = kev7a400_map_io, | ||
| 111 | .init_irq = lh7a400_init_irq, | ||
| 110 | .timer = &lh7a40x_timer, | 112 | .timer = &lh7a40x_timer, |
| 111 | MACHINE_END | 113 | MACHINE_END |
diff --git a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c index c823447a150f..6eb61a17c63b 100644 --- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c +++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c | |||
| @@ -260,13 +260,15 @@ lpd7a400_map_io(void) | |||
| 260 | #ifdef CONFIG_MACH_LPD7A400 | 260 | #ifdef CONFIG_MACH_LPD7A400 |
| 261 | 261 | ||
| 262 | MACHINE_START (LPD7A400, "Logic Product Development LPD7A400-10") | 262 | MACHINE_START (LPD7A400, "Logic Product Development LPD7A400-10") |
| 263 | MAINTAINER ("Marc Singer") | 263 | /* Maintainer: Marc Singer */ |
| 264 | BOOT_MEM (0xc0000000, 0x80000000, io_p2v (0x80000000)) | 264 | .phys_ram = 0xc0000000, |
| 265 | BOOT_PARAMS (0xc0000100) | 265 | .phys_io = 0x80000000, |
| 266 | MAPIO (lpd7a400_map_io) | 266 | .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc, |
| 267 | INITIRQ (lh7a400_init_irq) | 267 | .boot_params = 0xc0000100, |
| 268 | .map_io = lpd7a400_map_io, | ||
| 269 | .init_irq = lh7a400_init_irq, | ||
| 268 | .timer = &lh7a40x_timer, | 270 | .timer = &lh7a40x_timer, |
| 269 | INIT_MACHINE (lpd7a40x_init) | 271 | .init_machine = lpd7a40x_init, |
| 270 | MACHINE_END | 272 | MACHINE_END |
| 271 | 273 | ||
| 272 | #endif | 274 | #endif |
| @@ -274,13 +276,15 @@ MACHINE_END | |||
| 274 | #ifdef CONFIG_MACH_LPD7A404 | 276 | #ifdef CONFIG_MACH_LPD7A404 |
| 275 | 277 | ||
| 276 | MACHINE_START (LPD7A404, "Logic Product Development LPD7A404-10") | 278 | MACHINE_START (LPD7A404, "Logic Product Development LPD7A404-10") |
| 277 | MAINTAINER ("Marc Singer") | 279 | /* Maintainer: Marc Singer */ |
| 278 | BOOT_MEM (0xc0000000, 0x80000000, io_p2v (0x80000000)) | 280 | .phys_ram = 0xc0000000, |
| 279 | BOOT_PARAMS (0xc0000100) | 281 | .phys_io = 0x80000000, |
| 280 | MAPIO (lpd7a400_map_io) | 282 | .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc, |
| 281 | INITIRQ (lh7a404_init_irq) | 283 | .boot_params = 0xc0000100, |
| 284 | .map_io = lpd7a400_map_io, | ||
| 285 | .init_irq = lh7a404_init_irq, | ||
| 282 | .timer = &lh7a40x_timer, | 286 | .timer = &lh7a40x_timer, |
| 283 | INIT_MACHINE (lpd7a40x_init) | 287 | .init_machine = lpd7a40x_init, |
| 284 | MACHINE_END | 288 | MACHINE_END |
| 285 | 289 | ||
| 286 | #endif | 290 | #endif |
diff --git a/arch/arm/mach-omap/board-generic.c b/arch/arm/mach-omap/board-generic.c index 2102a2cd1013..384bc7cec1db 100644 --- a/arch/arm/mach-omap/board-generic.c +++ b/arch/arm/mach-omap/board-generic.c | |||
| @@ -88,11 +88,13 @@ static void __init omap_generic_map_io(void) | |||
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") | 90 | MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") |
| 91 | MAINTAINER("Tony Lindgren <tony@atomide.com>") | 91 | /* Maintainer: Tony Lindgren <tony@atomide.com> */ |
| 92 | BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) | 92 | .phys_ram = 0x10000000, |
| 93 | BOOT_PARAMS(0x10000100) | 93 | .phys_io = 0xfff00000, |
| 94 | MAPIO(omap_generic_map_io) | 94 | .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, |
| 95 | INITIRQ(omap_generic_init_irq) | 95 | .boot_params = 0x10000100, |
| 96 | INIT_MACHINE(omap_generic_init) | 96 | .map_io = omap_generic_map_io, |
| 97 | .init_irq = omap_generic_init_irq, | ||
| 98 | .init_machine = omap_generic_init, | ||
| 97 | .timer = &omap_timer, | 99 | .timer = &omap_timer, |
| 98 | MACHINE_END | 100 | MACHINE_END |
diff --git a/arch/arm/mach-omap/board-h2.c b/arch/arm/mach-omap/board-h2.c index 1f067830d1fc..f37c76a9b163 100644 --- a/arch/arm/mach-omap/board-h2.c +++ b/arch/arm/mach-omap/board-h2.c | |||
| @@ -177,11 +177,13 @@ static void __init h2_map_io(void) | |||
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | MACHINE_START(OMAP_H2, "TI-H2") | 179 | MACHINE_START(OMAP_H2, "TI-H2") |
| 180 | MAINTAINER("Imre Deak <imre.deak@nokia.com>") | 180 | /* Maintainer: Imre Deak <imre.deak@nokia.com> */ |
| 181 | BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) | 181 | .phys_ram = 0x10000000, |
| 182 | BOOT_PARAMS(0x10000100) | 182 | .phys_io = 0xfff00000, |
| 183 | MAPIO(h2_map_io) | 183 | .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, |
| 184 | INITIRQ(h2_init_irq) | 184 | .boot_params = 0x10000100, |
| 185 | INIT_MACHINE(h2_init) | 185 | .map_io = h2_map_io, |
| 186 | .init_irq = h2_init_irq, | ||
| 187 | .init_machine = h2_init, | ||
| 186 | .timer = &omap_timer, | 188 | .timer = &omap_timer, |
| 187 | MACHINE_END | 189 | MACHINE_END |
diff --git a/arch/arm/mach-omap/board-h3.c b/arch/arm/mach-omap/board-h3.c index 486a5a006c9a..705e48594e9a 100644 --- a/arch/arm/mach-omap/board-h3.c +++ b/arch/arm/mach-omap/board-h3.c | |||
| @@ -195,11 +195,13 @@ static void __init h3_map_io(void) | |||
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") | 197 | MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") |
| 198 | MAINTAINER("Texas Instruments, Inc.") | 198 | /* Maintainer: Texas Instruments, Inc. */ |
| 199 | BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) | 199 | .phys_ram = 0x10000000, |
| 200 | BOOT_PARAMS(0x10000100) | 200 | .phys_io = 0xfff00000, |
| 201 | MAPIO(h3_map_io) | 201 | .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, |
| 202 | INITIRQ(h3_init_irq) | 202 | .boot_params = 0x10000100, |
| 203 | INIT_MACHINE(h3_init) | 203 | .map_io = h3_map_io, |
| 204 | .init_irq = h3_init_irq, | ||
| 205 | .init_machine = h3_init, | ||
| 204 | .timer = &omap_timer, | 206 | .timer = &omap_timer, |
| 205 | MACHINE_END | 207 | MACHINE_END |
diff --git a/arch/arm/mach-omap/board-innovator.c b/arch/arm/mach-omap/board-innovator.c index 57cf4da88d55..523363f18cc0 100644 --- a/arch/arm/mach-omap/board-innovator.c +++ b/arch/arm/mach-omap/board-innovator.c | |||
| @@ -270,11 +270,13 @@ static void __init innovator_map_io(void) | |||
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") | 272 | MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") |
| 273 | MAINTAINER("MontaVista Software, Inc.") | 273 | /* Maintainer: MontaVista Software, Inc. */ |
| 274 | BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) | 274 | .phys_ram = 0x10000000, |
| 275 | BOOT_PARAMS(0x10000100) | 275 | .phys_io = 0xfff00000, |
| 276 | MAPIO(innovator_map_io) | 276 | .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, |
| 277 | INITIRQ(innovator_init_irq) | 277 | .boot_params = 0x10000100, |
| 278 | INIT_MACHINE(innovator_init) | 278 | .map_io = innovator_map_io, |
| 279 | .init_irq = innovator_init_irq, | ||
| 280 | .init_machine = innovator_init, | ||
| 279 | .timer = &omap_timer, | 281 | .timer = &omap_timer, |
| 280 | MACHINE_END | 282 | MACHINE_END |
diff --git a/arch/arm/mach-omap/board-netstar.c b/arch/arm/mach-omap/board-netstar.c index 54acbd215c4b..8c653734d5a3 100644 --- a/arch/arm/mach-omap/board-netstar.c +++ b/arch/arm/mach-omap/board-netstar.c | |||
| @@ -141,11 +141,13 @@ static int __init netstar_late_init(void) | |||
| 141 | postcore_initcall(netstar_late_init); | 141 | postcore_initcall(netstar_late_init); |
| 142 | 142 | ||
| 143 | MACHINE_START(NETSTAR, "NetStar OMAP5910") | 143 | MACHINE_START(NETSTAR, "NetStar OMAP5910") |
| 144 | MAINTAINER("Ladislav Michl <michl@2n.cz>") | 144 | /* Maintainer: Ladislav Michl <michl@2n.cz> */ |
| 145 | BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) | 145 | .phys_ram = 0x10000000, |
| 146 | BOOT_PARAMS(0x10000100) | 146 | .phys_io = 0xfff00000, |
| 147 | MAPIO(netstar_map_io) | 147 | .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, |
| 148 | INITIRQ(netstar_init_irq) | 148 | .boot_params = 0x10000100, |
| 149 | INIT_MACHINE(netstar_init) | 149 | .map_io = netstar_map_io, |
| 150 | .timer = &omap_timer, | 150 | .init_irq = netstar_init_irq, |
| 151 | .init_machine = netstar_init, | ||
| 152 | .timer = &omap_timer, | ||
| 151 | MACHINE_END | 153 | MACHINE_END |
diff --git a/arch/arm/mach-omap/board-osk.c b/arch/arm/mach-omap/board-osk.c index a951fc82459b..cb433436aa08 100644 --- a/arch/arm/mach-omap/board-osk.c +++ b/arch/arm/mach-omap/board-osk.c | |||
| @@ -159,11 +159,13 @@ static void __init osk_map_io(void) | |||
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | MACHINE_START(OMAP_OSK, "TI-OSK") | 161 | MACHINE_START(OMAP_OSK, "TI-OSK") |
| 162 | MAINTAINER("Dirk Behme <dirk.behme@de.bosch.com>") | 162 | /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */ |
| 163 | BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) | 163 | .phys_ram = 0x10000000, |
| 164 | BOOT_PARAMS(0x10000100) | 164 | .phys_io = 0xfff00000, |
| 165 | MAPIO(osk_map_io) | 165 | .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, |
| 166 | INITIRQ(osk_init_irq) | 166 | .boot_params = 0x10000100, |
| 167 | INIT_MACHINE(osk_init) | 167 | .map_io = osk_map_io, |
| 168 | .init_irq = osk_init_irq, | ||
| 169 | .init_machine = osk_init, | ||
| 168 | .timer = &omap_timer, | 170 | .timer = &omap_timer, |
| 169 | MACHINE_END | 171 | MACHINE_END |
diff --git a/arch/arm/mach-omap/board-perseus2.c b/arch/arm/mach-omap/board-perseus2.c index 64515aeb49cf..d5342043d48f 100644 --- a/arch/arm/mach-omap/board-perseus2.c +++ b/arch/arm/mach-omap/board-perseus2.c | |||
| @@ -179,11 +179,13 @@ static void __init omap_perseus2_map_io(void) | |||
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") | 181 | MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") |
| 182 | MAINTAINER("Kevin Hilman <kjh@hilman.org>") | 182 | /* Maintainer: Kevin Hilman <kjh@hilman.org> */ |
| 183 | BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) | 183 | .phys_ram = 0x10000000, |
| 184 | BOOT_PARAMS(0x10000100) | 184 | .phys_io = 0xfff00000, |
| 185 | MAPIO(omap_perseus2_map_io) | 185 | .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, |
| 186 | INITIRQ(omap_perseus2_init_irq) | 186 | .boot_params = 0x10000100, |
| 187 | INIT_MACHINE(omap_perseus2_init) | 187 | .map_io = omap_perseus2_map_io, |
| 188 | .init_irq = omap_perseus2_init_irq, | ||
| 189 | .init_machine = omap_perseus2_init, | ||
| 188 | .timer = &omap_timer, | 190 | .timer = &omap_timer, |
| 189 | MACHINE_END | 191 | MACHINE_END |
diff --git a/arch/arm/mach-omap/board-voiceblue.c b/arch/arm/mach-omap/board-voiceblue.c index f1a5bffac666..6b0c5003d719 100644 --- a/arch/arm/mach-omap/board-voiceblue.c +++ b/arch/arm/mach-omap/board-voiceblue.c | |||
| @@ -246,11 +246,13 @@ EXPORT_SYMBOL(voiceblue_wdt_disable); | |||
| 246 | EXPORT_SYMBOL(voiceblue_wdt_ping); | 246 | EXPORT_SYMBOL(voiceblue_wdt_ping); |
| 247 | 247 | ||
| 248 | MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") | 248 | MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") |
| 249 | MAINTAINER("Ladislav Michl <michl@2n.cz>") | 249 | /* Maintainer: Ladislav Michl <michl@2n.cz> */ |
| 250 | BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) | 250 | .phys_ram = 0x10000000, |
| 251 | BOOT_PARAMS(0x10000100) | 251 | .phys_io = 0xfff00000, |
| 252 | MAPIO(voiceblue_map_io) | 252 | .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, |
| 253 | INITIRQ(voiceblue_init_irq) | 253 | .boot_params = 0x10000100, |
| 254 | INIT_MACHINE(voiceblue_init) | 254 | .map_io = voiceblue_map_io, |
| 255 | .timer = &omap_timer, | 255 | .init_irq = voiceblue_init_irq, |
| 256 | .init_machine = voiceblue_init, | ||
| 257 | .timer = &omap_timer, | ||
| 256 | MACHINE_END | 258 | MACHINE_END |
diff --git a/arch/arm/mach-omap/usb.c b/arch/arm/mach-omap/usb.c index 7f37857b1a28..fd483ff9f8fe 100644 --- a/arch/arm/mach-omap/usb.c +++ b/arch/arm/mach-omap/usb.c | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | 41 | ||
| 42 | /* These routines should handle the standard chip-specific modes | 42 | /* These routines should handle the standard chip-specific modes |
| 43 | * for usb0/1/2 ports, covering basic mux and transceiver setup. | 43 | * for usb0/1/2 ports, covering basic mux and transceiver setup. |
| 44 | * Call omap_usb_init() once, from INIT_MACHINE(). | ||
| 45 | * | 44 | * |
| 46 | * Some board-*.c files will need to set up additional mux options, | 45 | * Some board-*.c files will need to set up additional mux options, |
| 47 | * like for suspend handling, vbus sensing, GPIOs, and the D+ pullup. | 46 | * like for suspend handling, vbus sensing, GPIOs, and the D+ pullup. |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index c4e6d2523585..efc2f657184e 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
| @@ -24,3 +24,7 @@ obj-$(CONFIG_LEDS) += $(led-y) | |||
| 24 | 24 | ||
| 25 | # Misc features | 25 | # Misc features |
| 26 | obj-$(CONFIG_PM) += pm.o sleep.o | 26 | obj-$(CONFIG_PM) += pm.o sleep.o |
| 27 | |||
| 28 | ifeq ($(CONFIG_PXA27x),y) | ||
| 29 | obj-$(CONFIG_PM) += standby.o | ||
| 30 | endif | ||
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index f691cf77d390..86b862f56e7e 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
| @@ -287,34 +287,40 @@ static void __init corgi_map_io(void) | |||
| 287 | 287 | ||
| 288 | #ifdef CONFIG_MACH_CORGI | 288 | #ifdef CONFIG_MACH_CORGI |
| 289 | MACHINE_START(CORGI, "SHARP Corgi") | 289 | MACHINE_START(CORGI, "SHARP Corgi") |
| 290 | BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) | 290 | .phys_ram = 0xa0000000, |
| 291 | FIXUP(fixup_corgi) | 291 | .phys_io = 0x40000000, |
| 292 | MAPIO(corgi_map_io) | 292 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 293 | INITIRQ(corgi_init_irq) | 293 | .fixup = fixup_corgi, |
| 294 | .init_machine = corgi_init, | 294 | .map_io = corgi_map_io, |
| 295 | .timer = &pxa_timer, | 295 | .init_irq = corgi_init_irq, |
| 296 | .init_machine = corgi_init, | ||
| 297 | .timer = &pxa_timer, | ||
| 296 | MACHINE_END | 298 | MACHINE_END |
| 297 | #endif | 299 | #endif |
| 298 | 300 | ||
| 299 | #ifdef CONFIG_MACH_SHEPHERD | 301 | #ifdef CONFIG_MACH_SHEPHERD |
| 300 | MACHINE_START(SHEPHERD, "SHARP Shepherd") | 302 | MACHINE_START(SHEPHERD, "SHARP Shepherd") |
| 301 | BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) | 303 | .phys_ram = 0xa0000000, |
| 302 | FIXUP(fixup_corgi) | 304 | .phys_io = 0x40000000, |
| 303 | MAPIO(corgi_map_io) | 305 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 304 | INITIRQ(corgi_init_irq) | 306 | .fixup = fixup_corgi, |
| 305 | .init_machine = corgi_init, | 307 | .map_io = corgi_map_io, |
| 306 | .timer = &pxa_timer, | 308 | .init_irq = corgi_init_irq, |
| 309 | .init_machine = corgi_init, | ||
| 310 | .timer = &pxa_timer, | ||
| 307 | MACHINE_END | 311 | MACHINE_END |
| 308 | #endif | 312 | #endif |
| 309 | 313 | ||
| 310 | #ifdef CONFIG_MACH_HUSKY | 314 | #ifdef CONFIG_MACH_HUSKY |
| 311 | MACHINE_START(HUSKY, "SHARP Husky") | 315 | MACHINE_START(HUSKY, "SHARP Husky") |
| 312 | BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) | 316 | .phys_ram = 0xa0000000, |
| 313 | FIXUP(fixup_corgi) | 317 | .phys_io = 0x40000000, |
| 314 | MAPIO(corgi_map_io) | 318 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 315 | INITIRQ(corgi_init_irq) | 319 | .fixup = fixup_corgi, |
| 316 | .init_machine = corgi_init, | 320 | .map_io = corgi_map_io, |
| 317 | .timer = &pxa_timer, | 321 | .init_irq = corgi_init_irq, |
| 322 | .init_machine = corgi_init, | ||
| 323 | .timer = &pxa_timer, | ||
| 318 | MACHINE_END | 324 | MACHINE_END |
| 319 | #endif | 325 | #endif |
| 320 | 326 | ||
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index c5a66bf4d3d5..386e107b53cc 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c | |||
| @@ -181,10 +181,12 @@ static void __init idp_map_io(void) | |||
| 181 | 181 | ||
| 182 | 182 | ||
| 183 | MACHINE_START(PXA_IDP, "Vibren PXA255 IDP") | 183 | MACHINE_START(PXA_IDP, "Vibren PXA255 IDP") |
| 184 | MAINTAINER("Vibren Technologies") | 184 | /* Maintainer: Vibren Technologies */ |
| 185 | BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) | 185 | .phys_ram = 0xa0000000, |
| 186 | MAPIO(idp_map_io) | 186 | .phys_io = 0x40000000, |
| 187 | INITIRQ(idp_init_irq) | 187 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 188 | .map_io = idp_map_io, | ||
| 189 | .init_irq = idp_init_irq, | ||
| 188 | .timer = &pxa_timer, | 190 | .timer = &pxa_timer, |
| 189 | INIT_MACHINE(idp_init) | 191 | .init_machine = idp_init, |
| 190 | MACHINE_END | 192 | MACHINE_END |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index f2c9e0d2b24b..6309853b59be 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
| @@ -268,10 +268,12 @@ static void __init lubbock_map_io(void) | |||
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)") | 270 | MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)") |
| 271 | MAINTAINER("MontaVista Software Inc.") | 271 | /* Maintainer: MontaVista Software Inc. */ |
| 272 | BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) | 272 | .phys_ram = 0xa0000000, |
| 273 | MAPIO(lubbock_map_io) | 273 | .phys_io = 0x40000000, |
| 274 | INITIRQ(lubbock_init_irq) | 274 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 275 | .map_io = lubbock_map_io, | ||
| 276 | .init_irq = lubbock_init_irq, | ||
| 275 | .timer = &pxa_timer, | 277 | .timer = &pxa_timer, |
| 276 | INIT_MACHINE(lubbock_init) | 278 | .init_machine = lubbock_init, |
| 277 | MACHINE_END | 279 | MACHINE_END |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 9896afca751f..827b7b5a5be8 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
| @@ -345,10 +345,12 @@ static void __init mainstone_map_io(void) | |||
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") | 347 | MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") |
| 348 | MAINTAINER("MontaVista Software Inc.") | 348 | /* Maintainer: MontaVista Software Inc. */ |
| 349 | BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) | 349 | .phys_ram = 0xa0000000, |
| 350 | MAPIO(mainstone_map_io) | 350 | .phys_io = 0x40000000, |
| 351 | INITIRQ(mainstone_init_irq) | 351 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 352 | .map_io = mainstone_map_io, | ||
| 353 | .init_irq = mainstone_init_irq, | ||
| 352 | .timer = &pxa_timer, | 354 | .timer = &pxa_timer, |
| 353 | INIT_MACHINE(mainstone_init) | 355 | .init_machine = mainstone_init, |
| 354 | MACHINE_END | 356 | MACHINE_END |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index b6c746ea3830..0e4f6fab100a 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
| @@ -180,10 +180,12 @@ static void __init poodle_map_io(void) | |||
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | MACHINE_START(POODLE, "SHARP Poodle") | 182 | MACHINE_START(POODLE, "SHARP Poodle") |
| 183 | BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) | 183 | .phys_ram = 0xa0000000, |
| 184 | FIXUP(fixup_poodle) | 184 | .phys_io = 0x40000000, |
| 185 | MAPIO(poodle_map_io) | 185 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 186 | INITIRQ(pxa_init_irq) | 186 | .fixup = fixup_poodle, |
| 187 | .timer = &pxa_timer, | 187 | .map_io = poodle_map_io, |
| 188 | .init_machine = poodle_init, | 188 | .init_irq = pxa_init_irq, |
| 189 | .timer = &pxa_timer, | ||
| 190 | .init_machine = poodle_init, | ||
| 189 | MACHINE_END | 191 | MACHINE_END |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 893964fb9659..9a791b07118d 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
| @@ -126,6 +126,7 @@ int pxa_cpu_pm_prepare(suspend_state_t state) | |||
| 126 | { | 126 | { |
| 127 | switch (state) { | 127 | switch (state) { |
| 128 | case PM_SUSPEND_MEM: | 128 | case PM_SUSPEND_MEM: |
| 129 | case PM_SUSPEND_STANDBY: | ||
| 129 | return 0; | 130 | return 0; |
| 130 | default: | 131 | default: |
| 131 | return -EINVAL; | 132 | return -EINVAL; |
| @@ -138,7 +139,10 @@ void pxa_cpu_pm_enter(suspend_state_t state) | |||
| 138 | extern void pxa_cpu_suspend(unsigned int); | 139 | extern void pxa_cpu_suspend(unsigned int); |
| 139 | extern void pxa_cpu_resume(void); | 140 | extern void pxa_cpu_resume(void); |
| 140 | 141 | ||
| 141 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER; | 142 | if (state == PM_SUSPEND_STANDBY) |
| 143 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER | CKEN16_LCD |CKEN0_PWM0; | ||
| 144 | else | ||
| 145 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER; | ||
| 142 | 146 | ||
| 143 | /* ensure voltage-change sequencer not initiated, which hangs */ | 147 | /* ensure voltage-change sequencer not initiated, which hangs */ |
| 144 | PCFR &= ~PCFR_FVC; | 148 | PCFR &= ~PCFR_FVC; |
| @@ -147,6 +151,9 @@ void pxa_cpu_pm_enter(suspend_state_t state) | |||
| 147 | PEDR = 0xDF12FE1B; | 151 | PEDR = 0xDF12FE1B; |
| 148 | 152 | ||
| 149 | switch (state) { | 153 | switch (state) { |
| 154 | case PM_SUSPEND_STANDBY: | ||
| 155 | pxa_cpu_standby(); | ||
| 156 | break; | ||
| 150 | case PM_SUSPEND_MEM: | 157 | case PM_SUSPEND_MEM: |
| 151 | /* set resume return address */ | 158 | /* set resume return address */ |
| 152 | PSPR = virt_to_phys(pxa_cpu_resume); | 159 | PSPR = virt_to_phys(pxa_cpu_resume); |
diff --git a/arch/arm/mach-pxa/standby.S b/arch/arm/mach-pxa/standby.S new file mode 100644 index 000000000000..8a3f27b76784 --- /dev/null +++ b/arch/arm/mach-pxa/standby.S | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* | ||
| 2 | * PXA27x standby mode | ||
| 3 | * | ||
| 4 | * Author: David Burrage | ||
| 5 | * | ||
| 6 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
| 7 | * the terms of the GNU General Public License version 2. This program | ||
| 8 | * is licensed "as is" without any warranty of any kind, whether express | ||
| 9 | * or implied. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/config.h> | ||
| 13 | #include <linux/linkage.h> | ||
| 14 | #include <asm/assembler.h> | ||
| 15 | #include <asm/hardware.h> | ||
| 16 | |||
| 17 | #include <asm/arch/pxa-regs.h> | ||
| 18 | |||
| 19 | .text | ||
| 20 | |||
| 21 | ENTRY(pxa_cpu_standby) | ||
| 22 | ldr r0, =PSSR | ||
| 23 | mov r1, #(PSSR_PH | PSSR_STS) | ||
| 24 | mov r2, #2 | ||
| 25 | mov r3, #UNCACHED_PHYS_0 @ Read mem context in. | ||
| 26 | ldr ip, [r3] | ||
| 27 | b 1f | ||
| 28 | |||
| 29 | .align 5 | ||
| 30 | 1: mcr p14, 0, r2, c7, c0, 0 @ put the system into Standby | ||
| 31 | str r1, [r0] @ make sure PSSR_PH/STS are clear | ||
| 32 | mov pc, lr | ||
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c index 437106881436..a10268618f74 100644 --- a/arch/arm/mach-rpc/riscpc.c +++ b/arch/arm/mach-rpc/riscpc.c | |||
| @@ -163,12 +163,14 @@ arch_initcall(rpc_init); | |||
| 163 | extern struct sys_timer ioc_timer; | 163 | extern struct sys_timer ioc_timer; |
| 164 | 164 | ||
| 165 | MACHINE_START(RISCPC, "Acorn-RiscPC") | 165 | MACHINE_START(RISCPC, "Acorn-RiscPC") |
| 166 | MAINTAINER("Russell King") | 166 | /* Maintainer: Russell King */ |
| 167 | BOOT_MEM(0x10000000, 0x03000000, 0xe0000000) | 167 | .phys_ram = 0x10000000, |
| 168 | BOOT_PARAMS(0x10000100) | 168 | .phys_io = 0x03000000, |
| 169 | DISABLE_PARPORT(0) | 169 | .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, |
| 170 | DISABLE_PARPORT(1) | 170 | .boot_params = 0x10000100, |
| 171 | MAPIO(rpc_map_io) | 171 | .reserve_lp0 = 1, |
| 172 | INITIRQ(rpc_init_irq) | 172 | .reserve_lp1 = 1, |
| 173 | .map_io = rpc_map_io, | ||
| 174 | .init_irq = rpc_init_irq, | ||
| 173 | .timer = &ioc_timer, | 175 | .timer = &ioc_timer, |
| 174 | MACHINE_END | 176 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 549bcb1f32c0..ccb6bcefa46c 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
| @@ -407,10 +407,11 @@ void __init bast_map_io(void) | |||
| 407 | 407 | ||
| 408 | 408 | ||
| 409 | MACHINE_START(BAST, "Simtec-BAST") | 409 | MACHINE_START(BAST, "Simtec-BAST") |
| 410 | MAINTAINER("Ben Dooks <ben@simtec.co.uk>") | 410 | /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ |
| 411 | BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) | 411 | .phys_ram = S3C2410_SDRAM_PA, |
| 412 | BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) | 412 | .phys_io = S3C2410_PA_UART, |
| 413 | 413 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | |
| 414 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
| 414 | .map_io = bast_map_io, | 415 | .map_io = bast_map_io, |
| 415 | .init_irq = s3c24xx_init_irq, | 416 | .init_irq = s3c24xx_init_irq, |
| 416 | .timer = &s3c24xx_timer, | 417 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 2924afc068a4..ea4fb1a97a50 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
| @@ -117,10 +117,12 @@ void __init h1940_init_irq(void) | |||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | MACHINE_START(H1940, "IPAQ-H1940") | 119 | MACHINE_START(H1940, "IPAQ-H1940") |
| 120 | MAINTAINER("Ben Dooks <ben@fluff.org>") | 120 | /* Maintainer: Ben Dooks <ben@fluff.org> */ |
| 121 | BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) | 121 | .phys_ram = S3C2410_SDRAM_PA, |
| 122 | BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) | 122 | .phys_io = S3C2410_PA_UART, |
| 123 | MAPIO(h1940_map_io) | 123 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
| 124 | INITIRQ(h1940_init_irq) | 124 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
| 125 | .map_io = h1940_map_io, | ||
| 126 | .init_irq = h1940_init_irq, | ||
| 125 | .timer = &s3c24xx_timer, | 127 | .timer = &s3c24xx_timer, |
| 126 | MACHINE_END | 128 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index bd15998c129b..79044d9bce38 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
| @@ -137,10 +137,11 @@ void __init n30_init(void) | |||
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | MACHINE_START(N30, "Acer-N30") | 139 | MACHINE_START(N30, "Acer-N30") |
| 140 | MAINTAINER("Christer Weinigel <christer@weinigel.se>, Ben Dooks <ben-linux@fluff.org>") | 140 | /* Maintainer: Christer Weinigel <christer@weinigel.se>, Ben Dooks <ben-linux@fluff.org> */ |
| 141 | BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) | 141 | .phys_ram = S3C2410_SDRAM_PA, |
| 142 | BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) | 142 | .phys_io = S3C2410_PA_UART, |
| 143 | 143 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | |
| 144 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
| 144 | .timer = &s3c24xx_timer, | 145 | .timer = &s3c24xx_timer, |
| 145 | .init_machine = n30_init, | 146 | .init_machine = n30_init, |
| 146 | .init_irq = n30_init_irq, | 147 | .init_irq = n30_init_irq, |
diff --git a/arch/arm/mach-s3c2410/mach-nexcoder.c b/arch/arm/mach-s3c2410/mach-nexcoder.c index 70487bf4b71e..d24c242414ca 100644 --- a/arch/arm/mach-s3c2410/mach-nexcoder.c +++ b/arch/arm/mach-s3c2410/mach-nexcoder.c | |||
| @@ -147,9 +147,11 @@ void __init nexcoder_map_io(void) | |||
| 147 | 147 | ||
| 148 | 148 | ||
| 149 | MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") | 149 | MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") |
| 150 | MAINTAINER("Guillaume GOURAT <guillaume.gourat@nexvision.tv>") | 150 | /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */ |
| 151 | BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) | 151 | .phys_ram = S3C2410_SDRAM_PA, |
| 152 | BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) | 152 | .phys_io = S3C2410_PA_UART, |
| 153 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | ||
| 154 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
| 153 | .map_io = nexcoder_map_io, | 155 | .map_io = nexcoder_map_io, |
| 154 | .init_irq = s3c24xx_init_irq, | 156 | .init_irq = s3c24xx_init_irq, |
| 155 | .timer = &s3c24xx_timer, | 157 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c index 67d8ce8fb00f..d901ed492ff5 100644 --- a/arch/arm/mach-s3c2410/mach-otom.c +++ b/arch/arm/mach-s3c2410/mach-otom.c | |||
| @@ -115,9 +115,11 @@ void __init otom11_map_io(void) | |||
| 115 | 115 | ||
| 116 | 116 | ||
| 117 | MACHINE_START(OTOM, "Nex Vision - Otom 1.1") | 117 | MACHINE_START(OTOM, "Nex Vision - Otom 1.1") |
| 118 | MAINTAINER("Guillaume GOURAT <guillaume.gourat@nexvision.tv>") | 118 | /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */ |
| 119 | BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) | 119 | .phys_ram = S3C2410_SDRAM_PA, |
| 120 | BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) | 120 | .phys_io = S3C2410_PA_UART, |
| 121 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | ||
| 122 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
| 121 | .map_io = otom11_map_io, | 123 | .map_io = otom11_map_io, |
| 122 | .init_irq = s3c24xx_init_irq, | 124 | .init_irq = s3c24xx_init_irq, |
| 123 | .timer = &s3c24xx_timer, | 125 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c index f8d3a9784e71..a73d61c1de46 100644 --- a/arch/arm/mach-s3c2410/mach-rx3715.c +++ b/arch/arm/mach-s3c2410/mach-rx3715.c | |||
| @@ -131,11 +131,13 @@ static void __init rx3715_init_machine(void) | |||
| 131 | #endif | 131 | #endif |
| 132 | 132 | ||
| 133 | MACHINE_START(RX3715, "IPAQ-RX3715") | 133 | MACHINE_START(RX3715, "IPAQ-RX3715") |
| 134 | MAINTAINER("Ben Dooks <ben@fluff.org>") | 134 | /* Maintainer: Ben Dooks <ben@fluff.org> */ |
| 135 | BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) | 135 | .phys_ram = S3C2410_SDRAM_PA, |
| 136 | BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) | 136 | .phys_io = S3C2410_PA_UART, |
| 137 | MAPIO(rx3715_map_io) | 137 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
| 138 | INITIRQ(rx3715_init_irq) | 138 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
| 139 | INIT_MACHINE(rx3715_init_machine) | 139 | .map_io = rx3715_map_io, |
| 140 | .init_irq = rx3715_init_irq, | ||
| 141 | .init_machine = rx3715_init_machine, | ||
| 140 | .timer = &s3c24xx_timer, | 142 | .timer = &s3c24xx_timer, |
| 141 | MACHINE_END | 143 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c index c1a4a1420ea0..67e903a700d3 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2410.c +++ b/arch/arm/mach-s3c2410/mach-smdk2410.c | |||
| @@ -112,11 +112,13 @@ void __init smdk2410_init_irq(void) | |||
| 112 | 112 | ||
| 113 | MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch | 113 | MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch |
| 114 | * to SMDK2410 */ | 114 | * to SMDK2410 */ |
| 115 | MAINTAINER("Jonas Dietsche") | 115 | /* Maintainer: Jonas Dietsche */ |
| 116 | BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) | 116 | .phys_ram = S3C2410_SDRAM_PA, |
| 117 | BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) | 117 | .phys_io = S3C2410_PA_UART, |
| 118 | MAPIO(smdk2410_map_io) | 118 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
| 119 | INITIRQ(smdk2410_init_irq) | 119 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
| 120 | .map_io = smdk2410_map_io, | ||
| 121 | .init_irq = smdk2410_init_irq, | ||
| 120 | .timer = &s3c24xx_timer, | 122 | .timer = &s3c24xx_timer, |
| 121 | MACHINE_END | 123 | MACHINE_END |
| 122 | 124 | ||
diff --git a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c index 7857176d9bcb..357522106f68 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2440.c +++ b/arch/arm/mach-s3c2410/mach-smdk2440.c | |||
| @@ -124,9 +124,11 @@ void __init smdk2440_machine_init(void) | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | MACHINE_START(S3C2440, "SMDK2440") | 126 | MACHINE_START(S3C2440, "SMDK2440") |
| 127 | MAINTAINER("Ben Dooks <ben@fluff.org>") | 127 | /* Maintainer: Ben Dooks <ben@fluff.org> */ |
| 128 | BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) | 128 | .phys_ram = S3C2410_SDRAM_PA, |
| 129 | BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) | 129 | .phys_io = S3C2410_PA_UART, |
| 130 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | ||
| 131 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
| 130 | 132 | ||
| 131 | .init_irq = s3c24xx_init_irq, | 133 | .init_irq = s3c24xx_init_irq, |
| 132 | .map_io = smdk2440_map_io, | 134 | .map_io = smdk2440_map_io, |
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index 1db2855e3e56..924e8464c212 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
| @@ -373,9 +373,11 @@ void __init vr1000_map_io(void) | |||
| 373 | 373 | ||
| 374 | 374 | ||
| 375 | MACHINE_START(VR1000, "Thorcom-VR1000") | 375 | MACHINE_START(VR1000, "Thorcom-VR1000") |
| 376 | MAINTAINER("Ben Dooks <ben@simtec.co.uk>") | 376 | /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ |
| 377 | BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) | 377 | .phys_ram = S3C2410_SDRAM_PA, |
| 378 | BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) | 378 | .phys_io = S3C2410_PA_UART, |
| 379 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | ||
| 380 | .boot_params = S3C2410_SDRAM_PA + 0x100, | ||
| 379 | .map_io = vr1000_map_io, | 381 | .map_io = vr1000_map_io, |
| 380 | .init_irq = s3c24xx_init_irq, | 382 | .init_irq = s3c24xx_init_irq, |
| 381 | .timer = &s3c24xx_timer, | 383 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index bedf88fafe08..4d4d303ee3a8 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c | |||
| @@ -431,11 +431,13 @@ static void __init assabet_map_io(void) | |||
| 431 | 431 | ||
| 432 | 432 | ||
| 433 | MACHINE_START(ASSABET, "Intel-Assabet") | 433 | MACHINE_START(ASSABET, "Intel-Assabet") |
| 434 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 434 | .phys_ram = 0xc0000000, |
| 435 | BOOT_PARAMS(0xc0000100) | 435 | .phys_io = 0x80000000, |
| 436 | FIXUP(fixup_assabet) | 436 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 437 | MAPIO(assabet_map_io) | 437 | .boot_params = 0xc0000100, |
| 438 | INITIRQ(sa1100_init_irq) | 438 | .fixup = fixup_assabet, |
| 439 | .map_io = assabet_map_io, | ||
| 440 | .init_irq = sa1100_init_irq, | ||
| 439 | .timer = &sa1100_timer, | 441 | .timer = &sa1100_timer, |
| 440 | .init_machine = assabet_init, | 442 | .init_machine = assabet_init, |
| 441 | MACHINE_END | 443 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c index 6a60b497ab42..b6169cb09196 100644 --- a/arch/arm/mach-sa1100/badge4.c +++ b/arch/arm/mach-sa1100/badge4.c | |||
| @@ -285,9 +285,11 @@ static void __init badge4_map_io(void) | |||
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | MACHINE_START(BADGE4, "Hewlett-Packard Laboratories BadgePAD 4") | 287 | MACHINE_START(BADGE4, "Hewlett-Packard Laboratories BadgePAD 4") |
| 288 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 288 | .phys_ram = 0xc0000000, |
| 289 | BOOT_PARAMS(0xc0000100) | 289 | .phys_io = 0x80000000, |
| 290 | MAPIO(badge4_map_io) | 290 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 291 | INITIRQ(sa1100_init_irq) | 291 | .boot_params = 0xc0000100, |
| 292 | .map_io = badge4_map_io, | ||
| 293 | .init_irq = sa1100_init_irq, | ||
| 292 | .timer = &sa1100_timer, | 294 | .timer = &sa1100_timer, |
| 293 | MACHINE_END | 295 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c index f8edde5e7cbf..0aa918e24c31 100644 --- a/arch/arm/mach-sa1100/cerf.c +++ b/arch/arm/mach-sa1100/cerf.c | |||
| @@ -123,10 +123,12 @@ static void __init cerf_init(void) | |||
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | MACHINE_START(CERF, "Intrinsyc CerfBoard/CerfCube") | 125 | MACHINE_START(CERF, "Intrinsyc CerfBoard/CerfCube") |
| 126 | MAINTAINER("support@intrinsyc.com") | 126 | /* Maintainer: support@intrinsyc.com */ |
| 127 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 127 | .phys_ram = 0xc0000000, |
| 128 | MAPIO(cerf_map_io) | 128 | .phys_io = 0x80000000, |
| 129 | INITIRQ(cerf_init_irq) | 129 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 130 | .map_io = cerf_map_io, | ||
| 131 | .init_irq = cerf_init_irq, | ||
| 130 | .timer = &sa1100_timer, | 132 | .timer = &sa1100_timer, |
| 131 | .init_machine = cerf_init, | 133 | .init_machine = cerf_init, |
| 132 | MACHINE_END | 134 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index 99287890d396..8cb69113a57c 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
| @@ -184,9 +184,11 @@ static void __init collie_map_io(void) | |||
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | MACHINE_START(COLLIE, "Sharp-Collie") | 186 | MACHINE_START(COLLIE, "Sharp-Collie") |
| 187 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 187 | .phys_ram = 0xc0000000, |
| 188 | MAPIO(collie_map_io) | 188 | .phys_io = 0x80000000, |
| 189 | INITIRQ(sa1100_init_irq) | 189 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 190 | .map_io = collie_map_io, | ||
| 191 | .init_irq = sa1100_init_irq, | ||
| 190 | .timer = &sa1100_timer, | 192 | .timer = &sa1100_timer, |
| 191 | .init_machine = collie_init, | 193 | .init_machine = collie_init, |
| 192 | MACHINE_END | 194 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c index 8d2a89a2ea01..04c94ab6c18b 100644 --- a/arch/arm/mach-sa1100/cpu-sa1110.c +++ b/arch/arm/mach-sa1100/cpu-sa1110.c | |||
| @@ -271,8 +271,7 @@ static int sa1110_target(struct cpufreq_policy *policy, | |||
| 271 | */ | 271 | */ |
| 272 | sdram_set_refresh(2); | 272 | sdram_set_refresh(2); |
| 273 | if (!irqs_disabled()) { | 273 | if (!irqs_disabled()) { |
| 274 | set_current_state(TASK_UNINTERRUPTIBLE); | 274 | msleep(20); |
| 275 | schedule_timeout(20 * HZ / 1000); | ||
| 276 | } else { | 275 | } else { |
| 277 | mdelay(20); | 276 | mdelay(20); |
| 278 | } | 277 | } |
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index 65dbe991426d..e7aa2681ca64 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c | |||
| @@ -380,10 +380,12 @@ static void __init h3100_map_io(void) | |||
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | MACHINE_START(H3100, "Compaq iPAQ H3100") | 382 | MACHINE_START(H3100, "Compaq iPAQ H3100") |
| 383 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 383 | .phys_ram = 0xc0000000, |
| 384 | BOOT_PARAMS(0xc0000100) | 384 | .phys_io = 0x80000000, |
| 385 | MAPIO(h3100_map_io) | 385 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 386 | INITIRQ(sa1100_init_irq) | 386 | .boot_params = 0xc0000100, |
| 387 | .map_io = h3100_map_io, | ||
| 388 | .init_irq = sa1100_init_irq, | ||
| 387 | .timer = &sa1100_timer, | 389 | .timer = &sa1100_timer, |
| 388 | .init_machine = h3xxx_mach_init, | 390 | .init_machine = h3xxx_mach_init, |
| 389 | MACHINE_END | 391 | MACHINE_END |
| @@ -496,10 +498,12 @@ static void __init h3600_map_io(void) | |||
| 496 | } | 498 | } |
| 497 | 499 | ||
| 498 | MACHINE_START(H3600, "Compaq iPAQ H3600") | 500 | MACHINE_START(H3600, "Compaq iPAQ H3600") |
| 499 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 501 | .phys_ram = 0xc0000000, |
| 500 | BOOT_PARAMS(0xc0000100) | 502 | .phys_io = 0x80000000, |
| 501 | MAPIO(h3600_map_io) | 503 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 502 | INITIRQ(sa1100_init_irq) | 504 | .boot_params = 0xc0000100, |
| 505 | .map_io = h3600_map_io, | ||
| 506 | .init_irq = sa1100_init_irq, | ||
| 503 | .timer = &sa1100_timer, | 507 | .timer = &sa1100_timer, |
| 504 | .init_machine = h3xxx_mach_init, | 508 | .init_machine = h3xxx_mach_init, |
| 505 | MACHINE_END | 509 | MACHINE_END |
| @@ -881,10 +885,12 @@ static void __init h3800_map_io(void) | |||
| 881 | } | 885 | } |
| 882 | 886 | ||
| 883 | MACHINE_START(H3800, "Compaq iPAQ H3800") | 887 | MACHINE_START(H3800, "Compaq iPAQ H3800") |
| 884 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 888 | .phys_ram = 0xc0000000, |
| 885 | BOOT_PARAMS(0xc0000100) | 889 | .phys_io = 0x80000000, |
| 886 | MAPIO(h3800_map_io) | 890 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 887 | INITIRQ(h3800_init_irq) | 891 | .boot_params = 0xc0000100, |
| 892 | .map_io = h3800_map_io, | ||
| 893 | .init_irq = h3800_init_irq, | ||
| 888 | .timer = &sa1100_timer, | 894 | .timer = &sa1100_timer, |
| 889 | .init_machine = h3xxx_mach_init, | 895 | .init_machine = h3xxx_mach_init, |
| 890 | MACHINE_END | 896 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c index 570841779714..502d65cfe654 100644 --- a/arch/arm/mach-sa1100/hackkit.c +++ b/arch/arm/mach-sa1100/hackkit.c | |||
| @@ -191,10 +191,12 @@ static void __init hackkit_init(void) | |||
| 191 | */ | 191 | */ |
| 192 | 192 | ||
| 193 | MACHINE_START(HACKKIT, "HackKit Cpu Board") | 193 | MACHINE_START(HACKKIT, "HackKit Cpu Board") |
| 194 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 194 | .phys_ram = 0xc0000000, |
| 195 | BOOT_PARAMS(0xc0000100) | 195 | .phys_io = 0x80000000, |
| 196 | MAPIO(hackkit_map_io) | 196 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 197 | INITIRQ(sa1100_init_irq) | 197 | .boot_params = 0xc0000100, |
| 198 | .map_io = hackkit_map_io, | ||
| 199 | .init_irq = sa1100_init_irq, | ||
| 198 | .timer = &sa1100_timer, | 200 | .timer = &sa1100_timer, |
| 199 | .init_machine = hackkit_init, | 201 | .init_machine = hackkit_init, |
| 200 | MACHINE_END | 202 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c index 6be78291a878..eee3cbc5ec4f 100644 --- a/arch/arm/mach-sa1100/jornada720.c +++ b/arch/arm/mach-sa1100/jornada720.c | |||
| @@ -97,9 +97,11 @@ static void __init jornada720_map_io(void) | |||
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | MACHINE_START(JORNADA720, "HP Jornada 720") | 99 | MACHINE_START(JORNADA720, "HP Jornada 720") |
| 100 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 100 | .phys_ram = 0xc0000000, |
| 101 | BOOT_PARAMS(0xc0000100) | 101 | .phys_io = 0x80000000, |
| 102 | MAPIO(jornada720_map_io) | 102 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 103 | INITIRQ(sa1100_init_irq) | 103 | .boot_params = 0xc0000100, |
| 104 | .map_io = jornada720_map_io, | ||
| 105 | .init_irq = sa1100_init_irq, | ||
| 104 | .timer = &sa1100_timer, | 106 | .timer = &sa1100_timer, |
| 105 | MACHINE_END | 107 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c index 51c08ccfb8db..870b488aeda4 100644 --- a/arch/arm/mach-sa1100/lart.c +++ b/arch/arm/mach-sa1100/lart.c | |||
| @@ -41,9 +41,11 @@ static void __init lart_map_io(void) | |||
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | MACHINE_START(LART, "LART") | 43 | MACHINE_START(LART, "LART") |
| 44 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 44 | .phys_ram = 0xc0000000, |
| 45 | BOOT_PARAMS(0xc0000100) | 45 | .phys_io = 0x80000000, |
| 46 | MAPIO(lart_map_io) | 46 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 47 | INITIRQ(sa1100_init_irq) | 47 | .boot_params = 0xc0000100, |
| 48 | .map_io = lart_map_io, | ||
| 49 | .init_irq = sa1100_init_irq, | ||
| 48 | .timer = &sa1100_timer, | 50 | .timer = &sa1100_timer, |
| 49 | MACHINE_END | 51 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c index 5606bd71b024..e17b58fb9c9c 100644 --- a/arch/arm/mach-sa1100/pleb.c +++ b/arch/arm/mach-sa1100/pleb.c | |||
| @@ -146,9 +146,11 @@ static void __init pleb_map_io(void) | |||
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | MACHINE_START(PLEB, "PLEB") | 148 | MACHINE_START(PLEB, "PLEB") |
| 149 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 149 | .phys_ram = 0xc0000000, |
| 150 | MAPIO(pleb_map_io) | 150 | .phys_io = 0x80000000, |
| 151 | INITIRQ(sa1100_init_irq) | 151 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 152 | .map_io = pleb_map_io, | ||
| 153 | .init_irq = sa1100_init_irq, | ||
| 152 | .timer = &sa1100_timer, | 154 | .timer = &sa1100_timer, |
| 153 | .init_machine = pleb_init, | 155 | .init_machine = pleb_init, |
| 154 | MACHINE_END | 156 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c index edddd559be02..43a00359fcdd 100644 --- a/arch/arm/mach-sa1100/shannon.c +++ b/arch/arm/mach-sa1100/shannon.c | |||
| @@ -76,10 +76,12 @@ static void __init shannon_map_io(void) | |||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | MACHINE_START(SHANNON, "Shannon (AKA: Tuxscreen)") | 78 | MACHINE_START(SHANNON, "Shannon (AKA: Tuxscreen)") |
| 79 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 79 | .phys_ram = 0xc0000000, |
| 80 | BOOT_PARAMS(0xc0000100) | 80 | .phys_io = 0x80000000, |
| 81 | MAPIO(shannon_map_io) | 81 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 82 | INITIRQ(sa1100_init_irq) | 82 | .boot_params = 0xc0000100, |
| 83 | .map_io = shannon_map_io, | ||
| 84 | .init_irq = sa1100_init_irq, | ||
| 83 | .timer = &sa1100_timer, | 85 | .timer = &sa1100_timer, |
| 84 | .init_machine = shannon_init, | 86 | .init_machine = shannon_init, |
| 85 | MACHINE_END | 87 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index 8d113d629867..77978586b126 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c | |||
| @@ -215,10 +215,12 @@ arch_initcall(simpad_init); | |||
| 215 | 215 | ||
| 216 | 216 | ||
| 217 | MACHINE_START(SIMPAD, "Simpad") | 217 | MACHINE_START(SIMPAD, "Simpad") |
| 218 | MAINTAINER("Holger Freyther") | 218 | /* Maintainer: Holger Freyther */ |
| 219 | BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) | 219 | .phys_ram = 0xc0000000, |
| 220 | BOOT_PARAMS(0xc0000100) | 220 | .phys_io = 0x80000000, |
| 221 | MAPIO(simpad_map_io) | 221 | .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, |
| 222 | INITIRQ(sa1100_init_irq) | 222 | .boot_params = 0xc0000100, |
| 223 | .map_io = simpad_map_io, | ||
| 224 | .init_irq = sa1100_init_irq, | ||
| 223 | .timer = &sa1100_timer, | 225 | .timer = &sa1100_timer, |
| 224 | MACHINE_END | 226 | MACHINE_END |
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index aa0e2f6e02f6..726445895b5c 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c | |||
| @@ -105,10 +105,12 @@ static struct sys_timer shark_timer = { | |||
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | MACHINE_START(SHARK, "Shark") | 107 | MACHINE_START(SHARK, "Shark") |
| 108 | MAINTAINER("Alexander Schulz") | 108 | /* Maintainer: Alexander Schulz */ |
| 109 | BOOT_MEM(0x08000000, 0x40000000, 0xe0000000) | 109 | .phys_ram = 0x08000000, |
| 110 | BOOT_PARAMS(0x08003000) | 110 | .phys_io = 0x40000000, |
| 111 | MAPIO(shark_map_io) | 111 | .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, |
| 112 | INITIRQ(shark_init_irq) | 112 | .boot_params = 0x08003000, |
| 113 | .map_io = shark_map_io, | ||
| 114 | .init_irq = shark_init_irq, | ||
| 113 | .timer = &shark_timer, | 115 | .timer = &shark_timer, |
| 114 | MACHINE_END | 116 | MACHINE_END |
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c index d332084586cf..8b0b3bef24ae 100644 --- a/arch/arm/mach-versatile/versatile_ab.c +++ b/arch/arm/mach-versatile/versatile_ab.c | |||
| @@ -35,11 +35,13 @@ | |||
| 35 | #include "core.h" | 35 | #include "core.h" |
| 36 | 36 | ||
| 37 | MACHINE_START(VERSATILE_AB, "ARM-Versatile AB") | 37 | MACHINE_START(VERSATILE_AB, "ARM-Versatile AB") |
| 38 | MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") | 38 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 39 | BOOT_MEM(0x00000000, 0x101f1000, 0xf11f1000) | 39 | .phys_ram = 0x00000000, |
| 40 | BOOT_PARAMS(0x00000100) | 40 | .phys_io = 0x101f1000, |
| 41 | MAPIO(versatile_map_io) | 41 | .io_pg_offst = ((0xf11f1000) >> 18) & 0xfffc, |
| 42 | INITIRQ(versatile_init_irq) | 42 | .boot_params = 0x00000100, |
| 43 | .map_io = versatile_map_io, | ||
| 44 | .init_irq = versatile_init_irq, | ||
| 43 | .timer = &versatile_timer, | 45 | .timer = &versatile_timer, |
| 44 | INIT_MACHINE(versatile_init) | 46 | .init_machine = versatile_init, |
| 45 | MACHINE_END | 47 | MACHINE_END |
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c index 2702099a68f3..7c3078c38916 100644 --- a/arch/arm/mach-versatile/versatile_pb.c +++ b/arch/arm/mach-versatile/versatile_pb.c | |||
| @@ -99,11 +99,13 @@ static int __init versatile_pb_init(void) | |||
| 99 | arch_initcall(versatile_pb_init); | 99 | arch_initcall(versatile_pb_init); |
| 100 | 100 | ||
| 101 | MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") | 101 | MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") |
| 102 | MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") | 102 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 103 | BOOT_MEM(0x00000000, 0x101f1000, 0xf11f1000) | 103 | .phys_ram = 0x00000000, |
| 104 | BOOT_PARAMS(0x00000100) | 104 | .phys_io = 0x101f1000, |
| 105 | MAPIO(versatile_map_io) | 105 | .io_pg_offst = ((0xf11f1000) >> 18) & 0xfffc, |
| 106 | INITIRQ(versatile_init_irq) | 106 | .boot_params = 0x00000100, |
| 107 | .map_io = versatile_map_io, | ||
| 108 | .init_irq = versatile_init_irq, | ||
| 107 | .timer = &versatile_timer, | 109 | .timer = &versatile_timer, |
| 108 | INIT_MACHINE(versatile_init) | 110 | .init_machine = versatile_init, |
| 109 | MACHINE_END | 111 | MACHINE_END |
diff --git a/arch/arm/mm/blockops.c b/arch/arm/mm/blockops.c index 806c6eeb1b0c..4f5ee2d08996 100644 --- a/arch/arm/mm/blockops.c +++ b/arch/arm/mm/blockops.c | |||
| @@ -25,13 +25,14 @@ blk_flush_kern_dcache_page(void *kaddr) | |||
| 25 | { | 25 | { |
| 26 | asm( | 26 | asm( |
| 27 | "add r1, r0, %0 \n\ | 27 | "add r1, r0, %0 \n\ |
| 28 | sub r1, r1, %1 \n\ | ||
| 28 | 1: .word 0xec401f0e @ mcrr p15, 0, r0, r1, c14, 0 @ blocking \n\ | 29 | 1: .word 0xec401f0e @ mcrr p15, 0, r0, r1, c14, 0 @ blocking \n\ |
| 29 | mov r0, #0 \n\ | 30 | mov r0, #0 \n\ |
| 30 | mcr p15, 0, r0, c7, c5, 0 \n\ | 31 | mcr p15, 0, r0, c7, c5, 0 \n\ |
| 31 | mcr p15, 0, r0, c7, c10, 4 \n\ | 32 | mcr p15, 0, r0, c7, c10, 4 \n\ |
| 32 | mov pc, lr" | 33 | mov pc, lr" |
| 33 | : | 34 | : |
| 34 | : "I" (PAGE_SIZE)); | 35 | : "I" (PAGE_SIZE), "I" (L1_CACHE_BYTES)); |
| 35 | } | 36 | } |
| 36 | 37 | ||
| 37 | /* | 38 | /* |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index e25b4fd8412c..65bfe84b6d67 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
| @@ -372,49 +372,50 @@ do_bad(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
| 372 | static struct fsr_info { | 372 | static struct fsr_info { |
| 373 | int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); | 373 | int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); |
| 374 | int sig; | 374 | int sig; |
| 375 | int code; | ||
| 375 | const char *name; | 376 | const char *name; |
| 376 | } fsr_info[] = { | 377 | } fsr_info[] = { |
| 377 | /* | 378 | /* |
| 378 | * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 | 379 | * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 |
| 379 | * defines these to be "precise" aborts. | 380 | * defines these to be "precise" aborts. |
| 380 | */ | 381 | */ |
| 381 | { do_bad, SIGSEGV, "vector exception" }, | 382 | { do_bad, SIGSEGV, 0, "vector exception" }, |
| 382 | { do_bad, SIGILL, "alignment exception" }, | 383 | { do_bad, SIGILL, BUS_ADRALN, "alignment exception" }, |
| 383 | { do_bad, SIGKILL, "terminal exception" }, | 384 | { do_bad, SIGKILL, 0, "terminal exception" }, |
| 384 | { do_bad, SIGILL, "alignment exception" }, | 385 | { do_bad, SIGILL, BUS_ADRALN, "alignment exception" }, |
| 385 | { do_bad, SIGBUS, "external abort on linefetch" }, | 386 | { do_bad, SIGBUS, 0, "external abort on linefetch" }, |
| 386 | { do_translation_fault, SIGSEGV, "section translation fault" }, | 387 | { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, |
| 387 | { do_bad, SIGBUS, "external abort on linefetch" }, | 388 | { do_bad, SIGBUS, 0, "external abort on linefetch" }, |
| 388 | { do_page_fault, SIGSEGV, "page translation fault" }, | 389 | { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, |
| 389 | { do_bad, SIGBUS, "external abort on non-linefetch" }, | 390 | { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, |
| 390 | { do_bad, SIGSEGV, "section domain fault" }, | 391 | { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, |
| 391 | { do_bad, SIGBUS, "external abort on non-linefetch" }, | 392 | { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, |
| 392 | { do_bad, SIGSEGV, "page domain fault" }, | 393 | { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, |
| 393 | { do_bad, SIGBUS, "external abort on translation" }, | 394 | { do_bad, SIGBUS, 0, "external abort on translation" }, |
| 394 | { do_sect_fault, SIGSEGV, "section permission fault" }, | 395 | { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, |
| 395 | { do_bad, SIGBUS, "external abort on translation" }, | 396 | { do_bad, SIGBUS, 0, "external abort on translation" }, |
| 396 | { do_page_fault, SIGSEGV, "page permission fault" }, | 397 | { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, |
| 397 | /* | 398 | /* |
| 398 | * The following are "imprecise" aborts, which are signalled by bit | 399 | * The following are "imprecise" aborts, which are signalled by bit |
| 399 | * 10 of the FSR, and may not be recoverable. These are only | 400 | * 10 of the FSR, and may not be recoverable. These are only |
| 400 | * supported if the CPU abort handler supports bit 10. | 401 | * supported if the CPU abort handler supports bit 10. |
| 401 | */ | 402 | */ |
| 402 | { do_bad, SIGBUS, "unknown 16" }, | 403 | { do_bad, SIGBUS, 0, "unknown 16" }, |
| 403 | { do_bad, SIGBUS, "unknown 17" }, | 404 | { do_bad, SIGBUS, 0, "unknown 17" }, |
| 404 | { do_bad, SIGBUS, "unknown 18" }, | 405 | { do_bad, SIGBUS, 0, "unknown 18" }, |
| 405 | { do_bad, SIGBUS, "unknown 19" }, | 406 | { do_bad, SIGBUS, 0, "unknown 19" }, |
| 406 | { do_bad, SIGBUS, "lock abort" }, /* xscale */ | 407 | { do_bad, SIGBUS, 0, "lock abort" }, /* xscale */ |
| 407 | { do_bad, SIGBUS, "unknown 21" }, | 408 | { do_bad, SIGBUS, 0, "unknown 21" }, |
| 408 | { do_bad, SIGBUS, "imprecise external abort" }, /* xscale */ | 409 | { do_bad, SIGBUS, BUS_OBJERR, "imprecise external abort" }, /* xscale */ |
| 409 | { do_bad, SIGBUS, "unknown 23" }, | 410 | { do_bad, SIGBUS, 0, "unknown 23" }, |
| 410 | { do_bad, SIGBUS, "dcache parity error" }, /* xscale */ | 411 | { do_bad, SIGBUS, 0, "dcache parity error" }, /* xscale */ |
| 411 | { do_bad, SIGBUS, "unknown 25" }, | 412 | { do_bad, SIGBUS, 0, "unknown 25" }, |
| 412 | { do_bad, SIGBUS, "unknown 26" }, | 413 | { do_bad, SIGBUS, 0, "unknown 26" }, |
| 413 | { do_bad, SIGBUS, "unknown 27" }, | 414 | { do_bad, SIGBUS, 0, "unknown 27" }, |
| 414 | { do_bad, SIGBUS, "unknown 28" }, | 415 | { do_bad, SIGBUS, 0, "unknown 28" }, |
| 415 | { do_bad, SIGBUS, "unknown 29" }, | 416 | { do_bad, SIGBUS, 0, "unknown 29" }, |
| 416 | { do_bad, SIGBUS, "unknown 30" }, | 417 | { do_bad, SIGBUS, 0, "unknown 30" }, |
| 417 | { do_bad, SIGBUS, "unknown 31" } | 418 | { do_bad, SIGBUS, 0, "unknown 31" } |
| 418 | }; | 419 | }; |
| 419 | 420 | ||
| 420 | void __init | 421 | void __init |
| @@ -435,15 +436,19 @@ asmlinkage void | |||
| 435 | do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | 436 | do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) |
| 436 | { | 437 | { |
| 437 | const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6); | 438 | const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6); |
| 439 | struct siginfo info; | ||
| 438 | 440 | ||
| 439 | if (!inf->fn(addr, fsr, regs)) | 441 | if (!inf->fn(addr, fsr, regs)) |
| 440 | return; | 442 | return; |
| 441 | 443 | ||
| 442 | printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", | 444 | printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", |
| 443 | inf->name, fsr, addr); | 445 | inf->name, fsr, addr); |
| 444 | force_sig(inf->sig, current); | 446 | |
| 445 | show_pte(current->mm, addr); | 447 | info.si_signo = inf->sig; |
| 446 | die_if_kernel("Oops", regs, 0); | 448 | info.si_errno = 0; |
| 449 | info.si_code = inf->code; | ||
| 450 | info.si_addr = (void __user *)addr; | ||
| 451 | notify_die("", regs, &info, fsr, 0); | ||
| 447 | } | 452 | } |
| 448 | 453 | ||
| 449 | asmlinkage void | 454 | asmlinkage void |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 1f325231b9e4..5c0ae5260d1c 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
| @@ -445,14 +445,14 @@ __arm1020_setup: | |||
| 445 | /* | 445 | /* |
| 446 | * R | 446 | * R |
| 447 | * .RVI ZFRS BLDP WCAM | 447 | * .RVI ZFRS BLDP WCAM |
| 448 | * .0.1 1001 ..11 0101 /* FIXME: why no V bit? */ | 448 | * .011 1001 ..11 0101 |
| 449 | */ | 449 | */ |
| 450 | .type arm1020_cr1_clear, #object | 450 | .type arm1020_cr1_clear, #object |
| 451 | .type arm1020_cr1_set, #object | 451 | .type arm1020_cr1_set, #object |
| 452 | arm1020_cr1_clear: | 452 | arm1020_cr1_clear: |
| 453 | .word 0x593f | 453 | .word 0x593f |
| 454 | arm1020_cr1_set: | 454 | arm1020_cr1_set: |
| 455 | .word 0x1935 | 455 | .word 0x3935 |
| 456 | 456 | ||
| 457 | __INITDATA | 457 | __INITDATA |
| 458 | 458 | ||
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index 142a2c2d6f0b..d69389c4d4ba 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
| @@ -427,14 +427,14 @@ __arm1020e_setup: | |||
| 427 | /* | 427 | /* |
| 428 | * R | 428 | * R |
| 429 | * .RVI ZFRS BLDP WCAM | 429 | * .RVI ZFRS BLDP WCAM |
| 430 | * .0.1 1001 ..11 0101 /* FIXME: why no V bit? */ | 430 | * .011 1001 ..11 0101 |
| 431 | */ | 431 | */ |
| 432 | .type arm1020e_cr1_clear, #object | 432 | .type arm1020e_cr1_clear, #object |
| 433 | .type arm1020e_cr1_set, #object | 433 | .type arm1020e_cr1_set, #object |
| 434 | arm1020e_cr1_clear: | 434 | arm1020e_cr1_clear: |
| 435 | .word 0x5f3f | 435 | .word 0x5f3f |
| 436 | arm1020e_cr1_set: | 436 | arm1020e_cr1_set: |
| 437 | .word 0x1935 | 437 | .word 0x3935 |
| 438 | 438 | ||
| 439 | __INITDATA | 439 | __INITDATA |
| 440 | 440 | ||
diff --git a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c index 1a49adb1f4a6..e86ea486c311 100644 --- a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c | |||
| @@ -190,7 +190,7 @@ static __init struct pci_dev *gx_detect_chipset(void) | |||
| 190 | 190 | ||
| 191 | /* detect which companion chip is used */ | 191 | /* detect which companion chip is used */ |
| 192 | while ((gx_pci = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, gx_pci)) != NULL) { | 192 | while ((gx_pci = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, gx_pci)) != NULL) { |
| 193 | if ((pci_match_device (gx_chipset_tbl, gx_pci)) != NULL) { | 193 | if ((pci_match_id(gx_chipset_tbl, gx_pci)) != NULL) { |
| 194 | return gx_pci; | 194 | return gx_pci; |
| 195 | } | 195 | } |
| 196 | } | 196 | } |
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index fc8b17521761..a6d8c45961d3 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
| @@ -537,7 +537,7 @@ static struct kprobe trampoline_p = { | |||
| 537 | .pre_handler = trampoline_probe_handler | 537 | .pre_handler = trampoline_probe_handler |
| 538 | }; | 538 | }; |
| 539 | 539 | ||
| 540 | int __init arch_init(void) | 540 | int __init arch_init_kprobes(void) |
| 541 | { | 541 | { |
| 542 | return register_kprobe(&trampoline_p); | 542 | return register_kprobe(&trampoline_p); |
| 543 | } | 543 | } |
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c index 87325263cd4f..70bcd53451f6 100644 --- a/arch/i386/pci/common.c +++ b/arch/i386/pci/common.c | |||
| @@ -165,6 +165,7 @@ static int __init pcibios_init(void) | |||
| 165 | if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT)) | 165 | if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT)) |
| 166 | pcibios_sort(); | 166 | pcibios_sort(); |
| 167 | #endif | 167 | #endif |
| 168 | pci_assign_unassigned_resources(); | ||
| 168 | return 0; | 169 | return 0; |
| 169 | } | 170 | } |
| 170 | 171 | ||
diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c index c205ea7e233b..93a364c82150 100644 --- a/arch/i386/pci/i386.c +++ b/arch/i386/pci/i386.c | |||
| @@ -106,11 +106,16 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) | |||
| 106 | if ((dev = bus->self)) { | 106 | if ((dev = bus->self)) { |
| 107 | for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) { | 107 | for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) { |
| 108 | r = &dev->resource[idx]; | 108 | r = &dev->resource[idx]; |
| 109 | if (!r->start) | 109 | if (!r->flags) |
| 110 | continue; | 110 | continue; |
| 111 | pr = pci_find_parent_resource(dev, r); | 111 | pr = pci_find_parent_resource(dev, r); |
| 112 | if (!pr || request_resource(pr, r) < 0) | 112 | if (!r->start || !pr || request_resource(pr, r) < 0) { |
| 113 | printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); | 113 | printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); |
| 114 | /* Something is wrong with the region. | ||
| 115 | Invalidate the resource to prevent child | ||
| 116 | resource allocations in this range. */ | ||
| 117 | r->flags = 0; | ||
| 118 | } | ||
| 114 | } | 119 | } |
| 115 | } | 120 | } |
| 116 | pcibios_allocate_bus_resources(&bus->children); | 121 | pcibios_allocate_bus_resources(&bus->children); |
| @@ -227,7 +232,7 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask) | |||
| 227 | 232 | ||
| 228 | pci_read_config_word(dev, PCI_COMMAND, &cmd); | 233 | pci_read_config_word(dev, PCI_COMMAND, &cmd); |
| 229 | old_cmd = cmd; | 234 | old_cmd = cmd; |
| 230 | for(idx=0; idx<6; idx++) { | 235 | for(idx = 0; idx < PCI_NUM_RESOURCES; idx++) { |
| 231 | /* Only set up the requested stuff */ | 236 | /* Only set up the requested stuff */ |
| 232 | if (!(mask & (1<<idx))) | 237 | if (!(mask & (1<<idx))) |
| 233 | continue; | 238 | continue; |
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 3aa3167edbec..884f5cd27d8a 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
| @@ -713,7 +713,7 @@ static struct kprobe trampoline_p = { | |||
| 713 | .pre_handler = trampoline_probe_handler | 713 | .pre_handler = trampoline_probe_handler |
| 714 | }; | 714 | }; |
| 715 | 715 | ||
| 716 | int __init arch_init(void) | 716 | int __init arch_init_kprobes(void) |
| 717 | { | 717 | { |
| 718 | trampoline_p.addr = | 718 | trampoline_p.addr = |
| 719 | (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip; | 719 | (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip; |
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c index 4ea7158e5062..ece6a9fbe09b 100644 --- a/arch/ppc/8xx_io/enet.c +++ b/arch/ppc/8xx_io/enet.c | |||
| @@ -714,16 +714,24 @@ static int __init scc_enet_init(void) | |||
| 714 | immap->im_ioport.iop_pcdat &= ~PC_ENET_LBK; /* Disable Loopback */ | 714 | immap->im_ioport.iop_pcdat &= ~PC_ENET_LBK; /* Disable Loopback */ |
| 715 | #endif /* PC_ENET_LBK */ | 715 | #endif /* PC_ENET_LBK */ |
| 716 | 716 | ||
| 717 | /* Configure port C pins to enable CLSN and RENA. | 717 | #ifdef PE_ENET_TCLK |
| 718 | /* Configure port E for TCLK and RCLK. | ||
| 718 | */ | 719 | */ |
| 719 | immap->im_ioport.iop_pcpar &= ~(PC_ENET_CLSN | PC_ENET_RENA); | 720 | cp->cp_pepar |= (PE_ENET_TCLK | PE_ENET_RCLK); |
| 720 | immap->im_ioport.iop_pcdir &= ~(PC_ENET_CLSN | PC_ENET_RENA); | 721 | cp->cp_pedir &= ~(PE_ENET_TCLK | PE_ENET_RCLK); |
| 721 | immap->im_ioport.iop_pcso |= (PC_ENET_CLSN | PC_ENET_RENA); | 722 | cp->cp_peso &= ~(PE_ENET_TCLK | PE_ENET_RCLK); |
| 722 | 723 | #else | |
| 723 | /* Configure port A for TCLK and RCLK. | 724 | /* Configure port A for TCLK and RCLK. |
| 724 | */ | 725 | */ |
| 725 | immap->im_ioport.iop_papar |= (PA_ENET_TCLK | PA_ENET_RCLK); | 726 | immap->im_ioport.iop_papar |= (PA_ENET_TCLK | PA_ENET_RCLK); |
| 726 | immap->im_ioport.iop_padir &= ~(PA_ENET_TCLK | PA_ENET_RCLK); | 727 | immap->im_ioport.iop_padir &= ~(PA_ENET_TCLK | PA_ENET_RCLK); |
| 728 | #endif | ||
| 729 | |||
| 730 | /* Configure port C pins to enable CLSN and RENA. | ||
| 731 | */ | ||
| 732 | immap->im_ioport.iop_pcpar &= ~(PC_ENET_CLSN | PC_ENET_RENA); | ||
| 733 | immap->im_ioport.iop_pcdir &= ~(PC_ENET_CLSN | PC_ENET_RENA); | ||
| 734 | immap->im_ioport.iop_pcso |= (PC_ENET_CLSN | PC_ENET_RENA); | ||
| 727 | 735 | ||
| 728 | /* Configure Serial Interface clock routing. | 736 | /* Configure Serial Interface clock routing. |
| 729 | * First, clear all SCC bits to zero, then set the ones we want. | 737 | * First, clear all SCC bits to zero, then set the ones we want. |
| @@ -896,14 +904,18 @@ static int __init scc_enet_init(void) | |||
| 896 | /* It is now OK to enable the Ethernet transmitter. | 904 | /* It is now OK to enable the Ethernet transmitter. |
| 897 | * Unfortunately, there are board implementation differences here. | 905 | * Unfortunately, there are board implementation differences here. |
| 898 | */ | 906 | */ |
| 899 | #if (!defined (PB_ENET_TENA) && defined (PC_ENET_TENA)) | 907 | #if (!defined (PB_ENET_TENA) && defined (PC_ENET_TENA) && !defined (PE_ENET_TENA)) |
| 900 | immap->im_ioport.iop_pcpar |= PC_ENET_TENA; | 908 | immap->im_ioport.iop_pcpar |= PC_ENET_TENA; |
| 901 | immap->im_ioport.iop_pcdir &= ~PC_ENET_TENA; | 909 | immap->im_ioport.iop_pcdir &= ~PC_ENET_TENA; |
| 902 | #elif ( defined (PB_ENET_TENA) && !defined (PC_ENET_TENA)) | 910 | #elif ( defined (PB_ENET_TENA) && !defined (PC_ENET_TENA) && !defined (PE_ENET_TENA)) |
| 903 | cp->cp_pbpar |= PB_ENET_TENA; | 911 | cp->cp_pbpar |= PB_ENET_TENA; |
| 904 | cp->cp_pbdir |= PB_ENET_TENA; | 912 | cp->cp_pbdir |= PB_ENET_TENA; |
| 913 | #elif ( !defined (PB_ENET_TENA) && !defined (PC_ENET_TENA) && defined (PE_ENET_TENA)) | ||
| 914 | cp->cp_pepar |= PE_ENET_TENA; | ||
| 915 | cp->cp_pedir &= ~PE_ENET_TENA; | ||
| 916 | cp->cp_peso |= PE_ENET_TENA; | ||
| 905 | #else | 917 | #else |
| 906 | #error Configuration Error: define exactly ONE of PB_ENET_TENA, PC_ENET_TENA | 918 | #error Configuration Error: define exactly ONE of PB_ENET_TENA, PC_ENET_TENA, PE_ENET_TENA |
| 907 | #endif | 919 | #endif |
| 908 | 920 | ||
| 909 | #if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC) | 921 | #if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC) |
| @@ -936,6 +948,29 @@ static int __init scc_enet_init(void) | |||
| 936 | *((volatile uint *)BCSR1) &= ~BCSR1_ETHEN; | 948 | *((volatile uint *)BCSR1) &= ~BCSR1_ETHEN; |
| 937 | #endif | 949 | #endif |
| 938 | 950 | ||
| 951 | #ifdef CONFIG_MPC885ADS | ||
| 952 | |||
| 953 | /* Deassert PHY reset and enable the PHY. | ||
| 954 | */ | ||
| 955 | { | ||
| 956 | volatile uint __iomem *bcsr = ioremap(BCSR_ADDR, BCSR_SIZE); | ||
| 957 | uint tmp; | ||
| 958 | |||
| 959 | tmp = in_be32(bcsr + 1 /* BCSR1 */); | ||
| 960 | tmp |= BCSR1_ETHEN; | ||
| 961 | out_be32(bcsr + 1, tmp); | ||
| 962 | tmp = in_be32(bcsr + 4 /* BCSR4 */); | ||
| 963 | tmp |= BCSR4_ETH10_RST; | ||
| 964 | out_be32(bcsr + 4, tmp); | ||
| 965 | iounmap(bcsr); | ||
| 966 | } | ||
| 967 | |||
| 968 | /* On MPC885ADS SCC ethernet PHY defaults to the full duplex mode | ||
| 969 | * upon reset. SCC is set to half duplex by default. So this | ||
| 970 | * inconsistency should be better fixed by the software. | ||
| 971 | */ | ||
| 972 | #endif | ||
| 973 | |||
| 939 | dev->base_addr = (unsigned long)ep; | 974 | dev->base_addr = (unsigned long)ep; |
| 940 | #if 0 | 975 | #if 0 |
| 941 | dev->name = "CPM_ENET"; | 976 | dev->name = "CPM_ENET"; |
| @@ -969,3 +1004,4 @@ static int __init scc_enet_init(void) | |||
| 969 | } | 1004 | } |
| 970 | 1005 | ||
| 971 | module_init(scc_enet_init); | 1006 | module_init(scc_enet_init); |
| 1007 | |||
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index a7835cd3f51f..23b0d2f662c5 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
| @@ -284,6 +284,9 @@ endmenu | |||
| 284 | 284 | ||
| 285 | menu "Platform options" | 285 | menu "Platform options" |
| 286 | 286 | ||
| 287 | config FADS | ||
| 288 | bool | ||
| 289 | |||
| 287 | choice | 290 | choice |
| 288 | prompt "8xx Machine Type" | 291 | prompt "8xx Machine Type" |
| 289 | depends on 8xx | 292 | depends on 8xx |
| @@ -399,8 +402,25 @@ config BSEIP | |||
| 399 | 26MB DRAM, 4MB flash, Ethernet, a 16K-gate FPGA, USB, an LCD/video | 402 | 26MB DRAM, 4MB flash, Ethernet, a 16K-gate FPGA, USB, an LCD/video |
| 400 | controller, and two RS232 ports. | 403 | controller, and two RS232 ports. |
| 401 | 404 | ||
| 402 | config FADS | 405 | config MPC8XXFADS |
| 403 | bool "FADS" | 406 | bool "FADS" |
| 407 | select FADS | ||
| 408 | |||
| 409 | config MPC86XADS | ||
| 410 | bool "MPC86XADS" | ||
| 411 | help | ||
| 412 | MPC86x Application Development System by Freescale Semiconductor. | ||
| 413 | The MPC86xADS is meant to serve as a platform for s/w and h/w | ||
| 414 | development around the MPC86X processor families. | ||
| 415 | select FADS | ||
| 416 | |||
| 417 | config MPC885ADS | ||
| 418 | bool "MPC885ADS" | ||
| 419 | help | ||
| 420 | Freescale Semiconductor MPC885 Application Development System (ADS). | ||
| 421 | Also known as DUET. | ||
| 422 | The MPC885ADS is meant to serve as a platform for s/w and h/w | ||
| 423 | development around the MPC885 processor family. | ||
| 404 | 424 | ||
| 405 | config TQM823L | 425 | config TQM823L |
| 406 | bool "TQM823L" | 426 | bool "TQM823L" |
diff --git a/arch/ppc/configs/mpc86x_ads_defconfig b/arch/ppc/configs/mpc86x_ads_defconfig new file mode 100644 index 000000000000..f63c6f59d68a --- /dev/null +++ b/arch/ppc/configs/mpc86x_ads_defconfig | |||
| @@ -0,0 +1,633 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.12-rc4 | ||
| 4 | # Tue Jun 14 13:36:35 2005 | ||
| 5 | # | ||
| 6 | CONFIG_MMU=y | ||
| 7 | CONFIG_GENERIC_HARDIRQS=y | ||
| 8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
| 9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 10 | CONFIG_HAVE_DEC_LOCK=y | ||
| 11 | CONFIG_PPC=y | ||
| 12 | CONFIG_PPC32=y | ||
| 13 | CONFIG_GENERIC_NVRAM=y | ||
| 14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
| 15 | |||
| 16 | # | ||
| 17 | # Code maturity level options | ||
| 18 | # | ||
| 19 | CONFIG_EXPERIMENTAL=y | ||
| 20 | # CONFIG_CLEAN_COMPILE is not set | ||
| 21 | CONFIG_BROKEN=y | ||
| 22 | CONFIG_BROKEN_ON_SMP=y | ||
| 23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 24 | |||
| 25 | # | ||
| 26 | # General setup | ||
| 27 | # | ||
| 28 | CONFIG_LOCALVERSION="" | ||
| 29 | # CONFIG_SWAP is not set | ||
| 30 | CONFIG_SYSVIPC=y | ||
| 31 | # CONFIG_POSIX_MQUEUE is not set | ||
| 32 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 33 | CONFIG_SYSCTL=y | ||
| 34 | # CONFIG_AUDIT is not set | ||
| 35 | # CONFIG_HOTPLUG is not set | ||
| 36 | CONFIG_KOBJECT_UEVENT=y | ||
| 37 | # CONFIG_IKCONFIG is not set | ||
| 38 | CONFIG_EMBEDDED=y | ||
| 39 | # CONFIG_KALLSYMS is not set | ||
| 40 | CONFIG_PRINTK=y | ||
| 41 | CONFIG_BUG=y | ||
| 42 | # CONFIG_BASE_FULL is not set | ||
| 43 | CONFIG_FUTEX=y | ||
| 44 | # CONFIG_EPOLL is not set | ||
| 45 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 46 | # CONFIG_SHMEM is not set | ||
| 47 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
| 48 | CONFIG_CC_ALIGN_LABELS=0 | ||
| 49 | CONFIG_CC_ALIGN_LOOPS=0 | ||
| 50 | CONFIG_CC_ALIGN_JUMPS=0 | ||
| 51 | CONFIG_TINY_SHMEM=y | ||
| 52 | CONFIG_BASE_SMALL=1 | ||
| 53 | |||
| 54 | # | ||
| 55 | # Loadable module support | ||
| 56 | # | ||
| 57 | CONFIG_MODULES=y | ||
| 58 | # CONFIG_MODULE_UNLOAD is not set | ||
| 59 | CONFIG_OBSOLETE_MODPARM=y | ||
| 60 | # CONFIG_MODVERSIONS is not set | ||
| 61 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
| 62 | # CONFIG_KMOD is not set | ||
| 63 | |||
| 64 | # | ||
| 65 | # Processor | ||
| 66 | # | ||
| 67 | # CONFIG_6xx is not set | ||
| 68 | # CONFIG_40x is not set | ||
| 69 | # CONFIG_44x is not set | ||
| 70 | # CONFIG_POWER3 is not set | ||
| 71 | # CONFIG_POWER4 is not set | ||
| 72 | CONFIG_8xx=y | ||
| 73 | # CONFIG_E500 is not set | ||
| 74 | # CONFIG_MATH_EMULATION is not set | ||
| 75 | # CONFIG_CPU_FREQ is not set | ||
| 76 | CONFIG_EMBEDDEDBOOT=y | ||
| 77 | # CONFIG_PM is not set | ||
| 78 | CONFIG_NOT_COHERENT_CACHE=y | ||
| 79 | |||
| 80 | # | ||
| 81 | # Platform options | ||
| 82 | # | ||
| 83 | CONFIG_FADS=y | ||
| 84 | # CONFIG_RPXLITE is not set | ||
| 85 | # CONFIG_RPXCLASSIC is not set | ||
| 86 | # CONFIG_BSEIP is not set | ||
| 87 | # CONFIG_MPC8XXFADS is not set | ||
| 88 | CONFIG_MPC86XADS=y | ||
| 89 | # CONFIG_TQM823L is not set | ||
| 90 | # CONFIG_TQM850L is not set | ||
| 91 | # CONFIG_TQM855L is not set | ||
| 92 | # CONFIG_TQM860L is not set | ||
| 93 | # CONFIG_FPS850L is not set | ||
| 94 | # CONFIG_SPD823TS is not set | ||
| 95 | # CONFIG_IVMS8 is not set | ||
| 96 | # CONFIG_IVML24 is not set | ||
| 97 | # CONFIG_SM850 is not set | ||
| 98 | # CONFIG_HERMES_PRO is not set | ||
| 99 | # CONFIG_IP860 is not set | ||
| 100 | # CONFIG_LWMON is not set | ||
| 101 | # CONFIG_PCU_E is not set | ||
| 102 | # CONFIG_CCM is not set | ||
| 103 | # CONFIG_LANTEC is not set | ||
| 104 | # CONFIG_MBX is not set | ||
| 105 | # CONFIG_WINCEPT is not set | ||
| 106 | # CONFIG_SMP is not set | ||
| 107 | # CONFIG_PREEMPT is not set | ||
| 108 | # CONFIG_HIGHMEM is not set | ||
| 109 | CONFIG_BINFMT_ELF=y | ||
| 110 | # CONFIG_BINFMT_MISC is not set | ||
| 111 | # CONFIG_CMDLINE_BOOL is not set | ||
| 112 | CONFIG_ISA_DMA_API=y | ||
| 113 | |||
| 114 | # | ||
| 115 | # Bus options | ||
| 116 | # | ||
| 117 | # CONFIG_PCI is not set | ||
| 118 | # CONFIG_PCI_DOMAINS is not set | ||
| 119 | # CONFIG_PCI_QSPAN is not set | ||
| 120 | |||
| 121 | # | ||
| 122 | # PCCARD (PCMCIA/CardBus) support | ||
| 123 | # | ||
| 124 | # CONFIG_PCCARD is not set | ||
| 125 | |||
| 126 | # | ||
| 127 | # Advanced setup | ||
| 128 | # | ||
| 129 | # CONFIG_ADVANCED_OPTIONS is not set | ||
| 130 | |||
| 131 | # | ||
| 132 | # Default settings for advanced configuration options are used | ||
| 133 | # | ||
| 134 | CONFIG_HIGHMEM_START=0xfe000000 | ||
| 135 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
| 136 | CONFIG_KERNEL_START=0xc0000000 | ||
| 137 | CONFIG_TASK_SIZE=0x80000000 | ||
| 138 | CONFIG_CONSISTENT_START=0xff100000 | ||
| 139 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
| 140 | CONFIG_BOOT_LOAD=0x00400000 | ||
| 141 | |||
| 142 | # | ||
| 143 | # Device Drivers | ||
| 144 | # | ||
| 145 | |||
| 146 | # | ||
| 147 | # Generic Driver Options | ||
| 148 | # | ||
| 149 | # CONFIG_STANDALONE is not set | ||
| 150 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 151 | # CONFIG_FW_LOADER is not set | ||
| 152 | |||
| 153 | # | ||
| 154 | # Memory Technology Devices (MTD) | ||
| 155 | # | ||
| 156 | # CONFIG_MTD is not set | ||
| 157 | |||
| 158 | # | ||
| 159 | # Parallel port support | ||
| 160 | # | ||
| 161 | # CONFIG_PARPORT is not set | ||
| 162 | |||
| 163 | # | ||
| 164 | # Plug and Play support | ||
| 165 | # | ||
| 166 | |||
| 167 | # | ||
| 168 | # Block devices | ||
| 169 | # | ||
| 170 | # CONFIG_BLK_DEV_FD is not set | ||
| 171 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 172 | CONFIG_BLK_DEV_LOOP=y | ||
| 173 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
| 174 | # CONFIG_BLK_DEV_NBD is not set | ||
| 175 | # CONFIG_BLK_DEV_RAM is not set | ||
| 176 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 177 | CONFIG_INITRAMFS_SOURCE="" | ||
| 178 | # CONFIG_LBD is not set | ||
| 179 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 180 | |||
| 181 | # | ||
| 182 | # IO Schedulers | ||
| 183 | # | ||
| 184 | CONFIG_IOSCHED_NOOP=y | ||
| 185 | CONFIG_IOSCHED_AS=y | ||
| 186 | CONFIG_IOSCHED_DEADLINE=y | ||
| 187 | CONFIG_IOSCHED_CFQ=y | ||
| 188 | # CONFIG_ATA_OVER_ETH is not set | ||
| 189 | |||
| 190 | # | ||
| 191 | # ATA/ATAPI/MFM/RLL support | ||
| 192 | # | ||
| 193 | # CONFIG_IDE is not set | ||
| 194 | |||
| 195 | # | ||
| 196 | # SCSI device support | ||
| 197 | # | ||
| 198 | # CONFIG_SCSI is not set | ||
| 199 | |||
| 200 | # | ||
| 201 | # Multi-device support (RAID and LVM) | ||
| 202 | # | ||
| 203 | # CONFIG_MD is not set | ||
| 204 | |||
| 205 | # | ||
| 206 | # Fusion MPT device support | ||
| 207 | # | ||
| 208 | |||
| 209 | # | ||
| 210 | # IEEE 1394 (FireWire) support | ||
| 211 | # | ||
| 212 | # CONFIG_IEEE1394 is not set | ||
| 213 | |||
| 214 | # | ||
| 215 | # I2O device support | ||
| 216 | # | ||
| 217 | |||
| 218 | # | ||
| 219 | # Macintosh device drivers | ||
| 220 | # | ||
| 221 | |||
| 222 | # | ||
| 223 | # Networking support | ||
| 224 | # | ||
| 225 | CONFIG_NET=y | ||
| 226 | |||
| 227 | # | ||
| 228 | # Networking options | ||
| 229 | # | ||
| 230 | CONFIG_PACKET=y | ||
| 231 | # CONFIG_PACKET_MMAP is not set | ||
| 232 | CONFIG_UNIX=y | ||
| 233 | # CONFIG_NET_KEY is not set | ||
| 234 | CONFIG_INET=y | ||
| 235 | # CONFIG_IP_MULTICAST is not set | ||
| 236 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 237 | CONFIG_IP_PNP=y | ||
| 238 | CONFIG_IP_PNP_DHCP=y | ||
| 239 | # CONFIG_IP_PNP_BOOTP is not set | ||
| 240 | # CONFIG_IP_PNP_RARP is not set | ||
| 241 | # CONFIG_NET_IPIP is not set | ||
| 242 | # CONFIG_NET_IPGRE is not set | ||
| 243 | # CONFIG_ARPD is not set | ||
| 244 | # CONFIG_SYN_COOKIES is not set | ||
| 245 | # CONFIG_INET_AH is not set | ||
| 246 | # CONFIG_INET_ESP is not set | ||
| 247 | # CONFIG_INET_IPCOMP is not set | ||
| 248 | # CONFIG_INET_TUNNEL is not set | ||
| 249 | CONFIG_IP_TCPDIAG=y | ||
| 250 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
| 251 | CONFIG_IPV6=m | ||
| 252 | # CONFIG_IPV6_PRIVACY is not set | ||
| 253 | # CONFIG_INET6_AH is not set | ||
| 254 | # CONFIG_INET6_ESP is not set | ||
| 255 | # CONFIG_INET6_IPCOMP is not set | ||
| 256 | # CONFIG_INET6_TUNNEL is not set | ||
| 257 | # CONFIG_IPV6_TUNNEL is not set | ||
| 258 | # CONFIG_NETFILTER is not set | ||
| 259 | |||
| 260 | # | ||
| 261 | # SCTP Configuration (EXPERIMENTAL) | ||
| 262 | # | ||
| 263 | # CONFIG_IP_SCTP is not set | ||
| 264 | # CONFIG_ATM is not set | ||
| 265 | # CONFIG_BRIDGE is not set | ||
| 266 | # CONFIG_VLAN_8021Q is not set | ||
| 267 | # CONFIG_DECNET is not set | ||
| 268 | # CONFIG_LLC2 is not set | ||
| 269 | # CONFIG_IPX is not set | ||
| 270 | # CONFIG_ATALK is not set | ||
| 271 | # CONFIG_X25 is not set | ||
| 272 | # CONFIG_LAPB is not set | ||
| 273 | # CONFIG_NET_DIVERT is not set | ||
| 274 | # CONFIG_ECONET is not set | ||
| 275 | # CONFIG_WAN_ROUTER is not set | ||
| 276 | |||
| 277 | # | ||
| 278 | # QoS and/or fair queueing | ||
| 279 | # | ||
| 280 | # CONFIG_NET_SCHED is not set | ||
| 281 | # CONFIG_NET_CLS_ROUTE is not set | ||
| 282 | |||
| 283 | # | ||
| 284 | # Network testing | ||
| 285 | # | ||
| 286 | # CONFIG_NET_PKTGEN is not set | ||
| 287 | # CONFIG_NETPOLL is not set | ||
| 288 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 289 | # CONFIG_HAMRADIO is not set | ||
| 290 | # CONFIG_IRDA is not set | ||
| 291 | # CONFIG_BT is not set | ||
| 292 | CONFIG_NETDEVICES=y | ||
| 293 | # CONFIG_DUMMY is not set | ||
| 294 | # CONFIG_BONDING is not set | ||
| 295 | # CONFIG_EQUALIZER is not set | ||
| 296 | # CONFIG_TUN is not set | ||
| 297 | |||
| 298 | # | ||
| 299 | # Ethernet (10 or 100Mbit) | ||
| 300 | # | ||
| 301 | CONFIG_NET_ETHERNET=y | ||
| 302 | # CONFIG_MII is not set | ||
| 303 | # CONFIG_OAKNET is not set | ||
| 304 | |||
| 305 | # | ||
| 306 | # Ethernet (1000 Mbit) | ||
| 307 | # | ||
| 308 | |||
| 309 | # | ||
| 310 | # Ethernet (10000 Mbit) | ||
| 311 | # | ||
| 312 | |||
| 313 | # | ||
| 314 | # Token Ring devices | ||
| 315 | # | ||
| 316 | |||
| 317 | # | ||
| 318 | # Wireless LAN (non-hamradio) | ||
| 319 | # | ||
| 320 | # CONFIG_NET_RADIO is not set | ||
| 321 | |||
| 322 | # | ||
| 323 | # Wan interfaces | ||
| 324 | # | ||
| 325 | # CONFIG_WAN is not set | ||
| 326 | # CONFIG_PPP is not set | ||
| 327 | # CONFIG_SLIP is not set | ||
| 328 | # CONFIG_SHAPER is not set | ||
| 329 | # CONFIG_NETCONSOLE is not set | ||
| 330 | |||
| 331 | # | ||
| 332 | # ISDN subsystem | ||
| 333 | # | ||
| 334 | # CONFIG_ISDN is not set | ||
| 335 | |||
| 336 | # | ||
| 337 | # Telephony Support | ||
| 338 | # | ||
| 339 | # CONFIG_PHONE is not set | ||
| 340 | |||
| 341 | # | ||
| 342 | # Input device support | ||
| 343 | # | ||
| 344 | # CONFIG_INPUT is not set | ||
| 345 | |||
| 346 | # | ||
| 347 | # Hardware I/O ports | ||
| 348 | # | ||
| 349 | # CONFIG_SERIO is not set | ||
| 350 | # CONFIG_GAMEPORT is not set | ||
| 351 | CONFIG_SOUND_GAMEPORT=y | ||
| 352 | |||
| 353 | # | ||
| 354 | # Character devices | ||
| 355 | # | ||
| 356 | # CONFIG_VT is not set | ||
| 357 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 358 | |||
| 359 | # | ||
| 360 | # Serial drivers | ||
| 361 | # | ||
| 362 | # CONFIG_SERIAL_8250 is not set | ||
| 363 | |||
| 364 | # | ||
| 365 | # Non-8250 serial port support | ||
| 366 | # | ||
| 367 | CONFIG_SERIAL_CORE=y | ||
| 368 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 369 | CONFIG_SERIAL_CPM=y | ||
| 370 | CONFIG_SERIAL_CPM_CONSOLE=y | ||
| 371 | # CONFIG_SERIAL_CPM_SCC1 is not set | ||
| 372 | # CONFIG_SERIAL_CPM_SCC2 is not set | ||
| 373 | # CONFIG_SERIAL_CPM_SCC3 is not set | ||
| 374 | # CONFIG_SERIAL_CPM_SCC4 is not set | ||
| 375 | CONFIG_SERIAL_CPM_SMC1=y | ||
| 376 | # CONFIG_SERIAL_CPM_SMC2 is not set | ||
| 377 | CONFIG_UNIX98_PTYS=y | ||
| 378 | # CONFIG_LEGACY_PTYS is not set | ||
| 379 | |||
| 380 | # | ||
| 381 | # IPMI | ||
| 382 | # | ||
| 383 | # CONFIG_IPMI_HANDLER is not set | ||
| 384 | |||
| 385 | # | ||
| 386 | # Watchdog Cards | ||
| 387 | # | ||
| 388 | # CONFIG_WATCHDOG is not set | ||
| 389 | # CONFIG_NVRAM is not set | ||
| 390 | # CONFIG_GEN_RTC is not set | ||
| 391 | # CONFIG_DTLK is not set | ||
| 392 | # CONFIG_R3964 is not set | ||
| 393 | |||
| 394 | # | ||
| 395 | # Ftape, the floppy tape device driver | ||
| 396 | # | ||
| 397 | # CONFIG_AGP is not set | ||
| 398 | # CONFIG_DRM is not set | ||
| 399 | # CONFIG_RAW_DRIVER is not set | ||
| 400 | |||
| 401 | # | ||
| 402 | # TPM devices | ||
| 403 | # | ||
| 404 | |||
| 405 | # | ||
| 406 | # I2C support | ||
| 407 | # | ||
| 408 | # CONFIG_I2C is not set | ||
| 409 | |||
| 410 | # | ||
| 411 | # Dallas's 1-wire bus | ||
| 412 | # | ||
| 413 | # CONFIG_W1 is not set | ||
| 414 | |||
| 415 | # | ||
| 416 | # Misc devices | ||
| 417 | # | ||
| 418 | |||
| 419 | # | ||
| 420 | # Multimedia devices | ||
| 421 | # | ||
| 422 | # CONFIG_VIDEO_DEV is not set | ||
| 423 | |||
| 424 | # | ||
| 425 | # Digital Video Broadcasting Devices | ||
| 426 | # | ||
| 427 | # CONFIG_DVB is not set | ||
| 428 | |||
| 429 | # | ||
| 430 | # Graphics support | ||
| 431 | # | ||
| 432 | # CONFIG_FB is not set | ||
| 433 | |||
| 434 | # | ||
| 435 | # Sound | ||
| 436 | # | ||
| 437 | # CONFIG_SOUND is not set | ||
| 438 | |||
| 439 | # | ||
| 440 | # USB support | ||
| 441 | # | ||
| 442 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
| 443 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
| 444 | |||
| 445 | # | ||
| 446 | # USB Gadget Support | ||
| 447 | # | ||
| 448 | # CONFIG_USB_GADGET is not set | ||
| 449 | |||
| 450 | # | ||
| 451 | # MMC/SD Card support | ||
| 452 | # | ||
| 453 | # CONFIG_MMC is not set | ||
| 454 | |||
| 455 | # | ||
| 456 | # InfiniBand support | ||
| 457 | # | ||
| 458 | # CONFIG_INFINIBAND is not set | ||
| 459 | |||
| 460 | # | ||
| 461 | # File systems | ||
| 462 | # | ||
| 463 | # CONFIG_EXT2_FS is not set | ||
| 464 | CONFIG_EXT3_FS=y | ||
| 465 | # CONFIG_EXT3_FS_XATTR is not set | ||
| 466 | CONFIG_JBD=y | ||
| 467 | # CONFIG_JBD_DEBUG is not set | ||
| 468 | # CONFIG_REISERFS_FS is not set | ||
| 469 | # CONFIG_JFS_FS is not set | ||
| 470 | |||
| 471 | # | ||
| 472 | # XFS support | ||
| 473 | # | ||
| 474 | # CONFIG_XFS_FS is not set | ||
| 475 | # CONFIG_MINIX_FS is not set | ||
| 476 | # CONFIG_ROMFS_FS is not set | ||
| 477 | # CONFIG_QUOTA is not set | ||
| 478 | # CONFIG_DNOTIFY is not set | ||
| 479 | # CONFIG_AUTOFS_FS is not set | ||
| 480 | # CONFIG_AUTOFS4_FS is not set | ||
| 481 | |||
| 482 | # | ||
| 483 | # CD-ROM/DVD Filesystems | ||
| 484 | # | ||
| 485 | # CONFIG_ISO9660_FS is not set | ||
| 486 | # CONFIG_UDF_FS is not set | ||
| 487 | |||
| 488 | # | ||
| 489 | # DOS/FAT/NT Filesystems | ||
| 490 | # | ||
| 491 | # CONFIG_MSDOS_FS is not set | ||
| 492 | # CONFIG_VFAT_FS is not set | ||
| 493 | # CONFIG_NTFS_FS is not set | ||
| 494 | |||
| 495 | # | ||
| 496 | # Pseudo filesystems | ||
| 497 | # | ||
| 498 | CONFIG_PROC_FS=y | ||
| 499 | CONFIG_PROC_KCORE=y | ||
| 500 | CONFIG_SYSFS=y | ||
| 501 | # CONFIG_DEVFS_FS is not set | ||
| 502 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
| 503 | # CONFIG_TMPFS is not set | ||
| 504 | # CONFIG_HUGETLBFS is not set | ||
| 505 | # CONFIG_HUGETLB_PAGE is not set | ||
| 506 | CONFIG_RAMFS=y | ||
| 507 | |||
| 508 | # | ||
| 509 | # Miscellaneous filesystems | ||
| 510 | # | ||
| 511 | # CONFIG_ADFS_FS is not set | ||
| 512 | # CONFIG_AFFS_FS is not set | ||
| 513 | # CONFIG_HFS_FS is not set | ||
| 514 | # CONFIG_HFSPLUS_FS is not set | ||
| 515 | # CONFIG_BEFS_FS is not set | ||
| 516 | # CONFIG_BFS_FS is not set | ||
| 517 | # CONFIG_EFS_FS is not set | ||
| 518 | # CONFIG_CRAMFS is not set | ||
| 519 | # CONFIG_VXFS_FS is not set | ||
| 520 | # CONFIG_HPFS_FS is not set | ||
| 521 | # CONFIG_QNX4FS_FS is not set | ||
| 522 | # CONFIG_SYSV_FS is not set | ||
| 523 | # CONFIG_UFS_FS is not set | ||
| 524 | |||
| 525 | # | ||
| 526 | # Network File Systems | ||
| 527 | # | ||
| 528 | CONFIG_NFS_FS=y | ||
| 529 | CONFIG_NFS_V3=y | ||
| 530 | CONFIG_NFS_V4=y | ||
| 531 | # CONFIG_NFS_DIRECTIO is not set | ||
| 532 | # CONFIG_NFSD is not set | ||
| 533 | CONFIG_ROOT_NFS=y | ||
| 534 | CONFIG_LOCKD=y | ||
| 535 | CONFIG_LOCKD_V4=y | ||
| 536 | CONFIG_SUNRPC=y | ||
| 537 | CONFIG_SUNRPC_GSS=y | ||
| 538 | CONFIG_RPCSEC_GSS_KRB5=y | ||
| 539 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
| 540 | # CONFIG_SMB_FS is not set | ||
| 541 | # CONFIG_CIFS is not set | ||
| 542 | # CONFIG_NCP_FS is not set | ||
| 543 | # CONFIG_CODA_FS is not set | ||
| 544 | # CONFIG_AFS_FS is not set | ||
| 545 | |||
| 546 | # | ||
| 547 | # Partition Types | ||
| 548 | # | ||
| 549 | # CONFIG_PARTITION_ADVANCED is not set | ||
| 550 | CONFIG_MSDOS_PARTITION=y | ||
| 551 | |||
| 552 | # | ||
| 553 | # Native Language Support | ||
| 554 | # | ||
| 555 | # CONFIG_NLS is not set | ||
| 556 | |||
| 557 | # | ||
| 558 | # MPC8xx CPM Options | ||
| 559 | # | ||
| 560 | CONFIG_SCC_ENET=y | ||
| 561 | CONFIG_SCC1_ENET=y | ||
| 562 | # CONFIG_SCC2_ENET is not set | ||
| 563 | # CONFIG_SCC3_ENET is not set | ||
| 564 | # CONFIG_FEC_ENET is not set | ||
| 565 | # CONFIG_ENET_BIG_BUFFERS is not set | ||
| 566 | |||
| 567 | # | ||
| 568 | # Generic MPC8xx Options | ||
| 569 | # | ||
| 570 | # CONFIG_8xx_COPYBACK is not set | ||
| 571 | # CONFIG_8xx_CPU6 is not set | ||
| 572 | CONFIG_NO_UCODE_PATCH=y | ||
| 573 | # CONFIG_USB_SOF_UCODE_PATCH is not set | ||
| 574 | # CONFIG_I2C_SPI_UCODE_PATCH is not set | ||
| 575 | # CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set | ||
| 576 | |||
| 577 | # | ||
| 578 | # Library routines | ||
| 579 | # | ||
| 580 | # CONFIG_CRC_CCITT is not set | ||
| 581 | # CONFIG_CRC32 is not set | ||
| 582 | # CONFIG_LIBCRC32C is not set | ||
| 583 | |||
| 584 | # | ||
| 585 | # Profiling support | ||
| 586 | # | ||
| 587 | # CONFIG_PROFILING is not set | ||
| 588 | |||
| 589 | # | ||
| 590 | # Kernel hacking | ||
| 591 | # | ||
| 592 | # CONFIG_PRINTK_TIME is not set | ||
| 593 | # CONFIG_DEBUG_KERNEL is not set | ||
| 594 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 595 | |||
| 596 | # | ||
| 597 | # Security options | ||
| 598 | # | ||
| 599 | # CONFIG_KEYS is not set | ||
| 600 | # CONFIG_SECURITY is not set | ||
| 601 | |||
| 602 | # | ||
| 603 | # Cryptographic options | ||
| 604 | # | ||
| 605 | CONFIG_CRYPTO=y | ||
| 606 | # CONFIG_CRYPTO_HMAC is not set | ||
| 607 | # CONFIG_CRYPTO_NULL is not set | ||
| 608 | # CONFIG_CRYPTO_MD4 is not set | ||
| 609 | CONFIG_CRYPTO_MD5=y | ||
| 610 | # CONFIG_CRYPTO_SHA1 is not set | ||
| 611 | # CONFIG_CRYPTO_SHA256 is not set | ||
| 612 | # CONFIG_CRYPTO_SHA512 is not set | ||
| 613 | # CONFIG_CRYPTO_WP512 is not set | ||
| 614 | # CONFIG_CRYPTO_TGR192 is not set | ||
| 615 | CONFIG_CRYPTO_DES=y | ||
| 616 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
| 617 | # CONFIG_CRYPTO_TWOFISH is not set | ||
| 618 | # CONFIG_CRYPTO_SERPENT is not set | ||
| 619 | # CONFIG_CRYPTO_AES is not set | ||
| 620 | # CONFIG_CRYPTO_CAST5 is not set | ||
| 621 | # CONFIG_CRYPTO_CAST6 is not set | ||
| 622 | # CONFIG_CRYPTO_TEA is not set | ||
| 623 | # CONFIG_CRYPTO_ARC4 is not set | ||
| 624 | # CONFIG_CRYPTO_KHAZAD is not set | ||
| 625 | # CONFIG_CRYPTO_ANUBIS is not set | ||
| 626 | # CONFIG_CRYPTO_DEFLATE is not set | ||
| 627 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
| 628 | # CONFIG_CRYPTO_CRC32C is not set | ||
| 629 | # CONFIG_CRYPTO_TEST is not set | ||
| 630 | |||
| 631 | # | ||
| 632 | # Hardware crypto devices | ||
| 633 | # | ||
diff --git a/arch/ppc/configs/mpc885ads_defconfig b/arch/ppc/configs/mpc885ads_defconfig new file mode 100644 index 000000000000..016f94d9325f --- /dev/null +++ b/arch/ppc/configs/mpc885ads_defconfig | |||
| @@ -0,0 +1,622 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.12-rc6 | ||
| 4 | # Thu Jun 9 21:17:29 2005 | ||
| 5 | # | ||
| 6 | CONFIG_MMU=y | ||
| 7 | CONFIG_GENERIC_HARDIRQS=y | ||
| 8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
| 9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 10 | CONFIG_HAVE_DEC_LOCK=y | ||
| 11 | CONFIG_PPC=y | ||
| 12 | CONFIG_PPC32=y | ||
| 13 | CONFIG_GENERIC_NVRAM=y | ||
| 14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
| 15 | |||
| 16 | # | ||
| 17 | # Code maturity level options | ||
| 18 | # | ||
| 19 | CONFIG_EXPERIMENTAL=y | ||
| 20 | # CONFIG_CLEAN_COMPILE is not set | ||
| 21 | CONFIG_BROKEN=y | ||
| 22 | CONFIG_BROKEN_ON_SMP=y | ||
| 23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 24 | |||
| 25 | # | ||
| 26 | # General setup | ||
| 27 | # | ||
| 28 | CONFIG_LOCALVERSION="" | ||
| 29 | # CONFIG_SWAP is not set | ||
| 30 | CONFIG_SYSVIPC=y | ||
| 31 | # CONFIG_POSIX_MQUEUE is not set | ||
| 32 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 33 | CONFIG_SYSCTL=y | ||
| 34 | # CONFIG_AUDIT is not set | ||
| 35 | CONFIG_HOTPLUG=y | ||
| 36 | CONFIG_KOBJECT_UEVENT=y | ||
| 37 | # CONFIG_IKCONFIG is not set | ||
| 38 | CONFIG_EMBEDDED=y | ||
| 39 | # CONFIG_KALLSYMS is not set | ||
| 40 | CONFIG_PRINTK=y | ||
| 41 | CONFIG_BUG=y | ||
| 42 | CONFIG_BASE_FULL=y | ||
| 43 | CONFIG_FUTEX=y | ||
| 44 | # CONFIG_EPOLL is not set | ||
| 45 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
| 46 | CONFIG_SHMEM=y | ||
| 47 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
| 48 | CONFIG_CC_ALIGN_LABELS=0 | ||
| 49 | CONFIG_CC_ALIGN_LOOPS=0 | ||
| 50 | CONFIG_CC_ALIGN_JUMPS=0 | ||
| 51 | # CONFIG_TINY_SHMEM is not set | ||
| 52 | CONFIG_BASE_SMALL=0 | ||
| 53 | |||
| 54 | # | ||
| 55 | # Loadable module support | ||
| 56 | # | ||
| 57 | # CONFIG_MODULES is not set | ||
| 58 | |||
| 59 | # | ||
| 60 | # Processor | ||
| 61 | # | ||
| 62 | # CONFIG_6xx is not set | ||
| 63 | # CONFIG_40x is not set | ||
| 64 | # CONFIG_44x is not set | ||
| 65 | # CONFIG_POWER3 is not set | ||
| 66 | # CONFIG_POWER4 is not set | ||
| 67 | CONFIG_8xx=y | ||
| 68 | # CONFIG_E500 is not set | ||
| 69 | # CONFIG_MATH_EMULATION is not set | ||
| 70 | # CONFIG_CPU_FREQ is not set | ||
| 71 | CONFIG_EMBEDDEDBOOT=y | ||
| 72 | # CONFIG_PM is not set | ||
| 73 | CONFIG_NOT_COHERENT_CACHE=y | ||
| 74 | |||
| 75 | # | ||
| 76 | # Platform options | ||
| 77 | # | ||
| 78 | # CONFIG_RPXLITE is not set | ||
| 79 | # CONFIG_RPXCLASSIC is not set | ||
| 80 | # CONFIG_BSEIP is not set | ||
| 81 | # CONFIG_FADS is not set | ||
| 82 | CONFIG_MPC885ADS=y | ||
| 83 | # CONFIG_TQM823L is not set | ||
| 84 | # CONFIG_TQM850L is not set | ||
| 85 | # CONFIG_TQM855L is not set | ||
| 86 | # CONFIG_TQM860L is not set | ||
| 87 | # CONFIG_FPS850L is not set | ||
| 88 | # CONFIG_SPD823TS is not set | ||
| 89 | # CONFIG_IVMS8 is not set | ||
| 90 | # CONFIG_IVML24 is not set | ||
| 91 | # CONFIG_SM850 is not set | ||
| 92 | # CONFIG_HERMES_PRO is not set | ||
| 93 | # CONFIG_IP860 is not set | ||
| 94 | # CONFIG_LWMON is not set | ||
| 95 | # CONFIG_PCU_E is not set | ||
| 96 | # CONFIG_CCM is not set | ||
| 97 | # CONFIG_LANTEC is not set | ||
| 98 | # CONFIG_MBX is not set | ||
| 99 | # CONFIG_WINCEPT is not set | ||
| 100 | # CONFIG_SMP is not set | ||
| 101 | # CONFIG_PREEMPT is not set | ||
| 102 | # CONFIG_HIGHMEM is not set | ||
| 103 | CONFIG_BINFMT_ELF=y | ||
| 104 | # CONFIG_BINFMT_MISC is not set | ||
| 105 | # CONFIG_CMDLINE_BOOL is not set | ||
| 106 | CONFIG_ISA_DMA_API=y | ||
| 107 | |||
| 108 | # | ||
| 109 | # Bus options | ||
| 110 | # | ||
| 111 | # CONFIG_PCI is not set | ||
| 112 | # CONFIG_PCI_DOMAINS is not set | ||
| 113 | # CONFIG_PCI_QSPAN is not set | ||
| 114 | |||
| 115 | # | ||
| 116 | # PCCARD (PCMCIA/CardBus) support | ||
| 117 | # | ||
| 118 | # CONFIG_PCCARD is not set | ||
| 119 | |||
| 120 | # | ||
| 121 | # Advanced setup | ||
| 122 | # | ||
| 123 | # CONFIG_ADVANCED_OPTIONS is not set | ||
| 124 | |||
| 125 | # | ||
| 126 | # Default settings for advanced configuration options are used | ||
| 127 | # | ||
| 128 | CONFIG_HIGHMEM_START=0xfe000000 | ||
| 129 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
| 130 | CONFIG_KERNEL_START=0xc0000000 | ||
| 131 | CONFIG_TASK_SIZE=0x80000000 | ||
| 132 | CONFIG_CONSISTENT_START=0xff100000 | ||
| 133 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
| 134 | CONFIG_BOOT_LOAD=0x00400000 | ||
| 135 | |||
| 136 | # | ||
| 137 | # Device Drivers | ||
| 138 | # | ||
| 139 | |||
| 140 | # | ||
| 141 | # Generic Driver Options | ||
| 142 | # | ||
| 143 | CONFIG_STANDALONE=y | ||
| 144 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 145 | # CONFIG_FW_LOADER is not set | ||
| 146 | |||
| 147 | # | ||
| 148 | # Memory Technology Devices (MTD) | ||
| 149 | # | ||
| 150 | # CONFIG_MTD is not set | ||
| 151 | |||
| 152 | # | ||
| 153 | # Parallel port support | ||
| 154 | # | ||
| 155 | # CONFIG_PARPORT is not set | ||
| 156 | |||
| 157 | # | ||
| 158 | # Plug and Play support | ||
| 159 | # | ||
| 160 | |||
| 161 | # | ||
| 162 | # Block devices | ||
| 163 | # | ||
| 164 | # CONFIG_BLK_DEV_FD is not set | ||
| 165 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 166 | # CONFIG_BLK_DEV_LOOP is not set | ||
| 167 | # CONFIG_BLK_DEV_NBD is not set | ||
| 168 | # CONFIG_BLK_DEV_RAM is not set | ||
| 169 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 170 | CONFIG_INITRAMFS_SOURCE="" | ||
| 171 | # CONFIG_LBD is not set | ||
| 172 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 173 | |||
| 174 | # | ||
| 175 | # IO Schedulers | ||
| 176 | # | ||
| 177 | CONFIG_IOSCHED_NOOP=y | ||
| 178 | # CONFIG_IOSCHED_AS is not set | ||
| 179 | # CONFIG_IOSCHED_DEADLINE is not set | ||
| 180 | # CONFIG_IOSCHED_CFQ is not set | ||
| 181 | # CONFIG_ATA_OVER_ETH is not set | ||
| 182 | |||
| 183 | # | ||
| 184 | # ATA/ATAPI/MFM/RLL support | ||
| 185 | # | ||
| 186 | # CONFIG_IDE is not set | ||
| 187 | |||
| 188 | # | ||
| 189 | # SCSI device support | ||
| 190 | # | ||
| 191 | # CONFIG_SCSI is not set | ||
| 192 | |||
| 193 | # | ||
| 194 | # Multi-device support (RAID and LVM) | ||
| 195 | # | ||
| 196 | # CONFIG_MD is not set | ||
| 197 | |||
| 198 | # | ||
| 199 | # Fusion MPT device support | ||
| 200 | # | ||
| 201 | |||
| 202 | # | ||
| 203 | # IEEE 1394 (FireWire) support | ||
| 204 | # | ||
| 205 | # CONFIG_IEEE1394 is not set | ||
| 206 | |||
| 207 | # | ||
| 208 | # I2O device support | ||
| 209 | # | ||
| 210 | |||
| 211 | # | ||
| 212 | # Macintosh device drivers | ||
| 213 | # | ||
| 214 | |||
| 215 | # | ||
| 216 | # Networking support | ||
| 217 | # | ||
| 218 | CONFIG_NET=y | ||
| 219 | |||
| 220 | # | ||
| 221 | # Networking options | ||
| 222 | # | ||
| 223 | CONFIG_PACKET=y | ||
| 224 | # CONFIG_PACKET_MMAP is not set | ||
| 225 | CONFIG_UNIX=y | ||
| 226 | # CONFIG_NET_KEY is not set | ||
| 227 | CONFIG_INET=y | ||
| 228 | # CONFIG_IP_MULTICAST is not set | ||
| 229 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 230 | CONFIG_IP_PNP=y | ||
| 231 | CONFIG_IP_PNP_DHCP=y | ||
| 232 | CONFIG_IP_PNP_BOOTP=y | ||
| 233 | # CONFIG_IP_PNP_RARP is not set | ||
| 234 | # CONFIG_NET_IPIP is not set | ||
| 235 | # CONFIG_NET_IPGRE is not set | ||
| 236 | # CONFIG_ARPD is not set | ||
| 237 | # CONFIG_SYN_COOKIES is not set | ||
| 238 | # CONFIG_INET_AH is not set | ||
| 239 | # CONFIG_INET_ESP is not set | ||
| 240 | # CONFIG_INET_IPCOMP is not set | ||
| 241 | # CONFIG_INET_TUNNEL is not set | ||
| 242 | CONFIG_IP_TCPDIAG=y | ||
| 243 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
| 244 | # CONFIG_IPV6 is not set | ||
| 245 | # CONFIG_NETFILTER is not set | ||
| 246 | |||
| 247 | # | ||
| 248 | # SCTP Configuration (EXPERIMENTAL) | ||
| 249 | # | ||
| 250 | # CONFIG_IP_SCTP is not set | ||
| 251 | # CONFIG_ATM is not set | ||
| 252 | # CONFIG_BRIDGE is not set | ||
| 253 | # CONFIG_VLAN_8021Q is not set | ||
| 254 | # CONFIG_DECNET is not set | ||
| 255 | # CONFIG_LLC2 is not set | ||
| 256 | # CONFIG_IPX is not set | ||
| 257 | # CONFIG_ATALK is not set | ||
| 258 | # CONFIG_X25 is not set | ||
| 259 | # CONFIG_LAPB is not set | ||
| 260 | # CONFIG_NET_DIVERT is not set | ||
| 261 | # CONFIG_ECONET is not set | ||
| 262 | # CONFIG_WAN_ROUTER is not set | ||
| 263 | |||
| 264 | # | ||
| 265 | # QoS and/or fair queueing | ||
| 266 | # | ||
| 267 | # CONFIG_NET_SCHED is not set | ||
| 268 | # CONFIG_NET_CLS_ROUTE is not set | ||
| 269 | |||
| 270 | # | ||
| 271 | # Network testing | ||
| 272 | # | ||
| 273 | # CONFIG_NET_PKTGEN is not set | ||
| 274 | # CONFIG_NETPOLL is not set | ||
| 275 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
| 276 | # CONFIG_HAMRADIO is not set | ||
| 277 | # CONFIG_IRDA is not set | ||
| 278 | # CONFIG_BT is not set | ||
| 279 | CONFIG_NETDEVICES=y | ||
| 280 | # CONFIG_DUMMY is not set | ||
| 281 | # CONFIG_BONDING is not set | ||
| 282 | # CONFIG_EQUALIZER is not set | ||
| 283 | # CONFIG_TUN is not set | ||
| 284 | |||
| 285 | # | ||
| 286 | # Ethernet (10 or 100Mbit) | ||
| 287 | # | ||
| 288 | CONFIG_NET_ETHERNET=y | ||
| 289 | CONFIG_MII=y | ||
| 290 | # CONFIG_OAKNET is not set | ||
| 291 | |||
| 292 | # | ||
| 293 | # Ethernet (1000 Mbit) | ||
| 294 | # | ||
| 295 | |||
| 296 | # | ||
| 297 | # Ethernet (10000 Mbit) | ||
| 298 | # | ||
| 299 | |||
| 300 | # | ||
| 301 | # Token Ring devices | ||
| 302 | # | ||
| 303 | |||
| 304 | # | ||
| 305 | # Wireless LAN (non-hamradio) | ||
| 306 | # | ||
| 307 | # CONFIG_NET_RADIO is not set | ||
| 308 | |||
| 309 | # | ||
| 310 | # Wan interfaces | ||
| 311 | # | ||
| 312 | # CONFIG_WAN is not set | ||
| 313 | CONFIG_PPP=y | ||
| 314 | # CONFIG_PPP_MULTILINK is not set | ||
| 315 | # CONFIG_PPP_FILTER is not set | ||
| 316 | CONFIG_PPP_ASYNC=y | ||
| 317 | CONFIG_PPP_SYNC_TTY=y | ||
| 318 | CONFIG_PPP_DEFLATE=y | ||
| 319 | # CONFIG_PPP_BSDCOMP is not set | ||
| 320 | # CONFIG_PPPOE is not set | ||
| 321 | # CONFIG_SLIP is not set | ||
| 322 | # CONFIG_SHAPER is not set | ||
| 323 | # CONFIG_NETCONSOLE is not set | ||
| 324 | |||
| 325 | # | ||
| 326 | # ISDN subsystem | ||
| 327 | # | ||
| 328 | # CONFIG_ISDN is not set | ||
| 329 | |||
| 330 | # | ||
| 331 | # Telephony Support | ||
| 332 | # | ||
| 333 | # CONFIG_PHONE is not set | ||
| 334 | |||
| 335 | # | ||
| 336 | # Input device support | ||
| 337 | # | ||
| 338 | # CONFIG_INPUT is not set | ||
| 339 | |||
| 340 | # | ||
| 341 | # Hardware I/O ports | ||
| 342 | # | ||
| 343 | # CONFIG_SERIO is not set | ||
| 344 | # CONFIG_GAMEPORT is not set | ||
| 345 | |||
| 346 | # | ||
| 347 | # Character devices | ||
| 348 | # | ||
| 349 | # CONFIG_VT is not set | ||
| 350 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
| 351 | |||
| 352 | # | ||
| 353 | # Serial drivers | ||
| 354 | # | ||
| 355 | # CONFIG_SERIAL_8250 is not set | ||
| 356 | |||
| 357 | # | ||
| 358 | # Non-8250 serial port support | ||
| 359 | # | ||
| 360 | CONFIG_SERIAL_CORE=y | ||
| 361 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 362 | CONFIG_SERIAL_CPM=y | ||
| 363 | CONFIG_SERIAL_CPM_CONSOLE=y | ||
| 364 | # CONFIG_SERIAL_CPM_SCC1 is not set | ||
| 365 | # CONFIG_SERIAL_CPM_SCC2 is not set | ||
| 366 | # CONFIG_SERIAL_CPM_SCC3 is not set | ||
| 367 | # CONFIG_SERIAL_CPM_SCC4 is not set | ||
| 368 | CONFIG_SERIAL_CPM_SMC1=y | ||
| 369 | CONFIG_SERIAL_CPM_SMC2=y | ||
| 370 | CONFIG_UNIX98_PTYS=y | ||
| 371 | # CONFIG_LEGACY_PTYS is not set | ||
| 372 | |||
| 373 | # | ||
| 374 | # IPMI | ||
| 375 | # | ||
| 376 | # CONFIG_IPMI_HANDLER is not set | ||
| 377 | |||
| 378 | # | ||
| 379 | # Watchdog Cards | ||
| 380 | # | ||
| 381 | # CONFIG_WATCHDOG is not set | ||
| 382 | # CONFIG_NVRAM is not set | ||
| 383 | # CONFIG_GEN_RTC is not set | ||
| 384 | # CONFIG_DTLK is not set | ||
| 385 | # CONFIG_R3964 is not set | ||
| 386 | |||
| 387 | # | ||
| 388 | # Ftape, the floppy tape device driver | ||
| 389 | # | ||
| 390 | # CONFIG_AGP is not set | ||
| 391 | # CONFIG_DRM is not set | ||
| 392 | # CONFIG_RAW_DRIVER is not set | ||
| 393 | |||
| 394 | # | ||
| 395 | # TPM devices | ||
| 396 | # | ||
| 397 | |||
| 398 | # | ||
| 399 | # I2C support | ||
| 400 | # | ||
| 401 | # CONFIG_I2C is not set | ||
| 402 | |||
| 403 | # | ||
| 404 | # Dallas's 1-wire bus | ||
| 405 | # | ||
| 406 | # CONFIG_W1 is not set | ||
| 407 | |||
| 408 | # | ||
| 409 | # Misc devices | ||
| 410 | # | ||
| 411 | |||
| 412 | # | ||
| 413 | # Multimedia devices | ||
| 414 | # | ||
| 415 | # CONFIG_VIDEO_DEV is not set | ||
| 416 | |||
| 417 | # | ||
| 418 | # Digital Video Broadcasting Devices | ||
| 419 | # | ||
| 420 | # CONFIG_DVB is not set | ||
| 421 | |||
| 422 | # | ||
| 423 | # Graphics support | ||
| 424 | # | ||
| 425 | # CONFIG_FB is not set | ||
| 426 | |||
| 427 | # | ||
| 428 | # Sound | ||
| 429 | # | ||
| 430 | # CONFIG_SOUND is not set | ||
| 431 | |||
| 432 | # | ||
| 433 | # USB support | ||
| 434 | # | ||
| 435 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
| 436 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
| 437 | |||
| 438 | # | ||
| 439 | # USB Gadget Support | ||
| 440 | # | ||
| 441 | # CONFIG_USB_GADGET is not set | ||
| 442 | |||
| 443 | # | ||
| 444 | # MMC/SD Card support | ||
| 445 | # | ||
| 446 | # CONFIG_MMC is not set | ||
| 447 | |||
| 448 | # | ||
| 449 | # InfiniBand support | ||
| 450 | # | ||
| 451 | # CONFIG_INFINIBAND is not set | ||
| 452 | |||
| 453 | # | ||
| 454 | # File systems | ||
| 455 | # | ||
| 456 | CONFIG_EXT2_FS=y | ||
| 457 | CONFIG_EXT2_FS_XATTR=y | ||
| 458 | # CONFIG_EXT2_FS_POSIX_ACL is not set | ||
| 459 | # CONFIG_EXT2_FS_SECURITY is not set | ||
| 460 | CONFIG_EXT3_FS=y | ||
| 461 | CONFIG_EXT3_FS_XATTR=y | ||
| 462 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
| 463 | # CONFIG_EXT3_FS_SECURITY is not set | ||
| 464 | CONFIG_JBD=y | ||
| 465 | # CONFIG_JBD_DEBUG is not set | ||
| 466 | CONFIG_FS_MBCACHE=y | ||
| 467 | # CONFIG_REISERFS_FS is not set | ||
| 468 | # CONFIG_JFS_FS is not set | ||
| 469 | |||
| 470 | # | ||
| 471 | # XFS support | ||
| 472 | # | ||
| 473 | # CONFIG_XFS_FS is not set | ||
| 474 | # CONFIG_MINIX_FS is not set | ||
| 475 | # CONFIG_ROMFS_FS is not set | ||
| 476 | # CONFIG_QUOTA is not set | ||
| 477 | # CONFIG_DNOTIFY is not set | ||
| 478 | # CONFIG_AUTOFS_FS is not set | ||
| 479 | # CONFIG_AUTOFS4_FS is not set | ||
| 480 | |||
| 481 | # | ||
| 482 | # CD-ROM/DVD Filesystems | ||
| 483 | # | ||
| 484 | # CONFIG_ISO9660_FS is not set | ||
| 485 | # CONFIG_UDF_FS is not set | ||
| 486 | |||
| 487 | # | ||
| 488 | # DOS/FAT/NT Filesystems | ||
| 489 | # | ||
| 490 | # CONFIG_MSDOS_FS is not set | ||
| 491 | # CONFIG_VFAT_FS is not set | ||
| 492 | # CONFIG_NTFS_FS is not set | ||
| 493 | |||
| 494 | # | ||
| 495 | # Pseudo filesystems | ||
| 496 | # | ||
| 497 | CONFIG_PROC_FS=y | ||
| 498 | # CONFIG_PROC_KCORE is not set | ||
| 499 | CONFIG_SYSFS=y | ||
| 500 | # CONFIG_DEVFS_FS is not set | ||
| 501 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
| 502 | # CONFIG_TMPFS is not set | ||
| 503 | # CONFIG_HUGETLBFS is not set | ||
| 504 | # CONFIG_HUGETLB_PAGE is not set | ||
| 505 | CONFIG_RAMFS=y | ||
| 506 | |||
| 507 | # | ||
| 508 | # Miscellaneous filesystems | ||
| 509 | # | ||
| 510 | # CONFIG_ADFS_FS is not set | ||
| 511 | # CONFIG_AFFS_FS is not set | ||
| 512 | # CONFIG_HFS_FS is not set | ||
| 513 | # CONFIG_HFSPLUS_FS is not set | ||
| 514 | # CONFIG_BEFS_FS is not set | ||
| 515 | # CONFIG_BFS_FS is not set | ||
| 516 | # CONFIG_EFS_FS is not set | ||
| 517 | # CONFIG_CRAMFS is not set | ||
| 518 | # CONFIG_VXFS_FS is not set | ||
| 519 | # CONFIG_HPFS_FS is not set | ||
| 520 | # CONFIG_QNX4FS_FS is not set | ||
| 521 | # CONFIG_SYSV_FS is not set | ||
| 522 | # CONFIG_UFS_FS is not set | ||
| 523 | |||
| 524 | # | ||
| 525 | # Network File Systems | ||
| 526 | # | ||
| 527 | CONFIG_NFS_FS=y | ||
| 528 | # CONFIG_NFS_V3 is not set | ||
| 529 | # CONFIG_NFS_V4 is not set | ||
| 530 | # CONFIG_NFS_DIRECTIO is not set | ||
| 531 | # CONFIG_NFSD is not set | ||
| 532 | CONFIG_ROOT_NFS=y | ||
| 533 | CONFIG_LOCKD=y | ||
| 534 | CONFIG_SUNRPC=y | ||
| 535 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
| 536 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
| 537 | # CONFIG_SMB_FS is not set | ||
| 538 | # CONFIG_CIFS is not set | ||
| 539 | # CONFIG_NCP_FS is not set | ||
| 540 | # CONFIG_CODA_FS is not set | ||
| 541 | # CONFIG_AFS_FS is not set | ||
| 542 | |||
| 543 | # | ||
| 544 | # Partition Types | ||
| 545 | # | ||
| 546 | CONFIG_PARTITION_ADVANCED=y | ||
| 547 | # CONFIG_ACORN_PARTITION is not set | ||
| 548 | # CONFIG_OSF_PARTITION is not set | ||
| 549 | # CONFIG_AMIGA_PARTITION is not set | ||
| 550 | # CONFIG_ATARI_PARTITION is not set | ||
| 551 | # CONFIG_MAC_PARTITION is not set | ||
| 552 | CONFIG_MSDOS_PARTITION=y | ||
| 553 | # CONFIG_BSD_DISKLABEL is not set | ||
| 554 | # CONFIG_MINIX_SUBPARTITION is not set | ||
| 555 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
| 556 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
| 557 | # CONFIG_LDM_PARTITION is not set | ||
| 558 | # CONFIG_SGI_PARTITION is not set | ||
| 559 | # CONFIG_ULTRIX_PARTITION is not set | ||
| 560 | # CONFIG_SUN_PARTITION is not set | ||
| 561 | # CONFIG_EFI_PARTITION is not set | ||
| 562 | |||
| 563 | # | ||
| 564 | # Native Language Support | ||
| 565 | # | ||
| 566 | # CONFIG_NLS is not set | ||
| 567 | |||
| 568 | # | ||
| 569 | # MPC8xx CPM Options | ||
| 570 | # | ||
| 571 | CONFIG_SCC_ENET=y | ||
| 572 | # CONFIG_SCC1_ENET is not set | ||
| 573 | # CONFIG_SCC2_ENET is not set | ||
| 574 | CONFIG_SCC3_ENET=y | ||
| 575 | # CONFIG_FEC_ENET is not set | ||
| 576 | # CONFIG_ENET_BIG_BUFFERS is not set | ||
| 577 | |||
| 578 | # | ||
| 579 | # Generic MPC8xx Options | ||
| 580 | # | ||
| 581 | CONFIG_8xx_COPYBACK=y | ||
| 582 | CONFIG_8xx_CPU6=y | ||
| 583 | CONFIG_NO_UCODE_PATCH=y | ||
| 584 | # CONFIG_USB_SOF_UCODE_PATCH is not set | ||
| 585 | # CONFIG_I2C_SPI_UCODE_PATCH is not set | ||
| 586 | # CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set | ||
| 587 | |||
| 588 | # | ||
| 589 | # Library routines | ||
| 590 | # | ||
| 591 | CONFIG_CRC_CCITT=y | ||
| 592 | # CONFIG_CRC32 is not set | ||
| 593 | # CONFIG_LIBCRC32C is not set | ||
| 594 | CONFIG_ZLIB_INFLATE=y | ||
| 595 | CONFIG_ZLIB_DEFLATE=y | ||
| 596 | |||
| 597 | # | ||
| 598 | # Profiling support | ||
| 599 | # | ||
| 600 | # CONFIG_PROFILING is not set | ||
| 601 | |||
| 602 | # | ||
| 603 | # Kernel hacking | ||
| 604 | # | ||
| 605 | # CONFIG_PRINTK_TIME is not set | ||
| 606 | # CONFIG_DEBUG_KERNEL is not set | ||
| 607 | CONFIG_LOG_BUF_SHIFT=14 | ||
| 608 | |||
| 609 | # | ||
| 610 | # Security options | ||
| 611 | # | ||
| 612 | # CONFIG_KEYS is not set | ||
| 613 | # CONFIG_SECURITY is not set | ||
| 614 | |||
| 615 | # | ||
| 616 | # Cryptographic options | ||
| 617 | # | ||
| 618 | # CONFIG_CRYPTO is not set | ||
| 619 | |||
| 620 | # | ||
| 621 | # Hardware crypto devices | ||
| 622 | # | ||
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c index 735866559199..bf4ddca5e853 100644 --- a/arch/ppc/kernel/time.c +++ b/arch/ppc/kernel/time.c | |||
| @@ -89,6 +89,9 @@ unsigned long tb_to_ns_scale; | |||
| 89 | 89 | ||
| 90 | extern unsigned long wall_jiffies; | 90 | extern unsigned long wall_jiffies; |
| 91 | 91 | ||
| 92 | /* used for timezone offset */ | ||
| 93 | static long timezone_offset; | ||
| 94 | |||
| 92 | DEFINE_SPINLOCK(rtc_lock); | 95 | DEFINE_SPINLOCK(rtc_lock); |
| 93 | 96 | ||
| 94 | EXPORT_SYMBOL(rtc_lock); | 97 | EXPORT_SYMBOL(rtc_lock); |
| @@ -170,7 +173,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
| 170 | xtime.tv_sec - last_rtc_update >= 659 && | 173 | xtime.tv_sec - last_rtc_update >= 659 && |
| 171 | abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ && | 174 | abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ && |
| 172 | jiffies - wall_jiffies == 1) { | 175 | jiffies - wall_jiffies == 1) { |
| 173 | if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0) | 176 | if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0) |
| 174 | last_rtc_update = xtime.tv_sec+1; | 177 | last_rtc_update = xtime.tv_sec+1; |
| 175 | else | 178 | else |
| 176 | /* Try again one minute later */ | 179 | /* Try again one minute later */ |
| @@ -286,7 +289,7 @@ void __init time_init(void) | |||
| 286 | unsigned old_stamp, stamp, elapsed; | 289 | unsigned old_stamp, stamp, elapsed; |
| 287 | 290 | ||
| 288 | if (ppc_md.time_init != NULL) | 291 | if (ppc_md.time_init != NULL) |
| 289 | time_offset = ppc_md.time_init(); | 292 | timezone_offset = ppc_md.time_init(); |
| 290 | 293 | ||
| 291 | if (__USE_RTC()) { | 294 | if (__USE_RTC()) { |
| 292 | /* 601 processor: dec counts down by 128 every 128ns */ | 295 | /* 601 processor: dec counts down by 128 every 128ns */ |
| @@ -331,10 +334,10 @@ void __init time_init(void) | |||
| 331 | set_dec(tb_ticks_per_jiffy); | 334 | set_dec(tb_ticks_per_jiffy); |
| 332 | 335 | ||
| 333 | /* If platform provided a timezone (pmac), we correct the time */ | 336 | /* If platform provided a timezone (pmac), we correct the time */ |
| 334 | if (time_offset) { | 337 | if (timezone_offset) { |
| 335 | sys_tz.tz_minuteswest = -time_offset / 60; | 338 | sys_tz.tz_minuteswest = -timezone_offset / 60; |
| 336 | sys_tz.tz_dsttime = 0; | 339 | sys_tz.tz_dsttime = 0; |
| 337 | xtime.tv_sec -= time_offset; | 340 | xtime.tv_sec -= timezone_offset; |
| 338 | } | 341 | } |
| 339 | set_normalized_timespec(&wall_to_monotonic, | 342 | set_normalized_timespec(&wall_to_monotonic, |
| 340 | -xtime.tv_sec, -xtime.tv_nsec); | 343 | -xtime.tv_sec, -xtime.tv_nsec); |
diff --git a/arch/ppc/platforms/fads.h b/arch/ppc/platforms/fads.h index 632b8178ce66..b60c56450b67 100644 --- a/arch/ppc/platforms/fads.h +++ b/arch/ppc/platforms/fads.h | |||
| @@ -3,7 +3,18 @@ | |||
| 3 | * the Motorola 860T FADS board. Copied from the MBX stuff. | 3 | * the Motorola 860T FADS board. Copied from the MBX stuff. |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 1998 Dan Malek (dmalek@jlc.net) | 5 | * Copyright (c) 1998 Dan Malek (dmalek@jlc.net) |
| 6 | * | ||
| 7 | * Added MPC86XADS support. | ||
| 8 | * The MPC86xADS manual says the board "is compatible with the MPC8xxFADS | ||
| 9 | * for SW point of view". This is 99% correct. | ||
| 10 | * | ||
| 11 | * Author: MontaVista Software, Inc. | ||
| 12 | * source@mvista.com | ||
| 13 | * 2005 (c) MontaVista Software, Inc. This file is licensed under the | ||
| 14 | * terms of the GNU General Public License version 2. This program is licensed | ||
| 15 | * "as is" without any warranty of any kind, whether express or implied. | ||
| 6 | */ | 16 | */ |
| 17 | |||
| 7 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
| 8 | #ifndef __ASM_FADS_H__ | 19 | #ifndef __ASM_FADS_H__ |
| 9 | #define __ASM_FADS_H__ | 20 | #define __ASM_FADS_H__ |
| @@ -12,18 +23,45 @@ | |||
| 12 | 23 | ||
| 13 | #include <asm/ppcboot.h> | 24 | #include <asm/ppcboot.h> |
| 14 | 25 | ||
| 26 | #if defined(CONFIG_MPC86XADS) | ||
| 27 | |||
| 28 | /* U-Boot maps BCSR to 0xff080000 */ | ||
| 29 | #define BCSR_ADDR ((uint)0xff080000) | ||
| 30 | |||
| 31 | /* MPC86XADS has one more CPLD and an additional BCSR. | ||
| 32 | */ | ||
| 33 | #define CFG_PHYDEV_ADDR ((uint)0xff0a0000) | ||
| 34 | #define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300)) | ||
| 35 | |||
| 36 | #define BCSR5_T1_RST 0x10 | ||
| 37 | #define BCSR5_ATM155_RST 0x08 | ||
| 38 | #define BCSR5_ATM25_RST 0x04 | ||
| 39 | #define BCSR5_MII1_EN 0x02 | ||
| 40 | #define BCSR5_MII1_RST 0x01 | ||
| 41 | |||
| 42 | /* There is no PHY link change interrupt */ | ||
| 43 | #define PHY_INTERRUPT (-1) | ||
| 44 | |||
| 45 | #else /* FADS */ | ||
| 46 | |||
| 15 | /* Memory map is configured by the PROM startup. | 47 | /* Memory map is configured by the PROM startup. |
| 16 | * I tried to follow the FADS manual, although the startup PROM | 48 | * I tried to follow the FADS manual, although the startup PROM |
| 17 | * dictates this and we simply have to move some of the physical | 49 | * dictates this and we simply have to move some of the physical |
| 18 | * addresses for Linux. | 50 | * addresses for Linux. |
| 19 | */ | 51 | */ |
| 20 | #define BCSR_ADDR ((uint)0xff010000) | 52 | #define BCSR_ADDR ((uint)0xff010000) |
| 53 | |||
| 54 | /* PHY link change interrupt */ | ||
| 55 | #define PHY_INTERRUPT SIU_IRQ2 | ||
| 56 | |||
| 57 | #endif /* CONFIG_MPC86XADS */ | ||
| 58 | |||
| 21 | #define BCSR_SIZE ((uint)(64 * 1024)) | 59 | #define BCSR_SIZE ((uint)(64 * 1024)) |
| 22 | #define BCSR0 ((uint)0xff010000) | 60 | #define BCSR0 ((uint)(BCSR_ADDR + 0x00)) |
| 23 | #define BCSR1 ((uint)0xff010004) | 61 | #define BCSR1 ((uint)(BCSR_ADDR + 0x04)) |
| 24 | #define BCSR2 ((uint)0xff010008) | 62 | #define BCSR2 ((uint)(BCSR_ADDR + 0x08)) |
| 25 | #define BCSR3 ((uint)0xff01000c) | 63 | #define BCSR3 ((uint)(BCSR_ADDR + 0x0c)) |
| 26 | #define BCSR4 ((uint)0xff010010) | 64 | #define BCSR4 ((uint)(BCSR_ADDR + 0x10)) |
| 27 | 65 | ||
| 28 | #define IMAP_ADDR ((uint)0xff000000) | 66 | #define IMAP_ADDR ((uint)0xff000000) |
| 29 | #define IMAP_SIZE ((uint)(64 * 1024)) | 67 | #define IMAP_SIZE ((uint)(64 * 1024)) |
| @@ -34,8 +72,17 @@ | |||
| 34 | /* Bits of interest in the BCSRs. | 72 | /* Bits of interest in the BCSRs. |
| 35 | */ | 73 | */ |
| 36 | #define BCSR1_ETHEN ((uint)0x20000000) | 74 | #define BCSR1_ETHEN ((uint)0x20000000) |
| 75 | #define BCSR1_IRDAEN ((uint)0x10000000) | ||
| 37 | #define BCSR1_RS232EN_1 ((uint)0x01000000) | 76 | #define BCSR1_RS232EN_1 ((uint)0x01000000) |
| 77 | #define BCSR1_PCCEN ((uint)0x00800000) | ||
| 78 | #define BCSR1_PCCVCC0 ((uint)0x00400000) | ||
| 79 | #define BCSR1_PCCVPP0 ((uint)0x00200000) | ||
| 80 | #define BCSR1_PCCVPP1 ((uint)0x00100000) | ||
| 81 | #define BCSR1_PCCVPP_MASK (BCSR1_PCCVPP0 | BCSR1_PCCVPP1) | ||
| 38 | #define BCSR1_RS232EN_2 ((uint)0x00040000) | 82 | #define BCSR1_RS232EN_2 ((uint)0x00040000) |
| 83 | #define BCSR1_PCCVCC1 ((uint)0x00010000) | ||
| 84 | #define BCSR1_PCCVCC_MASK (BCSR1_PCCVCC0 | BCSR1_PCCVCC1) | ||
| 85 | |||
| 39 | #define BCSR4_ETHLOOP ((uint)0x80000000) /* EEST Loopback */ | 86 | #define BCSR4_ETHLOOP ((uint)0x80000000) /* EEST Loopback */ |
| 40 | #define BCSR4_EEFDX ((uint)0x40000000) /* EEST FDX enable */ | 87 | #define BCSR4_EEFDX ((uint)0x40000000) /* EEST FDX enable */ |
| 41 | #define BCSR4_FETH_EN ((uint)0x08000000) /* PHY enable */ | 88 | #define BCSR4_FETH_EN ((uint)0x08000000) /* PHY enable */ |
| @@ -44,14 +91,64 @@ | |||
| 44 | #define BCSR4_FETHFDE ((uint)0x02000000) /* PHY FDX advertise */ | 91 | #define BCSR4_FETHFDE ((uint)0x02000000) /* PHY FDX advertise */ |
| 45 | #define BCSR4_FETHRST ((uint)0x00200000) /* PHY Reset */ | 92 | #define BCSR4_FETHRST ((uint)0x00200000) /* PHY Reset */ |
| 46 | 93 | ||
| 94 | /* IO_BASE definition for pcmcia. | ||
| 95 | */ | ||
| 96 | #define _IO_BASE 0x80000000 | ||
| 97 | #define _IO_BASE_SIZE 0x1000 | ||
| 98 | |||
| 99 | #ifdef CONFIG_IDE | ||
| 100 | #define MAX_HWIFS 1 | ||
| 101 | #endif | ||
| 102 | |||
| 47 | /* Interrupt level assignments. | 103 | /* Interrupt level assignments. |
| 48 | */ | 104 | */ |
| 49 | #define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */ | 105 | #define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */ |
| 50 | #define PHY_INTERRUPT SIU_IRQ2 /* PHY link change interrupt */ | ||
| 51 | 106 | ||
| 52 | /* We don't use the 8259. | 107 | /* We don't use the 8259. |
| 53 | */ | 108 | */ |
| 54 | #define NR_8259_INTS 0 | 109 | #define NR_8259_INTS 0 |
| 55 | 110 | ||
| 111 | /* CPM Ethernet through SCC1 or SCC2 */ | ||
| 112 | |||
| 113 | #ifdef CONFIG_SCC1_ENET /* Probably 860 variant */ | ||
| 114 | /* Bits in parallel I/O port registers that have to be set/cleared | ||
| 115 | * to configure the pins for SCC1 use. | ||
| 116 | * TCLK - CLK1, RCLK - CLK2. | ||
| 117 | */ | ||
| 118 | #define PA_ENET_RXD ((ushort)0x0001) | ||
| 119 | #define PA_ENET_TXD ((ushort)0x0002) | ||
| 120 | #define PA_ENET_TCLK ((ushort)0x0100) | ||
| 121 | #define PA_ENET_RCLK ((ushort)0x0200) | ||
| 122 | #define PB_ENET_TENA ((uint)0x00001000) | ||
| 123 | #define PC_ENET_CLSN ((ushort)0x0010) | ||
| 124 | #define PC_ENET_RENA ((ushort)0x0020) | ||
| 125 | |||
| 126 | /* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to | ||
| 127 | * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero. | ||
| 128 | */ | ||
| 129 | #define SICR_ENET_MASK ((uint)0x000000ff) | ||
| 130 | #define SICR_ENET_CLKRT ((uint)0x0000002c) | ||
| 131 | #endif /* CONFIG_SCC1_ENET */ | ||
| 132 | |||
| 133 | #ifdef CONFIG_SCC2_ENET /* Probably 823/850 variant */ | ||
| 134 | /* Bits in parallel I/O port registers that have to be set/cleared | ||
| 135 | * to configure the pins for SCC1 use. | ||
| 136 | * TCLK - CLK1, RCLK - CLK2. | ||
| 137 | */ | ||
| 138 | #define PA_ENET_RXD ((ushort)0x0004) | ||
| 139 | #define PA_ENET_TXD ((ushort)0x0008) | ||
| 140 | #define PA_ENET_TCLK ((ushort)0x0400) | ||
| 141 | #define PA_ENET_RCLK ((ushort)0x0200) | ||
| 142 | #define PB_ENET_TENA ((uint)0x00002000) | ||
| 143 | #define PC_ENET_CLSN ((ushort)0x0040) | ||
| 144 | #define PC_ENET_RENA ((ushort)0x0080) | ||
| 145 | |||
| 146 | /* Control bits in the SICR to route TCLK and RCLK to | ||
| 147 | * SCC2. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero. | ||
| 148 | */ | ||
| 149 | #define SICR_ENET_MASK ((uint)0x0000ff00) | ||
| 150 | #define SICR_ENET_CLKRT ((uint)0x00002e00) | ||
| 151 | #endif /* CONFIG_SCC2_ENET */ | ||
| 152 | |||
| 56 | #endif /* __ASM_FADS_H__ */ | 153 | #endif /* __ASM_FADS_H__ */ |
| 57 | #endif /* __KERNEL__ */ | 154 | #endif /* __KERNEL__ */ |
diff --git a/arch/ppc/platforms/mpc885ads.h b/arch/ppc/platforms/mpc885ads.h new file mode 100644 index 000000000000..eb386635b0fd --- /dev/null +++ b/arch/ppc/platforms/mpc885ads.h | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | /* | ||
| 2 | * A collection of structures, addresses, and values associated with | ||
| 3 | * the Freescale MPC885ADS board. | ||
| 4 | * Copied from the FADS stuff. | ||
| 5 | * | ||
| 6 | * Author: MontaVista Software, Inc. | ||
| 7 | * source@mvista.com | ||
| 8 | * | ||
| 9 | * 2005 (c) MontaVista Software, Inc. This file is licensed under the | ||
| 10 | * terms of the GNU General Public License version 2. This program is licensed | ||
| 11 | * "as is" without any warranty of any kind, whether express or implied. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifdef __KERNEL__ | ||
| 15 | #ifndef __ASM_MPC885ADS_H__ | ||
| 16 | #define __ASM_MPC885ADS_H__ | ||
| 17 | |||
| 18 | #include <linux/config.h> | ||
| 19 | |||
| 20 | #include <asm/ppcboot.h> | ||
| 21 | |||
| 22 | /* U-Boot maps BCSR to 0xff080000 */ | ||
| 23 | #define BCSR_ADDR ((uint)0xff080000) | ||
| 24 | #define BCSR_SIZE ((uint)32) | ||
| 25 | #define BCSR0 ((uint)(BCSR_ADDR + 0x00)) | ||
| 26 | #define BCSR1 ((uint)(BCSR_ADDR + 0x04)) | ||
| 27 | #define BCSR2 ((uint)(BCSR_ADDR + 0x08)) | ||
| 28 | #define BCSR3 ((uint)(BCSR_ADDR + 0x0c)) | ||
| 29 | #define BCSR4 ((uint)(BCSR_ADDR + 0x10)) | ||
| 30 | |||
| 31 | #define CFG_PHYDEV_ADDR ((uint)0xff0a0000) | ||
| 32 | #define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300)) | ||
| 33 | |||
| 34 | #define IMAP_ADDR ((uint)0xff000000) | ||
| 35 | #define IMAP_SIZE ((uint)(64 * 1024)) | ||
| 36 | |||
| 37 | #define PCMCIA_MEM_ADDR ((uint)0xff020000) | ||
| 38 | #define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) | ||
| 39 | |||
| 40 | /* Bits of interest in the BCSRs. | ||
| 41 | */ | ||
| 42 | #define BCSR1_ETHEN ((uint)0x20000000) | ||
| 43 | #define BCSR1_IRDAEN ((uint)0x10000000) | ||
| 44 | #define BCSR1_RS232EN_1 ((uint)0x01000000) | ||
| 45 | #define BCSR1_PCCEN ((uint)0x00800000) | ||
| 46 | #define BCSR1_PCCVCC0 ((uint)0x00400000) | ||
| 47 | #define BCSR1_PCCVPP0 ((uint)0x00200000) | ||
| 48 | #define BCSR1_PCCVPP1 ((uint)0x00100000) | ||
| 49 | #define BCSR1_PCCVPP_MASK (BCSR1_PCCVPP0 | BCSR1_PCCVPP1) | ||
| 50 | #define BCSR1_RS232EN_2 ((uint)0x00040000) | ||
| 51 | #define BCSR1_PCCVCC1 ((uint)0x00010000) | ||
| 52 | #define BCSR1_PCCVCC_MASK (BCSR1_PCCVCC0 | BCSR1_PCCVCC1) | ||
| 53 | |||
| 54 | #define BCSR4_ETH10_RST ((uint)0x80000000) /* 10Base-T PHY reset*/ | ||
| 55 | #define BCSR4_USB_LO_SPD ((uint)0x04000000) | ||
| 56 | #define BCSR4_USB_VCC ((uint)0x02000000) | ||
| 57 | #define BCSR4_USB_FULL_SPD ((uint)0x00040000) | ||
| 58 | #define BCSR4_USB_EN ((uint)0x00020000) | ||
| 59 | |||
| 60 | #define BCSR5_MII2_EN 0x40 | ||
| 61 | #define BCSR5_MII2_RST 0x20 | ||
| 62 | #define BCSR5_T1_RST 0x10 | ||
| 63 | #define BCSR5_ATM155_RST 0x08 | ||
| 64 | #define BCSR5_ATM25_RST 0x04 | ||
| 65 | #define BCSR5_MII1_EN 0x02 | ||
| 66 | #define BCSR5_MII1_RST 0x01 | ||
| 67 | |||
| 68 | /* Interrupt level assignments */ | ||
| 69 | #define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */ | ||
| 70 | #define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */ | ||
| 71 | #define SIU_INT_FEC2 SIU_LEVEL3 /* FEC2 interrupt */ | ||
| 72 | #define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */ | ||
| 73 | |||
| 74 | /* We don't use the 8259 */ | ||
| 75 | #define NR_8259_INTS 0 | ||
| 76 | |||
| 77 | /* CPM Ethernet through SCC3 */ | ||
| 78 | #define PA_ENET_RXD ((ushort)0x0040) | ||
| 79 | #define PA_ENET_TXD ((ushort)0x0080) | ||
| 80 | #define PE_ENET_TCLK ((uint)0x00004000) | ||
| 81 | #define PE_ENET_RCLK ((uint)0x00008000) | ||
| 82 | #define PE_ENET_TENA ((uint)0x00000010) | ||
| 83 | #define PC_ENET_CLSN ((ushort)0x0400) | ||
| 84 | #define PC_ENET_RENA ((ushort)0x0800) | ||
| 85 | |||
| 86 | /* Control bits in the SICR to route TCLK (CLK5) and RCLK (CLK6) to | ||
| 87 | * SCC3. Also, make sure GR3 (bit 8) and SC3 (bit 9) are zero */ | ||
| 88 | #define SICR_ENET_MASK ((uint)0x00ff0000) | ||
| 89 | #define SICR_ENET_CLKRT ((uint)0x002c0000) | ||
| 90 | |||
| 91 | #endif /* __ASM_MPC885ADS_H__ */ | ||
| 92 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c index 05686fa73545..40086212b9c3 100644 --- a/arch/ppc/syslib/ppc4xx_pic.c +++ b/arch/ppc/syslib/ppc4xx_pic.c | |||
| @@ -110,6 +110,10 @@ static int ppc4xx_pic_get_irq(struct pt_regs *regs) | |||
| 110 | 110 | ||
| 111 | static void __init ppc4xx_pic_impl_init(void) | 111 | static void __init ppc4xx_pic_impl_init(void) |
| 112 | { | 112 | { |
| 113 | #if defined(CONFIG_440GX) | ||
| 114 | /* Disable 440GP compatibility mode if it was enabled in firmware */ | ||
| 115 | SDR_WRITE(DCRN_SDR_MFR, SDR_READ(DCRN_SDR_MFR) & ~DCRN_SDR_MFR_PCM); | ||
| 116 | #endif | ||
| 113 | /* Configure Base UIC */ | 117 | /* Configure Base UIC */ |
| 114 | mtdcr(DCRN_UIC_CR(UICB), 0); | 118 | mtdcr(DCRN_UIC_CR(UICB), 0); |
| 115 | mtdcr(DCRN_UIC_TR(UICB), 0); | 119 | mtdcr(DCRN_UIC_TR(UICB), 0); |
diff --git a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c index 1d2ff6d6b0b3..a3d519518fb8 100644 --- a/arch/ppc64/kernel/kprobes.c +++ b/arch/ppc64/kernel/kprobes.c | |||
| @@ -444,7 +444,7 @@ static struct kprobe trampoline_p = { | |||
| 444 | .pre_handler = trampoline_probe_handler | 444 | .pre_handler = trampoline_probe_handler |
| 445 | }; | 445 | }; |
| 446 | 446 | ||
| 447 | int __init arch_init(void) | 447 | int __init arch_init_kprobes(void) |
| 448 | { | 448 | { |
| 449 | return register_kprobe(&trampoline_p); | 449 | return register_kprobe(&trampoline_p); |
| 450 | } | 450 | } |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index e2b050eb3b96..d78bc13ebbb9 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
| @@ -444,6 +444,24 @@ config PRINTER | |||
| 444 | If you have more than 8 printers, you need to increase the LP_NO | 444 | If you have more than 8 printers, you need to increase the LP_NO |
| 445 | macro in lp.c and the PARPORT_MAX macro in parport.h. | 445 | macro in lp.c and the PARPORT_MAX macro in parport.h. |
| 446 | 446 | ||
| 447 | config PPDEV | ||
| 448 | tristate "Support for user-space parallel port device drivers" | ||
| 449 | depends on PARPORT | ||
| 450 | ---help--- | ||
| 451 | Saying Y to this adds support for /dev/parport device nodes. This | ||
| 452 | is needed for programs that want portable access to the parallel | ||
| 453 | port, for instance deviceid (which displays Plug-and-Play device | ||
| 454 | IDs). | ||
| 455 | |||
| 456 | This is the parallel port equivalent of SCSI generic support (sg). | ||
| 457 | It is safe to say N to this -- it is not needed for normal printing | ||
| 458 | or parallel port CD-ROM/disk support. | ||
| 459 | |||
| 460 | To compile this driver as a module, choose M here: the | ||
| 461 | module will be called ppdev. | ||
| 462 | |||
| 463 | If unsure, say N. | ||
| 464 | |||
| 447 | config ENVCTRL | 465 | config ENVCTRL |
| 448 | tristate "SUNW, envctrl support" | 466 | tristate "SUNW, envctrl support" |
| 449 | depends on PCI | 467 | depends on PCI |
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index eee516a71c14..d3973d8a7195 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
| @@ -553,13 +553,11 @@ do_ivec: | |||
| 553 | sllx %g3, 5, %g3 | 553 | sllx %g3, 5, %g3 |
| 554 | or %g2, %lo(ivector_table), %g2 | 554 | or %g2, %lo(ivector_table), %g2 |
| 555 | add %g2, %g3, %g3 | 555 | add %g2, %g3, %g3 |
| 556 | ldx [%g3 + 0x08], %g2 /* irq_info */ | ||
| 557 | ldub [%g3 + 0x04], %g4 /* pil */ | 556 | ldub [%g3 + 0x04], %g4 /* pil */ |
| 558 | brz,pn %g2, do_ivec_spurious | 557 | mov 1, %g2 |
| 559 | mov 1, %g2 | ||
| 560 | |||
| 561 | sllx %g2, %g4, %g2 | 558 | sllx %g2, %g4, %g2 |
| 562 | sllx %g4, 2, %g4 | 559 | sllx %g4, 2, %g4 |
| 560 | |||
| 563 | lduw [%g6 + %g4], %g5 /* g5 = irq_work(cpu, pil) */ | 561 | lduw [%g6 + %g4], %g5 /* g5 = irq_work(cpu, pil) */ |
| 564 | stw %g5, [%g3 + 0x00] /* bucket->irq_chain = g5 */ | 562 | stw %g5, [%g3 + 0x00] /* bucket->irq_chain = g5 */ |
| 565 | stw %g3, [%g6 + %g4] /* irq_work(cpu, pil) = bucket */ | 563 | stw %g3, [%g6 + %g4] /* irq_work(cpu, pil) = bucket */ |
| @@ -567,9 +565,9 @@ do_ivec: | |||
| 567 | retry | 565 | retry |
| 568 | do_ivec_xcall: | 566 | do_ivec_xcall: |
| 569 | mov 0x50, %g1 | 567 | mov 0x50, %g1 |
| 570 | |||
| 571 | ldxa [%g1 + %g0] ASI_INTR_R, %g1 | 568 | ldxa [%g1 + %g0] ASI_INTR_R, %g1 |
| 572 | srl %g3, 0, %g3 | 569 | srl %g3, 0, %g3 |
| 570 | |||
| 573 | mov 0x60, %g7 | 571 | mov 0x60, %g7 |
| 574 | ldxa [%g7 + %g0] ASI_INTR_R, %g7 | 572 | ldxa [%g7 + %g0] ASI_INTR_R, %g7 |
| 575 | stxa %g0, [%g0] ASI_INTR_RECEIVE | 573 | stxa %g0, [%g0] ASI_INTR_RECEIVE |
| @@ -581,19 +579,6 @@ do_ivec_xcall: | |||
| 581 | 1: jmpl %g3, %g0 | 579 | 1: jmpl %g3, %g0 |
| 582 | nop | 580 | nop |
| 583 | 581 | ||
| 584 | do_ivec_spurious: | ||
| 585 | stw %g3, [%g6 + 0x00] /* irq_work(cpu, 0) = bucket */ | ||
| 586 | rdpr %pstate, %g5 | ||
| 587 | |||
| 588 | wrpr %g5, PSTATE_IG | PSTATE_AG, %pstate | ||
| 589 | sethi %hi(109f), %g7 | ||
| 590 | ba,pt %xcc, etrap | ||
| 591 | 109: or %g7, %lo(109b), %g7 | ||
| 592 | call catch_disabled_ivec | ||
| 593 | add %sp, PTREGS_OFF, %o0 | ||
| 594 | ba,pt %xcc, rtrap | ||
| 595 | clr %l6 | ||
| 596 | |||
| 597 | .globl save_alternate_globals | 582 | .globl save_alternate_globals |
| 598 | save_alternate_globals: /* %o0 = save_area */ | 583 | save_alternate_globals: /* %o0 = save_area */ |
| 599 | rdpr %pstate, %o5 | 584 | rdpr %pstate, %o5 |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 424712577307..74a2e0808cbc 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
| @@ -71,31 +71,7 @@ struct irq_work_struct { | |||
| 71 | struct irq_work_struct __irq_work[NR_CPUS]; | 71 | struct irq_work_struct __irq_work[NR_CPUS]; |
| 72 | #define irq_work(__cpu, __pil) &(__irq_work[(__cpu)].irq_worklists[(__pil)]) | 72 | #define irq_work(__cpu, __pil) &(__irq_work[(__cpu)].irq_worklists[(__pil)]) |
| 73 | 73 | ||
| 74 | #ifdef CONFIG_PCI | 74 | static struct irqaction *irq_action[NR_IRQS+1]; |
| 75 | /* This is a table of physical addresses used to deal with IBF_DMA_SYNC. | ||
| 76 | * It is used for PCI only to synchronize DMA transfers with IRQ delivery | ||
| 77 | * for devices behind busses other than APB on Sabre systems. | ||
| 78 | * | ||
| 79 | * Currently these physical addresses are just config space accesses | ||
| 80 | * to the command register for that device. | ||
| 81 | */ | ||
| 82 | unsigned long pci_dma_wsync; | ||
| 83 | unsigned long dma_sync_reg_table[256]; | ||
| 84 | unsigned char dma_sync_reg_table_entry = 0; | ||
| 85 | #endif | ||
| 86 | |||
| 87 | /* This is based upon code in the 32-bit Sparc kernel written mostly by | ||
| 88 | * David Redman (djhr@tadpole.co.uk). | ||
| 89 | */ | ||
| 90 | #define MAX_STATIC_ALLOC 4 | ||
| 91 | static struct irqaction static_irqaction[MAX_STATIC_ALLOC]; | ||
| 92 | static int static_irq_count; | ||
| 93 | |||
| 94 | /* This is exported so that fast IRQ handlers can get at it... -DaveM */ | ||
| 95 | struct irqaction *irq_action[NR_IRQS+1] = { | ||
| 96 | NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL, | ||
| 97 | NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL | ||
| 98 | }; | ||
| 99 | 75 | ||
| 100 | /* This only synchronizes entities which modify IRQ handler | 76 | /* This only synchronizes entities which modify IRQ handler |
| 101 | * state and some selected user-level spots that want to | 77 | * state and some selected user-level spots that want to |
| @@ -241,17 +217,22 @@ void disable_irq(unsigned int irq) | |||
| 241 | * the CPU %tick register and not by some normal vectored interrupt | 217 | * the CPU %tick register and not by some normal vectored interrupt |
| 242 | * source. To handle this special case, we use this dummy INO bucket. | 218 | * source. To handle this special case, we use this dummy INO bucket. |
| 243 | */ | 219 | */ |
| 220 | static struct irq_desc pil0_dummy_desc; | ||
| 244 | static struct ino_bucket pil0_dummy_bucket = { | 221 | static struct ino_bucket pil0_dummy_bucket = { |
| 245 | 0, /* irq_chain */ | 222 | .irq_info = &pil0_dummy_desc, |
| 246 | 0, /* pil */ | ||
| 247 | 0, /* pending */ | ||
| 248 | 0, /* flags */ | ||
| 249 | 0, /* __unused */ | ||
| 250 | NULL, /* irq_info */ | ||
| 251 | 0UL, /* iclr */ | ||
| 252 | 0UL, /* imap */ | ||
| 253 | }; | 223 | }; |
| 254 | 224 | ||
| 225 | static void build_irq_error(const char *msg, unsigned int ino, int pil, int inofixup, | ||
| 226 | unsigned long iclr, unsigned long imap, | ||
| 227 | struct ino_bucket *bucket) | ||
| 228 | { | ||
| 229 | prom_printf("IRQ: INO %04x (%d:%016lx:%016lx) --> " | ||
| 230 | "(%d:%d:%016lx:%016lx), halting...\n", | ||
| 231 | ino, bucket->pil, bucket->iclr, bucket->imap, | ||
| 232 | pil, inofixup, iclr, imap); | ||
| 233 | prom_halt(); | ||
| 234 | } | ||
| 235 | |||
| 255 | unsigned int build_irq(int pil, int inofixup, unsigned long iclr, unsigned long imap) | 236 | unsigned int build_irq(int pil, int inofixup, unsigned long iclr, unsigned long imap) |
| 256 | { | 237 | { |
| 257 | struct ino_bucket *bucket; | 238 | struct ino_bucket *bucket; |
| @@ -280,28 +261,35 @@ unsigned int build_irq(int pil, int inofixup, unsigned long iclr, unsigned long | |||
| 280 | prom_halt(); | 261 | prom_halt(); |
| 281 | } | 262 | } |
| 282 | 263 | ||
| 283 | /* Ok, looks good, set it up. Don't touch the irq_chain or | ||
| 284 | * the pending flag. | ||
| 285 | */ | ||
| 286 | bucket = &ivector_table[ino]; | 264 | bucket = &ivector_table[ino]; |
| 287 | if ((bucket->flags & IBF_ACTIVE) || | 265 | if (bucket->flags & IBF_ACTIVE) |
| 288 | (bucket->irq_info != NULL)) { | 266 | build_irq_error("IRQ: Trying to build active INO bucket.\n", |
| 289 | /* This is a gross fatal error if it happens here. */ | 267 | ino, pil, inofixup, iclr, imap, bucket); |
| 290 | prom_printf("IRQ: Trying to reinit INO bucket, fatal error.\n"); | 268 | |
| 291 | prom_printf("IRQ: Request INO %04x (%d:%d:%016lx:%016lx)\n", | 269 | if (bucket->irq_info) { |
| 292 | ino, pil, inofixup, iclr, imap); | 270 | if (bucket->imap != imap || bucket->iclr != iclr) |
| 293 | prom_printf("IRQ: Existing (%d:%016lx:%016lx)\n", | 271 | build_irq_error("IRQ: Trying to reinit INO bucket.\n", |
| 294 | bucket->pil, bucket->iclr, bucket->imap); | 272 | ino, pil, inofixup, iclr, imap, bucket); |
| 295 | prom_printf("IRQ: Cannot continue, halting...\n"); | 273 | |
| 274 | goto out; | ||
| 275 | } | ||
| 276 | |||
| 277 | bucket->irq_info = kmalloc(sizeof(struct irq_desc), GFP_ATOMIC); | ||
| 278 | if (!bucket->irq_info) { | ||
| 279 | prom_printf("IRQ: Error, kmalloc(irq_desc) failed.\n"); | ||
| 296 | prom_halt(); | 280 | prom_halt(); |
| 297 | } | 281 | } |
| 282 | memset(bucket->irq_info, 0, sizeof(struct irq_desc)); | ||
| 283 | |||
| 284 | /* Ok, looks good, set it up. Don't touch the irq_chain or | ||
| 285 | * the pending flag. | ||
| 286 | */ | ||
| 298 | bucket->imap = imap; | 287 | bucket->imap = imap; |
| 299 | bucket->iclr = iclr; | 288 | bucket->iclr = iclr; |
| 300 | bucket->pil = pil; | 289 | bucket->pil = pil; |
| 301 | bucket->flags = 0; | 290 | bucket->flags = 0; |
| 302 | 291 | ||
| 303 | bucket->irq_info = NULL; | 292 | out: |
| 304 | |||
| 305 | return __irq(bucket); | 293 | return __irq(bucket); |
| 306 | } | 294 | } |
| 307 | 295 | ||
| @@ -319,26 +307,65 @@ static void atomic_bucket_insert(struct ino_bucket *bucket) | |||
| 319 | __asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate)); | 307 | __asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate)); |
| 320 | } | 308 | } |
| 321 | 309 | ||
| 310 | static int check_irq_sharing(int pil, unsigned long irqflags) | ||
| 311 | { | ||
| 312 | struct irqaction *action, *tmp; | ||
| 313 | |||
| 314 | action = *(irq_action + pil); | ||
| 315 | if (action) { | ||
| 316 | if ((action->flags & SA_SHIRQ) && (irqflags & SA_SHIRQ)) { | ||
| 317 | for (tmp = action; tmp->next; tmp = tmp->next) | ||
| 318 | ; | ||
| 319 | } else { | ||
| 320 | return -EBUSY; | ||
| 321 | } | ||
| 322 | } | ||
| 323 | return 0; | ||
| 324 | } | ||
| 325 | |||
| 326 | static void append_irq_action(int pil, struct irqaction *action) | ||
| 327 | { | ||
| 328 | struct irqaction **pp = irq_action + pil; | ||
| 329 | |||
| 330 | while (*pp) | ||
| 331 | pp = &((*pp)->next); | ||
| 332 | *pp = action; | ||
| 333 | } | ||
| 334 | |||
| 335 | static struct irqaction *get_action_slot(struct ino_bucket *bucket) | ||
| 336 | { | ||
| 337 | struct irq_desc *desc = bucket->irq_info; | ||
| 338 | int max_irq, i; | ||
| 339 | |||
| 340 | max_irq = 1; | ||
| 341 | if (bucket->flags & IBF_PCI) | ||
| 342 | max_irq = MAX_IRQ_DESC_ACTION; | ||
| 343 | for (i = 0; i < max_irq; i++) { | ||
| 344 | struct irqaction *p = &desc->action[i]; | ||
| 345 | u32 mask = (1 << i); | ||
| 346 | |||
| 347 | if (desc->action_active_mask & mask) | ||
| 348 | continue; | ||
| 349 | |||
| 350 | desc->action_active_mask |= mask; | ||
| 351 | return p; | ||
| 352 | } | ||
| 353 | return NULL; | ||
| 354 | } | ||
| 355 | |||
| 322 | int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), | 356 | int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), |
| 323 | unsigned long irqflags, const char *name, void *dev_id) | 357 | unsigned long irqflags, const char *name, void *dev_id) |
| 324 | { | 358 | { |
| 325 | struct irqaction *action, *tmp = NULL; | 359 | struct irqaction *action; |
| 326 | struct ino_bucket *bucket = __bucket(irq); | 360 | struct ino_bucket *bucket = __bucket(irq); |
| 327 | unsigned long flags; | 361 | unsigned long flags; |
| 328 | int pending = 0; | 362 | int pending = 0; |
| 329 | 363 | ||
| 330 | if ((bucket != &pil0_dummy_bucket) && | 364 | if (unlikely(!handler)) |
| 331 | (bucket < &ivector_table[0] || | ||
| 332 | bucket >= &ivector_table[NUM_IVECS])) { | ||
| 333 | unsigned int *caller; | ||
| 334 | |||
| 335 | __asm__ __volatile__("mov %%i7, %0" : "=r" (caller)); | ||
| 336 | printk(KERN_CRIT "request_irq: Old style IRQ registry attempt " | ||
| 337 | "from %p, irq %08x.\n", caller, irq); | ||
| 338 | return -EINVAL; | 365 | return -EINVAL; |
| 339 | } | 366 | |
| 340 | if (!handler) | 367 | if (unlikely(!bucket->irq_info)) |
| 341 | return -EINVAL; | 368 | return -ENODEV; |
| 342 | 369 | ||
| 343 | if ((bucket != &pil0_dummy_bucket) && (irqflags & SA_SAMPLE_RANDOM)) { | 370 | if ((bucket != &pil0_dummy_bucket) && (irqflags & SA_SAMPLE_RANDOM)) { |
| 344 | /* | 371 | /* |
| @@ -356,93 +383,20 @@ int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_ | |||
| 356 | 383 | ||
| 357 | spin_lock_irqsave(&irq_action_lock, flags); | 384 | spin_lock_irqsave(&irq_action_lock, flags); |
| 358 | 385 | ||
| 359 | action = *(bucket->pil + irq_action); | 386 | if (check_irq_sharing(bucket->pil, irqflags)) { |
| 360 | if (action) { | 387 | spin_unlock_irqrestore(&irq_action_lock, flags); |
| 361 | if ((action->flags & SA_SHIRQ) && (irqflags & SA_SHIRQ)) | 388 | return -EBUSY; |
| 362 | for (tmp = action; tmp->next; tmp = tmp->next) | ||
| 363 | ; | ||
| 364 | else { | ||
| 365 | spin_unlock_irqrestore(&irq_action_lock, flags); | ||
| 366 | return -EBUSY; | ||
| 367 | } | ||
| 368 | action = NULL; /* Or else! */ | ||
| 369 | } | 389 | } |
| 370 | 390 | ||
| 371 | /* If this is flagged as statically allocated then we use our | 391 | action = get_action_slot(bucket); |
| 372 | * private struct which is never freed. | ||
| 373 | */ | ||
| 374 | if (irqflags & SA_STATIC_ALLOC) { | ||
| 375 | if (static_irq_count < MAX_STATIC_ALLOC) | ||
| 376 | action = &static_irqaction[static_irq_count++]; | ||
| 377 | else | ||
| 378 | printk("Request for IRQ%d (%s) SA_STATIC_ALLOC failed " | ||
| 379 | "using kmalloc\n", irq, name); | ||
| 380 | } | ||
| 381 | if (action == NULL) | ||
| 382 | action = (struct irqaction *)kmalloc(sizeof(struct irqaction), | ||
| 383 | GFP_ATOMIC); | ||
| 384 | |||
| 385 | if (!action) { | 392 | if (!action) { |
| 386 | spin_unlock_irqrestore(&irq_action_lock, flags); | 393 | spin_unlock_irqrestore(&irq_action_lock, flags); |
| 387 | return -ENOMEM; | 394 | return -ENOMEM; |
| 388 | } | 395 | } |
| 389 | 396 | ||
| 390 | if (bucket == &pil0_dummy_bucket) { | 397 | bucket->flags |= IBF_ACTIVE; |
| 391 | bucket->irq_info = action; | 398 | pending = 0; |
| 392 | bucket->flags |= IBF_ACTIVE; | 399 | if (bucket != &pil0_dummy_bucket) { |
| 393 | } else { | ||
| 394 | if ((bucket->flags & IBF_ACTIVE) != 0) { | ||
| 395 | void *orig = bucket->irq_info; | ||
| 396 | void **vector = NULL; | ||
| 397 | |||
| 398 | if ((bucket->flags & IBF_PCI) == 0) { | ||
| 399 | printk("IRQ: Trying to share non-PCI bucket.\n"); | ||
| 400 | goto free_and_ebusy; | ||
| 401 | } | ||
| 402 | if ((bucket->flags & IBF_MULTI) == 0) { | ||
| 403 | vector = kmalloc(sizeof(void *) * 4, GFP_ATOMIC); | ||
| 404 | if (vector == NULL) | ||
| 405 | goto free_and_enomem; | ||
| 406 | |||
| 407 | /* We might have slept. */ | ||
| 408 | if ((bucket->flags & IBF_MULTI) != 0) { | ||
| 409 | int ent; | ||
| 410 | |||
| 411 | kfree(vector); | ||
| 412 | vector = (void **)bucket->irq_info; | ||
| 413 | for(ent = 0; ent < 4; ent++) { | ||
| 414 | if (vector[ent] == NULL) { | ||
| 415 | vector[ent] = action; | ||
| 416 | break; | ||
| 417 | } | ||
| 418 | } | ||
| 419 | if (ent == 4) | ||
| 420 | goto free_and_ebusy; | ||
| 421 | } else { | ||
| 422 | vector[0] = orig; | ||
| 423 | vector[1] = action; | ||
| 424 | vector[2] = NULL; | ||
| 425 | vector[3] = NULL; | ||
| 426 | bucket->irq_info = vector; | ||
| 427 | bucket->flags |= IBF_MULTI; | ||
| 428 | } | ||
| 429 | } else { | ||
| 430 | int ent; | ||
| 431 | |||
| 432 | vector = (void **)orig; | ||
| 433 | for (ent = 0; ent < 4; ent++) { | ||
| 434 | if (vector[ent] == NULL) { | ||
| 435 | vector[ent] = action; | ||
| 436 | break; | ||
| 437 | } | ||
| 438 | } | ||
| 439 | if (ent == 4) | ||
| 440 | goto free_and_ebusy; | ||
| 441 | } | ||
| 442 | } else { | ||
| 443 | bucket->irq_info = action; | ||
| 444 | bucket->flags |= IBF_ACTIVE; | ||
| 445 | } | ||
| 446 | pending = bucket->pending; | 400 | pending = bucket->pending; |
| 447 | if (pending) | 401 | if (pending) |
| 448 | bucket->pending = 0; | 402 | bucket->pending = 0; |
| @@ -456,10 +410,7 @@ int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_ | |||
| 456 | put_ino_in_irqaction(action, irq); | 410 | put_ino_in_irqaction(action, irq); |
| 457 | put_smpaff_in_irqaction(action, CPU_MASK_NONE); | 411 | put_smpaff_in_irqaction(action, CPU_MASK_NONE); |
| 458 | 412 | ||
| 459 | if (tmp) | 413 | append_irq_action(bucket->pil, action); |
| 460 | tmp->next = action; | ||
| 461 | else | ||
| 462 | *(bucket->pil + irq_action) = action; | ||
| 463 | 414 | ||
| 464 | enable_irq(irq); | 415 | enable_irq(irq); |
| 465 | 416 | ||
| @@ -468,147 +419,103 @@ int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_ | |||
| 468 | atomic_bucket_insert(bucket); | 419 | atomic_bucket_insert(bucket); |
| 469 | set_softint(1 << bucket->pil); | 420 | set_softint(1 << bucket->pil); |
| 470 | } | 421 | } |
| 422 | |||
| 471 | spin_unlock_irqrestore(&irq_action_lock, flags); | 423 | spin_unlock_irqrestore(&irq_action_lock, flags); |
| 472 | if ((bucket != &pil0_dummy_bucket) && (!(irqflags & SA_STATIC_ALLOC))) | 424 | |
| 425 | if (bucket != &pil0_dummy_bucket) | ||
| 473 | register_irq_proc(__irq_ino(irq)); | 426 | register_irq_proc(__irq_ino(irq)); |
| 474 | 427 | ||
| 475 | #ifdef CONFIG_SMP | 428 | #ifdef CONFIG_SMP |
| 476 | distribute_irqs(); | 429 | distribute_irqs(); |
| 477 | #endif | 430 | #endif |
| 478 | return 0; | 431 | return 0; |
| 479 | |||
| 480 | free_and_ebusy: | ||
| 481 | kfree(action); | ||
| 482 | spin_unlock_irqrestore(&irq_action_lock, flags); | ||
| 483 | return -EBUSY; | ||
| 484 | |||
| 485 | free_and_enomem: | ||
| 486 | kfree(action); | ||
| 487 | spin_unlock_irqrestore(&irq_action_lock, flags); | ||
| 488 | return -ENOMEM; | ||
| 489 | } | 432 | } |
| 490 | 433 | ||
| 491 | EXPORT_SYMBOL(request_irq); | 434 | EXPORT_SYMBOL(request_irq); |
| 492 | 435 | ||
| 493 | void free_irq(unsigned int irq, void *dev_id) | 436 | static struct irqaction *unlink_irq_action(unsigned int irq, void *dev_id) |
| 494 | { | 437 | { |
| 495 | struct irqaction *action; | 438 | struct ino_bucket *bucket = __bucket(irq); |
| 496 | struct irqaction *tmp = NULL; | 439 | struct irqaction *action, **pp; |
| 497 | unsigned long flags; | ||
| 498 | struct ino_bucket *bucket = __bucket(irq), *bp; | ||
| 499 | |||
| 500 | if ((bucket != &pil0_dummy_bucket) && | ||
| 501 | (bucket < &ivector_table[0] || | ||
| 502 | bucket >= &ivector_table[NUM_IVECS])) { | ||
| 503 | unsigned int *caller; | ||
| 504 | 440 | ||
| 505 | __asm__ __volatile__("mov %%i7, %0" : "=r" (caller)); | 441 | pp = irq_action + bucket->pil; |
| 506 | printk(KERN_CRIT "free_irq: Old style IRQ removal attempt " | 442 | action = *pp; |
| 507 | "from %p, irq %08x.\n", caller, irq); | 443 | if (unlikely(!action)) |
| 508 | return; | 444 | return NULL; |
| 509 | } | ||
| 510 | |||
| 511 | spin_lock_irqsave(&irq_action_lock, flags); | ||
| 512 | 445 | ||
| 513 | action = *(bucket->pil + irq_action); | 446 | if (unlikely(!action->handler)) { |
| 514 | if (!action->handler) { | ||
| 515 | printk("Freeing free IRQ %d\n", bucket->pil); | 447 | printk("Freeing free IRQ %d\n", bucket->pil); |
| 516 | return; | 448 | return NULL; |
| 517 | } | ||
| 518 | if (dev_id) { | ||
| 519 | for ( ; action; action = action->next) { | ||
| 520 | if (action->dev_id == dev_id) | ||
| 521 | break; | ||
| 522 | tmp = action; | ||
| 523 | } | ||
| 524 | if (!action) { | ||
| 525 | printk("Trying to free free shared IRQ %d\n", bucket->pil); | ||
| 526 | spin_unlock_irqrestore(&irq_action_lock, flags); | ||
| 527 | return; | ||
| 528 | } | ||
| 529 | } else if (action->flags & SA_SHIRQ) { | ||
| 530 | printk("Trying to free shared IRQ %d with NULL device ID\n", bucket->pil); | ||
| 531 | spin_unlock_irqrestore(&irq_action_lock, flags); | ||
| 532 | return; | ||
| 533 | } | 449 | } |
| 534 | 450 | ||
| 535 | if (action->flags & SA_STATIC_ALLOC) { | 451 | while (action && action->dev_id != dev_id) { |
| 536 | printk("Attempt to free statically allocated IRQ %d (%s)\n", | 452 | pp = &action->next; |
| 537 | bucket->pil, action->name); | 453 | action = *pp; |
| 538 | spin_unlock_irqrestore(&irq_action_lock, flags); | ||
| 539 | return; | ||
| 540 | } | 454 | } |
| 541 | 455 | ||
| 542 | if (action && tmp) | 456 | if (likely(action)) |
| 543 | tmp->next = action->next; | 457 | *pp = action->next; |
| 544 | else | 458 | |
| 545 | *(bucket->pil + irq_action) = action->next; | 459 | return action; |
| 460 | } | ||
| 461 | |||
| 462 | void free_irq(unsigned int irq, void *dev_id) | ||
| 463 | { | ||
| 464 | struct irqaction *action; | ||
| 465 | struct ino_bucket *bucket; | ||
| 466 | unsigned long flags; | ||
| 467 | |||
| 468 | spin_lock_irqsave(&irq_action_lock, flags); | ||
| 469 | |||
| 470 | action = unlink_irq_action(irq, dev_id); | ||
| 546 | 471 | ||
| 547 | spin_unlock_irqrestore(&irq_action_lock, flags); | 472 | spin_unlock_irqrestore(&irq_action_lock, flags); |
| 548 | 473 | ||
| 474 | if (unlikely(!action)) | ||
| 475 | return; | ||
| 476 | |||
| 549 | synchronize_irq(irq); | 477 | synchronize_irq(irq); |
| 550 | 478 | ||
| 551 | spin_lock_irqsave(&irq_action_lock, flags); | 479 | spin_lock_irqsave(&irq_action_lock, flags); |
| 552 | 480 | ||
| 481 | bucket = __bucket(irq); | ||
| 553 | if (bucket != &pil0_dummy_bucket) { | 482 | if (bucket != &pil0_dummy_bucket) { |
| 483 | struct irq_desc *desc = bucket->irq_info; | ||
| 554 | unsigned long imap = bucket->imap; | 484 | unsigned long imap = bucket->imap; |
| 555 | void **vector, *orig; | 485 | int ent, i; |
| 556 | int ent; | ||
| 557 | |||
| 558 | orig = bucket->irq_info; | ||
| 559 | vector = (void **)orig; | ||
| 560 | |||
| 561 | if ((bucket->flags & IBF_MULTI) != 0) { | ||
| 562 | int other = 0; | ||
| 563 | void *orphan = NULL; | ||
| 564 | for (ent = 0; ent < 4; ent++) { | ||
| 565 | if (vector[ent] == action) | ||
| 566 | vector[ent] = NULL; | ||
| 567 | else if (vector[ent] != NULL) { | ||
| 568 | orphan = vector[ent]; | ||
| 569 | other++; | ||
| 570 | } | ||
| 571 | } | ||
| 572 | 486 | ||
| 573 | /* Only free when no other shared irq | 487 | for (i = 0; i < MAX_IRQ_DESC_ACTION; i++) { |
| 574 | * uses this bucket. | 488 | struct irqaction *p = &desc->action[i]; |
| 575 | */ | 489 | |
| 576 | if (other) { | 490 | if (p == action) { |
| 577 | if (other == 1) { | 491 | desc->action_active_mask &= ~(1 << i); |
| 578 | /* Convert back to non-shared bucket. */ | 492 | break; |
| 579 | bucket->irq_info = orphan; | ||
| 580 | bucket->flags &= ~(IBF_MULTI); | ||
| 581 | kfree(vector); | ||
| 582 | } | ||
| 583 | goto out; | ||
| 584 | } | 493 | } |
| 585 | } else { | ||
| 586 | bucket->irq_info = NULL; | ||
| 587 | } | 494 | } |
| 588 | 495 | ||
| 589 | /* This unique interrupt source is now inactive. */ | 496 | if (!desc->action_active_mask) { |
| 590 | bucket->flags &= ~IBF_ACTIVE; | 497 | /* This unique interrupt source is now inactive. */ |
| 498 | bucket->flags &= ~IBF_ACTIVE; | ||
| 591 | 499 | ||
| 592 | /* See if any other buckets share this bucket's IMAP | 500 | /* See if any other buckets share this bucket's IMAP |
| 593 | * and are still active. | 501 | * and are still active. |
| 594 | */ | 502 | */ |
| 595 | for (ent = 0; ent < NUM_IVECS; ent++) { | 503 | for (ent = 0; ent < NUM_IVECS; ent++) { |
| 596 | bp = &ivector_table[ent]; | 504 | struct ino_bucket *bp = &ivector_table[ent]; |
| 597 | if (bp != bucket && | 505 | if (bp != bucket && |
| 598 | bp->imap == imap && | 506 | bp->imap == imap && |
| 599 | (bp->flags & IBF_ACTIVE) != 0) | 507 | (bp->flags & IBF_ACTIVE) != 0) |
| 600 | break; | 508 | break; |
| 601 | } | 509 | } |
| 602 | 510 | ||
| 603 | /* Only disable when no other sub-irq levels of | 511 | /* Only disable when no other sub-irq levels of |
| 604 | * the same IMAP are active. | 512 | * the same IMAP are active. |
| 605 | */ | 513 | */ |
| 606 | if (ent == NUM_IVECS) | 514 | if (ent == NUM_IVECS) |
| 607 | disable_irq(irq); | 515 | disable_irq(irq); |
| 516 | } | ||
| 608 | } | 517 | } |
| 609 | 518 | ||
| 610 | out: | ||
| 611 | kfree(action); | ||
| 612 | spin_unlock_irqrestore(&irq_action_lock, flags); | 519 | spin_unlock_irqrestore(&irq_action_lock, flags); |
| 613 | } | 520 | } |
| 614 | 521 | ||
| @@ -647,99 +554,55 @@ void synchronize_irq(unsigned int irq) | |||
| 647 | } | 554 | } |
| 648 | #endif /* CONFIG_SMP */ | 555 | #endif /* CONFIG_SMP */ |
| 649 | 556 | ||
| 650 | void catch_disabled_ivec(struct pt_regs *regs) | 557 | static void process_bucket(int irq, struct ino_bucket *bp, struct pt_regs *regs) |
| 651 | { | ||
| 652 | int cpu = smp_processor_id(); | ||
| 653 | struct ino_bucket *bucket = __bucket(*irq_work(cpu, 0)); | ||
| 654 | |||
| 655 | /* We can actually see this on Ultra/PCI PCI cards, which are bridges | ||
| 656 | * to other devices. Here a single IMAP enabled potentially multiple | ||
| 657 | * unique interrupt sources (which each do have a unique ICLR register. | ||
| 658 | * | ||
| 659 | * So what we do is just register that the IVEC arrived, when registered | ||
| 660 | * for real the request_irq() code will check the bit and signal | ||
| 661 | * a local CPU interrupt for it. | ||
| 662 | */ | ||
| 663 | #if 0 | ||
| 664 | printk("IVEC: Spurious interrupt vector (%x) received at (%016lx)\n", | ||
| 665 | bucket - &ivector_table[0], regs->tpc); | ||
| 666 | #endif | ||
| 667 | *irq_work(cpu, 0) = 0; | ||
| 668 | bucket->pending = 1; | ||
| 669 | } | ||
| 670 | |||
| 671 | /* Tune this... */ | ||
| 672 | #define FORWARD_VOLUME 12 | ||
| 673 | |||
| 674 | #ifdef CONFIG_SMP | ||
| 675 | |||
| 676 | static inline void redirect_intr(int cpu, struct ino_bucket *bp) | ||
| 677 | { | 558 | { |
| 678 | /* Ok, here is what is going on: | 559 | struct irq_desc *desc = bp->irq_info; |
| 679 | * 1) Retargeting IRQs on Starfire is very | 560 | unsigned char flags = bp->flags; |
| 680 | * expensive so just forget about it on them. | 561 | u32 action_mask, i; |
| 681 | * 2) Moving around very high priority interrupts | 562 | int random; |
| 682 | * is a losing game. | ||
| 683 | * 3) If the current cpu is idle, interrupts are | ||
| 684 | * useful work, so keep them here. But do not | ||
| 685 | * pass to our neighbour if he is not very idle. | ||
| 686 | * 4) If sysadmin explicitly asks for directed intrs, | ||
| 687 | * Just Do It. | ||
| 688 | */ | ||
| 689 | struct irqaction *ap = bp->irq_info; | ||
| 690 | cpumask_t cpu_mask; | ||
| 691 | unsigned int buddy, ticks; | ||
| 692 | 563 | ||
| 693 | cpu_mask = get_smpaff_in_irqaction(ap); | 564 | bp->flags |= IBF_INPROGRESS; |
| 694 | cpus_and(cpu_mask, cpu_mask, cpu_online_map); | ||
| 695 | if (cpus_empty(cpu_mask)) | ||
| 696 | cpu_mask = cpu_online_map; | ||
| 697 | 565 | ||
| 698 | if (this_is_starfire != 0 || | 566 | if (unlikely(!(flags & IBF_ACTIVE))) { |
| 699 | bp->pil >= 10 || current->pid == 0) | 567 | bp->pending = 1; |
| 700 | goto out; | 568 | goto out; |
| 701 | |||
| 702 | /* 'cpu' is the MID (ie. UPAID), calculate the MID | ||
| 703 | * of our buddy. | ||
| 704 | */ | ||
| 705 | buddy = cpu + 1; | ||
| 706 | if (buddy >= NR_CPUS) | ||
| 707 | buddy = 0; | ||
| 708 | |||
| 709 | ticks = 0; | ||
| 710 | while (!cpu_isset(buddy, cpu_mask)) { | ||
| 711 | if (++buddy >= NR_CPUS) | ||
| 712 | buddy = 0; | ||
| 713 | if (++ticks > NR_CPUS) { | ||
| 714 | put_smpaff_in_irqaction(ap, CPU_MASK_NONE); | ||
| 715 | goto out; | ||
| 716 | } | ||
| 717 | } | 569 | } |
| 718 | 570 | ||
| 719 | if (buddy == cpu) | 571 | if (desc->pre_handler) |
| 720 | goto out; | 572 | desc->pre_handler(bp, |
| 573 | desc->pre_handler_arg1, | ||
| 574 | desc->pre_handler_arg2); | ||
| 721 | 575 | ||
| 722 | /* Voo-doo programming. */ | 576 | action_mask = desc->action_active_mask; |
| 723 | if (cpu_data(buddy).idle_volume < FORWARD_VOLUME) | 577 | random = 0; |
| 724 | goto out; | 578 | for (i = 0; i < MAX_IRQ_DESC_ACTION; i++) { |
| 579 | struct irqaction *p = &desc->action[i]; | ||
| 580 | u32 mask = (1 << i); | ||
| 725 | 581 | ||
| 726 | /* This just so happens to be correct on Cheetah | 582 | if (!(action_mask & mask)) |
| 727 | * at the moment. | 583 | continue; |
| 728 | */ | 584 | |
| 729 | buddy <<= 26; | 585 | action_mask &= ~mask; |
| 730 | 586 | ||
| 731 | /* Push it to our buddy. */ | 587 | if (p->handler(__irq(bp), p->dev_id, regs) == IRQ_HANDLED) |
| 732 | upa_writel(buddy | IMAP_VALID, bp->imap); | 588 | random |= p->flags; |
| 733 | 589 | ||
| 590 | if (!action_mask) | ||
| 591 | break; | ||
| 592 | } | ||
| 593 | if (bp->pil != 0) { | ||
| 594 | upa_writel(ICLR_IDLE, bp->iclr); | ||
| 595 | /* Test and add entropy */ | ||
| 596 | if (random & SA_SAMPLE_RANDOM) | ||
| 597 | add_interrupt_randomness(irq); | ||
| 598 | } | ||
| 734 | out: | 599 | out: |
| 735 | return; | 600 | bp->flags &= ~IBF_INPROGRESS; |
| 736 | } | 601 | } |
| 737 | 602 | ||
| 738 | #endif | ||
| 739 | |||
| 740 | void handler_irq(int irq, struct pt_regs *regs) | 603 | void handler_irq(int irq, struct pt_regs *regs) |
| 741 | { | 604 | { |
| 742 | struct ino_bucket *bp, *nbp; | 605 | struct ino_bucket *bp; |
| 743 | int cpu = smp_processor_id(); | 606 | int cpu = smp_processor_id(); |
| 744 | 607 | ||
| 745 | #ifndef CONFIG_SMP | 608 | #ifndef CONFIG_SMP |
| @@ -757,8 +620,6 @@ void handler_irq(int irq, struct pt_regs *regs) | |||
| 757 | clear_softint(clr_mask); | 620 | clear_softint(clr_mask); |
| 758 | } | 621 | } |
| 759 | #else | 622 | #else |
| 760 | int should_forward = 0; | ||
| 761 | |||
| 762 | clear_softint(1 << irq); | 623 | clear_softint(1 << irq); |
| 763 | #endif | 624 | #endif |
| 764 | 625 | ||
| @@ -773,63 +634,12 @@ void handler_irq(int irq, struct pt_regs *regs) | |||
| 773 | #else | 634 | #else |
| 774 | bp = __bucket(xchg32(irq_work(cpu, irq), 0)); | 635 | bp = __bucket(xchg32(irq_work(cpu, irq), 0)); |
| 775 | #endif | 636 | #endif |
| 776 | for ( ; bp != NULL; bp = nbp) { | 637 | while (bp) { |
| 777 | unsigned char flags = bp->flags; | 638 | struct ino_bucket *nbp = __bucket(bp->irq_chain); |
| 778 | unsigned char random = 0; | ||
| 779 | 639 | ||
| 780 | nbp = __bucket(bp->irq_chain); | ||
| 781 | bp->irq_chain = 0; | 640 | bp->irq_chain = 0; |
| 782 | 641 | process_bucket(irq, bp, regs); | |
| 783 | bp->flags |= IBF_INPROGRESS; | 642 | bp = nbp; |
| 784 | |||
| 785 | if ((flags & IBF_ACTIVE) != 0) { | ||
| 786 | #ifdef CONFIG_PCI | ||
| 787 | if ((flags & IBF_DMA_SYNC) != 0) { | ||
| 788 | upa_readl(dma_sync_reg_table[bp->synctab_ent]); | ||
| 789 | upa_readq(pci_dma_wsync); | ||
| 790 | } | ||
| 791 | #endif | ||
| 792 | if ((flags & IBF_MULTI) == 0) { | ||
| 793 | struct irqaction *ap = bp->irq_info; | ||
| 794 | int ret; | ||
| 795 | |||
| 796 | ret = ap->handler(__irq(bp), ap->dev_id, regs); | ||
| 797 | if (ret == IRQ_HANDLED) | ||
| 798 | random |= ap->flags; | ||
| 799 | } else { | ||
| 800 | void **vector = (void **)bp->irq_info; | ||
| 801 | int ent; | ||
| 802 | for (ent = 0; ent < 4; ent++) { | ||
| 803 | struct irqaction *ap = vector[ent]; | ||
| 804 | if (ap != NULL) { | ||
| 805 | int ret; | ||
| 806 | |||
| 807 | ret = ap->handler(__irq(bp), | ||
| 808 | ap->dev_id, | ||
| 809 | regs); | ||
| 810 | if (ret == IRQ_HANDLED) | ||
| 811 | random |= ap->flags; | ||
| 812 | } | ||
| 813 | } | ||
| 814 | } | ||
| 815 | /* Only the dummy bucket lacks IMAP/ICLR. */ | ||
| 816 | if (bp->pil != 0) { | ||
| 817 | #ifdef CONFIG_SMP | ||
| 818 | if (should_forward) { | ||
| 819 | redirect_intr(cpu, bp); | ||
| 820 | should_forward = 0; | ||
| 821 | } | ||
| 822 | #endif | ||
| 823 | upa_writel(ICLR_IDLE, bp->iclr); | ||
| 824 | |||
| 825 | /* Test and add entropy */ | ||
| 826 | if (random & SA_SAMPLE_RANDOM) | ||
| 827 | add_interrupt_randomness(irq); | ||
| 828 | } | ||
| 829 | } else | ||
| 830 | bp->pending = 1; | ||
| 831 | |||
| 832 | bp->flags &= ~IBF_INPROGRESS; | ||
| 833 | } | 643 | } |
| 834 | irq_exit(); | 644 | irq_exit(); |
| 835 | } | 645 | } |
| @@ -959,7 +769,10 @@ static void distribute_irqs(void) | |||
| 959 | */ | 769 | */ |
| 960 | for (level = 1; level < NR_IRQS; level++) { | 770 | for (level = 1; level < NR_IRQS; level++) { |
| 961 | struct irqaction *p = irq_action[level]; | 771 | struct irqaction *p = irq_action[level]; |
| 962 | if (level == 12) continue; | 772 | |
| 773 | if (level == 12) | ||
| 774 | continue; | ||
| 775 | |||
| 963 | while(p) { | 776 | while(p) { |
| 964 | cpu = retarget_one_irq(p, cpu); | 777 | cpu = retarget_one_irq(p, cpu); |
| 965 | p = p->next; | 778 | p = p->next; |
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index bdac631cf011..bbf11f85dab1 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c | |||
| @@ -433,3 +433,8 @@ int longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) | |||
| 433 | return 0; | 433 | return 0; |
| 434 | } | 434 | } |
| 435 | 435 | ||
| 436 | /* architecture specific initialization */ | ||
| 437 | int arch_init_kprobes(void) | ||
| 438 | { | ||
| 439 | return 0; | ||
| 440 | } | ||
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index 534320ef0db2..91ab466d6c66 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c | |||
| @@ -1303,8 +1303,7 @@ static void psycho_controller_hwinit(struct pci_controller_info *p) | |||
| 1303 | { | 1303 | { |
| 1304 | u64 tmp; | 1304 | u64 tmp; |
| 1305 | 1305 | ||
| 1306 | /* PROM sets the IRQ retry value too low, increase it. */ | 1306 | psycho_write(p->pbm_A.controller_regs + PSYCHO_IRQ_RETRY, 5); |
| 1307 | psycho_write(p->pbm_A.controller_regs + PSYCHO_IRQ_RETRY, 0xff); | ||
| 1308 | 1307 | ||
| 1309 | /* Enable arbiter for all PCI slots. */ | 1308 | /* Enable arbiter for all PCI slots. */ |
| 1310 | tmp = psycho_read(p->pbm_A.controller_regs + PSYCHO_PCIA_CTRL); | 1309 | tmp = psycho_read(p->pbm_A.controller_regs + PSYCHO_PCIA_CTRL); |
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c index 53d333b4a4e8..52bf3431a422 100644 --- a/arch/sparc64/kernel/pci_sabre.c +++ b/arch/sparc64/kernel/pci_sabre.c | |||
| @@ -595,6 +595,23 @@ static int __init sabre_ino_to_pil(struct pci_dev *pdev, unsigned int ino) | |||
| 595 | return ret; | 595 | return ret; |
| 596 | } | 596 | } |
| 597 | 597 | ||
| 598 | /* When a device lives behind a bridge deeper in the PCI bus topology | ||
| 599 | * than APB, a special sequence must run to make sure all pending DMA | ||
| 600 | * transfers at the time of IRQ delivery are visible in the coherency | ||
| 601 | * domain by the cpu. This sequence is to perform a read on the far | ||
| 602 | * side of the non-APB bridge, then perform a read of Sabre's DMA | ||
| 603 | * write-sync register. | ||
| 604 | */ | ||
| 605 | static void sabre_wsync_handler(struct ino_bucket *bucket, void *_arg1, void *_arg2) | ||
| 606 | { | ||
| 607 | struct pci_dev *pdev = _arg1; | ||
| 608 | unsigned long sync_reg = (unsigned long) _arg2; | ||
| 609 | u16 _unused; | ||
| 610 | |||
| 611 | pci_read_config_word(pdev, PCI_VENDOR_ID, &_unused); | ||
| 612 | sabre_read(sync_reg); | ||
| 613 | } | ||
| 614 | |||
| 598 | static unsigned int __init sabre_irq_build(struct pci_pbm_info *pbm, | 615 | static unsigned int __init sabre_irq_build(struct pci_pbm_info *pbm, |
| 599 | struct pci_dev *pdev, | 616 | struct pci_dev *pdev, |
| 600 | unsigned int ino) | 617 | unsigned int ino) |
| @@ -639,24 +656,14 @@ static unsigned int __init sabre_irq_build(struct pci_pbm_info *pbm, | |||
| 639 | if (pdev) { | 656 | if (pdev) { |
| 640 | struct pcidev_cookie *pcp = pdev->sysdata; | 657 | struct pcidev_cookie *pcp = pdev->sysdata; |
| 641 | 658 | ||
| 642 | /* When a device lives behind a bridge deeper in the | ||
| 643 | * PCI bus topology than APB, a special sequence must | ||
| 644 | * run to make sure all pending DMA transfers at the | ||
| 645 | * time of IRQ delivery are visible in the coherency | ||
| 646 | * domain by the cpu. This sequence is to perform | ||
| 647 | * a read on the far side of the non-APB bridge, then | ||
| 648 | * perform a read of Sabre's DMA write-sync register. | ||
| 649 | * | ||
| 650 | * Currently, the PCI_CONFIG register for the device | ||
| 651 | * is used for this read from the far side of the bridge. | ||
| 652 | */ | ||
| 653 | if (pdev->bus->number != pcp->pbm->pci_first_busno) { | 659 | if (pdev->bus->number != pcp->pbm->pci_first_busno) { |
| 654 | bucket->flags |= IBF_DMA_SYNC; | 660 | struct pci_controller_info *p = pcp->pbm->parent; |
| 655 | bucket->synctab_ent = dma_sync_reg_table_entry++; | 661 | struct irq_desc *d = bucket->irq_info; |
| 656 | dma_sync_reg_table[bucket->synctab_ent] = | 662 | |
| 657 | (unsigned long) sabre_pci_config_mkaddr( | 663 | d->pre_handler = sabre_wsync_handler; |
| 658 | pcp->pbm, | 664 | d->pre_handler_arg1 = pdev; |
| 659 | pdev->bus->number, pdev->devfn, PCI_COMMAND); | 665 | d->pre_handler_arg2 = (void *) |
| 666 | p->pbm_A.controller_regs + SABRE_WRSYNC; | ||
| 660 | } | 667 | } |
| 661 | } | 668 | } |
| 662 | return __irq(bucket); | 669 | return __irq(bucket); |
| @@ -1626,10 +1633,9 @@ void __init sabre_init(int pnode, char *model_name) | |||
| 1626 | */ | 1633 | */ |
| 1627 | p->pbm_A.controller_regs = pr_regs[0].phys_addr; | 1634 | p->pbm_A.controller_regs = pr_regs[0].phys_addr; |
| 1628 | p->pbm_B.controller_regs = pr_regs[0].phys_addr; | 1635 | p->pbm_B.controller_regs = pr_regs[0].phys_addr; |
| 1629 | pci_dma_wsync = p->pbm_A.controller_regs + SABRE_WRSYNC; | ||
| 1630 | 1636 | ||
| 1631 | printk("PCI: Found SABRE, main regs at %016lx, wsync at %016lx\n", | 1637 | printk("PCI: Found SABRE, main regs at %016lx\n", |
| 1632 | p->pbm_A.controller_regs, pci_dma_wsync); | 1638 | p->pbm_A.controller_regs); |
| 1633 | 1639 | ||
| 1634 | /* Clear interrupts */ | 1640 | /* Clear interrupts */ |
| 1635 | 1641 | ||
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c index 5753175b94e6..6a182bb66281 100644 --- a/arch/sparc64/kernel/pci_schizo.c +++ b/arch/sparc64/kernel/pci_schizo.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <asm/iommu.h> | 15 | #include <asm/iommu.h> |
| 16 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
| 17 | #include <asm/upa.h> | 17 | #include <asm/upa.h> |
| 18 | #include <asm/pstate.h> | ||
| 18 | 19 | ||
| 19 | #include "pci_impl.h" | 20 | #include "pci_impl.h" |
| 20 | #include "iommu_common.h" | 21 | #include "iommu_common.h" |
| @@ -326,6 +327,44 @@ static int __init schizo_ino_to_pil(struct pci_dev *pdev, unsigned int ino) | |||
| 326 | return ret; | 327 | return ret; |
| 327 | } | 328 | } |
| 328 | 329 | ||
| 330 | static void tomatillo_wsync_handler(struct ino_bucket *bucket, void *_arg1, void *_arg2) | ||
| 331 | { | ||
| 332 | unsigned long sync_reg = (unsigned long) _arg2; | ||
| 333 | u64 mask = 1 << (__irq_ino(__irq(bucket)) & IMAP_INO); | ||
| 334 | u64 val; | ||
| 335 | int limit; | ||
| 336 | |||
| 337 | schizo_write(sync_reg, mask); | ||
| 338 | |||
| 339 | limit = 100000; | ||
| 340 | val = 0; | ||
| 341 | while (--limit) { | ||
| 342 | val = schizo_read(sync_reg); | ||
| 343 | if (!(val & mask)) | ||
| 344 | break; | ||
| 345 | } | ||
| 346 | if (limit <= 0) { | ||
| 347 | printk("tomatillo_wsync_handler: DMA won't sync [%lx:%lx]\n", | ||
| 348 | val, mask); | ||
| 349 | } | ||
| 350 | |||
| 351 | if (_arg1) { | ||
| 352 | static unsigned char cacheline[64] | ||
| 353 | __attribute__ ((aligned (64))); | ||
| 354 | |||
| 355 | __asm__ __volatile__("rd %%fprs, %0\n\t" | ||
| 356 | "or %0, %4, %1\n\t" | ||
| 357 | "wr %1, 0x0, %%fprs\n\t" | ||
| 358 | "stda %%f0, [%5] %6\n\t" | ||
| 359 | "wr %0, 0x0, %%fprs\n\t" | ||
| 360 | "membar #Sync" | ||
| 361 | : "=&r" (mask), "=&r" (val) | ||
| 362 | : "0" (mask), "1" (val), | ||
| 363 | "i" (FPRS_FEF), "r" (&cacheline[0]), | ||
| 364 | "i" (ASI_BLK_COMMIT_P)); | ||
| 365 | } | ||
| 366 | } | ||
| 367 | |||
| 329 | static unsigned int schizo_irq_build(struct pci_pbm_info *pbm, | 368 | static unsigned int schizo_irq_build(struct pci_pbm_info *pbm, |
| 330 | struct pci_dev *pdev, | 369 | struct pci_dev *pdev, |
| 331 | unsigned int ino) | 370 | unsigned int ino) |
| @@ -369,6 +408,15 @@ static unsigned int schizo_irq_build(struct pci_pbm_info *pbm, | |||
| 369 | bucket = __bucket(build_irq(pil, ign_fixup, iclr, imap)); | 408 | bucket = __bucket(build_irq(pil, ign_fixup, iclr, imap)); |
| 370 | bucket->flags |= IBF_PCI; | 409 | bucket->flags |= IBF_PCI; |
| 371 | 410 | ||
| 411 | if (pdev && pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) { | ||
| 412 | struct irq_desc *p = bucket->irq_info; | ||
| 413 | |||
| 414 | p->pre_handler = tomatillo_wsync_handler; | ||
| 415 | p->pre_handler_arg1 = ((pbm->chip_version <= 4) ? | ||
| 416 | (void *) 1 : (void *) 0); | ||
| 417 | p->pre_handler_arg2 = (void *) pbm->sync_reg; | ||
| 418 | } | ||
| 419 | |||
| 372 | return __irq(bucket); | 420 | return __irq(bucket); |
| 373 | } | 421 | } |
| 374 | 422 | ||
| @@ -885,6 +933,7 @@ static irqreturn_t schizo_ce_intr(int irq, void *dev_id, struct pt_regs *regs) | |||
| 885 | 933 | ||
| 886 | #define SCHIZO_PCI_CTRL (0x2000UL) | 934 | #define SCHIZO_PCI_CTRL (0x2000UL) |
| 887 | #define SCHIZO_PCICTRL_BUS_UNUS (1UL << 63UL) /* Safari */ | 935 | #define SCHIZO_PCICTRL_BUS_UNUS (1UL << 63UL) /* Safari */ |
| 936 | #define SCHIZO_PCICTRL_DTO_INT (1UL << 61UL) /* Tomatillo */ | ||
| 888 | #define SCHIZO_PCICTRL_ARB_PRIO (0x1ff << 52UL) /* Tomatillo */ | 937 | #define SCHIZO_PCICTRL_ARB_PRIO (0x1ff << 52UL) /* Tomatillo */ |
| 889 | #define SCHIZO_PCICTRL_ESLCK (1UL << 51UL) /* Safari */ | 938 | #define SCHIZO_PCICTRL_ESLCK (1UL << 51UL) /* Safari */ |
| 890 | #define SCHIZO_PCICTRL_ERRSLOT (7UL << 48UL) /* Safari */ | 939 | #define SCHIZO_PCICTRL_ERRSLOT (7UL << 48UL) /* Safari */ |
| @@ -1887,37 +1936,27 @@ static void __init schizo_pbm_hw_init(struct pci_pbm_info *pbm) | |||
| 1887 | { | 1936 | { |
| 1888 | u64 tmp; | 1937 | u64 tmp; |
| 1889 | 1938 | ||
| 1890 | /* Set IRQ retry to infinity. */ | 1939 | schizo_write(pbm->pbm_regs + SCHIZO_PCI_IRQ_RETRY, 5); |
| 1891 | schizo_write(pbm->pbm_regs + SCHIZO_PCI_IRQ_RETRY, | ||
| 1892 | SCHIZO_IRQ_RETRY_INF); | ||
| 1893 | 1940 | ||
| 1894 | /* Enable arbiter for all PCI slots. Also, disable PCI interval | ||
| 1895 | * timer so that DTO (Discard TimeOuts) are not reported because | ||
| 1896 | * some Schizo revisions report them erroneously. | ||
| 1897 | */ | ||
| 1898 | tmp = schizo_read(pbm->pbm_regs + SCHIZO_PCI_CTRL); | 1941 | tmp = schizo_read(pbm->pbm_regs + SCHIZO_PCI_CTRL); |
| 1899 | if (pbm->chip_type == PBM_CHIP_TYPE_SCHIZO_PLUS && | ||
| 1900 | pbm->chip_version == 0x5 && | ||
| 1901 | pbm->chip_revision == 0x1) | ||
| 1902 | tmp |= 0x0f; | ||
| 1903 | else | ||
| 1904 | tmp |= 0xff; | ||
| 1905 | 1942 | ||
| 1906 | tmp &= ~SCHIZO_PCICTRL_PTO; | 1943 | /* Enable arbiter for all PCI slots. */ |
| 1944 | tmp |= 0xff; | ||
| 1945 | |||
| 1907 | if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO && | 1946 | if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO && |
| 1908 | pbm->chip_version >= 0x2) | 1947 | pbm->chip_version >= 0x2) |
| 1909 | tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; | 1948 | tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; |
| 1910 | else | ||
| 1911 | tmp |= 0x1UL << SCHIZO_PCICTRL_PTO_SHIFT; | ||
| 1912 | 1949 | ||
| 1913 | if (!prom_getbool(pbm->prom_node, "no-bus-parking")) | 1950 | if (!prom_getbool(pbm->prom_node, "no-bus-parking")) |
| 1914 | tmp |= SCHIZO_PCICTRL_PARK; | 1951 | tmp |= SCHIZO_PCICTRL_PARK; |
| 1952 | else | ||
| 1953 | tmp &= ~SCHIZO_PCICTRL_PARK; | ||
| 1915 | 1954 | ||
| 1916 | if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO && | 1955 | if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO && |
| 1917 | pbm->chip_version <= 0x1) | 1956 | pbm->chip_version <= 0x1) |
| 1918 | tmp |= (1UL << 61); | 1957 | tmp |= SCHIZO_PCICTRL_DTO_INT; |
| 1919 | else | 1958 | else |
| 1920 | tmp &= ~(1UL << 61); | 1959 | tmp &= ~SCHIZO_PCICTRL_DTO_INT; |
| 1921 | 1960 | ||
| 1922 | if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) | 1961 | if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) |
| 1923 | tmp |= (SCHIZO_PCICTRL_MRM_PREF | | 1962 | tmp |= (SCHIZO_PCICTRL_MRM_PREF | |
| @@ -2015,6 +2054,9 @@ static void __init schizo_pbm_init(struct pci_controller_info *p, | |||
| 2015 | pbm->pbm_regs = pr_regs[0].phys_addr; | 2054 | pbm->pbm_regs = pr_regs[0].phys_addr; |
| 2016 | pbm->controller_regs = pr_regs[1].phys_addr - 0x10000UL; | 2055 | pbm->controller_regs = pr_regs[1].phys_addr - 0x10000UL; |
| 2017 | 2056 | ||
| 2057 | if (chip_type == PBM_CHIP_TYPE_TOMATILLO) | ||
| 2058 | pbm->sync_reg = pr_regs[3].phys_addr + 0x1a18UL; | ||
| 2059 | |||
| 2018 | sprintf(pbm->name, | 2060 | sprintf(pbm->name, |
| 2019 | (chip_type == PBM_CHIP_TYPE_TOMATILLO ? | 2061 | (chip_type == PBM_CHIP_TYPE_TOMATILLO ? |
| 2020 | "TOMATILLO%d PBM%c" : | 2062 | "TOMATILLO%d PBM%c" : |
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 71b4e3807694..b40db389f90b 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
| @@ -973,7 +973,7 @@ static void sparc64_start_timers(irqreturn_t (*cfunc)(int, void *, struct pt_reg | |||
| 973 | int err; | 973 | int err; |
| 974 | 974 | ||
| 975 | /* Register IRQ handler. */ | 975 | /* Register IRQ handler. */ |
| 976 | err = request_irq(build_irq(0, 0, 0UL, 0UL), cfunc, SA_STATIC_ALLOC, | 976 | err = request_irq(build_irq(0, 0, 0UL, 0UL), cfunc, 0, |
| 977 | "timer", NULL); | 977 | "timer", NULL); |
| 978 | 978 | ||
| 979 | if (err) { | 979 | if (err) { |
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index 7a2431d3abc7..363770893797 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
| @@ -72,6 +72,7 @@ __flush_tlb_pending: | |||
| 72 | flush %g6 | 72 | flush %g6 |
| 73 | retl | 73 | retl |
| 74 | wrpr %g7, 0x0, %pstate | 74 | wrpr %g7, 0x0, %pstate |
| 75 | nop | ||
| 75 | 76 | ||
| 76 | .align 32 | 77 | .align 32 |
| 77 | .globl __flush_tlb_kernel_range | 78 | .globl __flush_tlb_kernel_range |
| @@ -249,7 +250,7 @@ __cheetah_flush_tlb_mm: /* 15 insns */ | |||
| 249 | retl | 250 | retl |
| 250 | wrpr %g7, 0x0, %pstate | 251 | wrpr %g7, 0x0, %pstate |
| 251 | 252 | ||
| 252 | __cheetah_flush_tlb_pending: /* 22 insns */ | 253 | __cheetah_flush_tlb_pending: /* 23 insns */ |
| 253 | /* %o0 = context, %o1 = nr, %o2 = vaddrs[] */ | 254 | /* %o0 = context, %o1 = nr, %o2 = vaddrs[] */ |
| 254 | rdpr %pstate, %g7 | 255 | rdpr %pstate, %g7 |
| 255 | sllx %o1, 3, %o1 | 256 | sllx %o1, 3, %o1 |
| @@ -317,7 +318,7 @@ cheetah_patch_cachetlbops: | |||
| 317 | sethi %hi(__cheetah_flush_tlb_pending), %o1 | 318 | sethi %hi(__cheetah_flush_tlb_pending), %o1 |
| 318 | or %o1, %lo(__cheetah_flush_tlb_pending), %o1 | 319 | or %o1, %lo(__cheetah_flush_tlb_pending), %o1 |
| 319 | call cheetah_patch_one | 320 | call cheetah_patch_one |
| 320 | mov 22, %o2 | 321 | mov 23, %o2 |
| 321 | 322 | ||
| 322 | #ifdef DCACHE_ALIASING_POSSIBLE | 323 | #ifdef DCACHE_ALIASING_POSSIBLE |
| 323 | sethi %hi(__flush_dcache_page), %o0 | 324 | sethi %hi(__flush_dcache_page), %o0 |
diff --git a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c index acd2a778ebe6..5c6dc7051482 100644 --- a/arch/x86_64/kernel/kprobes.c +++ b/arch/x86_64/kernel/kprobes.c | |||
| @@ -682,7 +682,7 @@ static struct kprobe trampoline_p = { | |||
| 682 | .pre_handler = trampoline_probe_handler | 682 | .pre_handler = trampoline_probe_handler |
| 683 | }; | 683 | }; |
| 684 | 684 | ||
| 685 | int __init arch_init(void) | 685 | int __init arch_init_kprobes(void) |
| 686 | { | 686 | { |
| 687 | return register_kprobe(&trampoline_p); | 687 | return register_kprobe(&trampoline_p); |
| 688 | } | 688 | } |
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 8dbf802ee7f8..d1f42b972821 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
| @@ -433,7 +433,7 @@ acpi_pci_irq_enable ( | |||
| 433 | printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: no GSI", | 433 | printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: no GSI", |
| 434 | pci_name(dev), ('A' + pin)); | 434 | pci_name(dev), ('A' + pin)); |
| 435 | /* Interrupt Line values above 0xF are forbidden */ | 435 | /* Interrupt Line values above 0xF are forbidden */ |
| 436 | if (dev->irq >= 0 && (dev->irq <= 0xF)) { | 436 | if (dev->irq > 0 && (dev->irq <= 0xF)) { |
| 437 | printk(" - using IRQ %d\n", dev->irq); | 437 | printk(" - using IRQ %d\n", dev->irq); |
| 438 | acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW); | 438 | acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW); |
| 439 | return_VALUE(0); | 439 | return_VALUE(0); |
diff --git a/drivers/char/hw_random.c b/drivers/char/hw_random.c index 7e6ac14c2450..3480535a09c5 100644 --- a/drivers/char/hw_random.c +++ b/drivers/char/hw_random.c | |||
| @@ -579,7 +579,7 @@ static int __init rng_init (void) | |||
| 579 | 579 | ||
| 580 | /* Probe for Intel, AMD RNGs */ | 580 | /* Probe for Intel, AMD RNGs */ |
| 581 | for_each_pci_dev(pdev) { | 581 | for_each_pci_dev(pdev) { |
| 582 | ent = pci_match_device (rng_pci_tbl, pdev); | 582 | ent = pci_match_id(rng_pci_tbl, pdev); |
| 583 | if (ent) { | 583 | if (ent) { |
| 584 | rng_ops = &rng_vendor_ops[ent->driver_data]; | 584 | rng_ops = &rng_vendor_ops[ent->driver_data]; |
| 585 | goto match; | 585 | goto match; |
diff --git a/drivers/char/watchdog/i8xx_tco.c b/drivers/char/watchdog/i8xx_tco.c index b14d642439ed..5d07ee59679d 100644 --- a/drivers/char/watchdog/i8xx_tco.c +++ b/drivers/char/watchdog/i8xx_tco.c | |||
| @@ -401,7 +401,7 @@ static unsigned char __init i8xx_tco_getdevice (void) | |||
| 401 | */ | 401 | */ |
| 402 | 402 | ||
| 403 | while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 403 | while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { |
| 404 | if (pci_match_device(i8xx_tco_pci_tbl, dev)) { | 404 | if (pci_match_id(i8xx_tco_pci_tbl, dev)) { |
| 405 | i8xx_tco_pci = dev; | 405 | i8xx_tco_pci = dev; |
| 406 | break; | 406 | break; |
| 407 | } | 407 | } |
diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index 5be8ad6dc9ed..cca9c075966d 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile | |||
| @@ -20,7 +20,6 @@ ide-core-$(CONFIG_BLK_DEV_CMD640) += pci/cmd640.o | |||
| 20 | # Core IDE code - must come before legacy | 20 | # Core IDE code - must come before legacy |
| 21 | ide-core-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o | 21 | ide-core-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o |
| 22 | ide-core-$(CONFIG_BLK_DEV_IDEDMA) += ide-dma.o | 22 | ide-core-$(CONFIG_BLK_DEV_IDEDMA) += ide-dma.o |
| 23 | ide-core-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o | ||
| 24 | ide-core-$(CONFIG_PROC_FS) += ide-proc.o | 23 | ide-core-$(CONFIG_PROC_FS) += ide-proc.o |
| 25 | ide-core-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o | 24 | ide-core-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o |
| 26 | 25 | ||
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 6806d407e9c1..b09a6537c7a8 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
| @@ -487,8 +487,7 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat) | |||
| 487 | u8 err = 0; | 487 | u8 err = 0; |
| 488 | 488 | ||
| 489 | local_irq_set(flags); | 489 | local_irq_set(flags); |
| 490 | printk("%s: %s: status=0x%02x", drive->name, msg, stat); | 490 | printk("%s: %s: status=0x%02x { ", drive->name, msg, stat); |
| 491 | printk(" { "); | ||
| 492 | if (stat & BUSY_STAT) | 491 | if (stat & BUSY_STAT) |
| 493 | printk("Busy "); | 492 | printk("Busy "); |
| 494 | else { | 493 | else { |
| @@ -500,15 +499,13 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat) | |||
| 500 | if (stat & INDEX_STAT) printk("Index "); | 499 | if (stat & INDEX_STAT) printk("Index "); |
| 501 | if (stat & ERR_STAT) printk("Error "); | 500 | if (stat & ERR_STAT) printk("Error "); |
| 502 | } | 501 | } |
| 503 | printk("}"); | 502 | printk("}\n"); |
| 504 | printk("\n"); | ||
| 505 | if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) { | 503 | if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) { |
| 506 | err = hwif->INB(IDE_ERROR_REG); | 504 | err = hwif->INB(IDE_ERROR_REG); |
| 507 | printk("%s: %s: error=0x%02x", drive->name, msg, err); | 505 | printk("%s: %s: error=0x%02x { ", drive->name, msg, err); |
| 508 | printk(" { "); | ||
| 509 | if (err & ABRT_ERR) printk("DriveStatusError "); | 506 | if (err & ABRT_ERR) printk("DriveStatusError "); |
| 510 | if (err & ICRC_ERR) | 507 | if (err & ICRC_ERR) |
| 511 | printk("Bad%s ", (err & ABRT_ERR) ? "CRC" : "Sector"); | 508 | printk((err & ABRT_ERR) ? "BadCRC " : "BadSector "); |
| 512 | if (err & ECC_ERR) printk("UncorrectableError "); | 509 | if (err & ECC_ERR) printk("UncorrectableError "); |
| 513 | if (err & ID_ERR) printk("SectorIdNotFound "); | 510 | if (err & ID_ERR) printk("SectorIdNotFound "); |
| 514 | if (err & TRK0_ERR) printk("TrackZeroNotFound "); | 511 | if (err & TRK0_ERR) printk("TrackZeroNotFound "); |
| @@ -546,8 +543,8 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat) | |||
| 546 | printk(", sector=%llu", | 543 | printk(", sector=%llu", |
| 547 | (unsigned long long)HWGROUP(drive)->rq->sector); | 544 | (unsigned long long)HWGROUP(drive)->rq->sector); |
| 548 | } | 545 | } |
| 546 | printk("\n"); | ||
| 549 | } | 547 | } |
| 550 | printk("\n"); | ||
| 551 | ide_dump_opcode(drive); | 548 | ide_dump_opcode(drive); |
| 552 | local_irq_restore(flags); | 549 | local_irq_restore(flags); |
| 553 | return err; | 550 | return err; |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 67efb38a9f6c..6cf49394a80f 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
| @@ -583,7 +583,7 @@ static int ali15x3_dma_setup(ide_drive_t *drive) | |||
| 583 | * appropriate also sets up the 1533 southbridge. | 583 | * appropriate also sets up the 1533 southbridge. |
| 584 | */ | 584 | */ |
| 585 | 585 | ||
| 586 | static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char *name) | 586 | static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const char *name) |
| 587 | { | 587 | { |
| 588 | unsigned long flags; | 588 | unsigned long flags; |
| 589 | u8 tmpbyte; | 589 | u8 tmpbyte; |
| @@ -677,7 +677,7 @@ static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char | |||
| 677 | * FIXME: frobs bits that are not defined on newer ALi devicea | 677 | * FIXME: frobs bits that are not defined on newer ALi devicea |
| 678 | */ | 678 | */ |
| 679 | 679 | ||
| 680 | static unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif) | 680 | static unsigned int __devinit ata66_ali15x3 (ide_hwif_t *hwif) |
| 681 | { | 681 | { |
| 682 | struct pci_dev *dev = hwif->pci_dev; | 682 | struct pci_dev *dev = hwif->pci_dev; |
| 683 | unsigned int ata66 = 0; | 683 | unsigned int ata66 = 0; |
| @@ -748,7 +748,7 @@ static unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif) | |||
| 748 | * Initialize the IDE structure side of the ALi 15x3 driver. | 748 | * Initialize the IDE structure side of the ALi 15x3 driver. |
| 749 | */ | 749 | */ |
| 750 | 750 | ||
| 751 | static void __init init_hwif_common_ali15x3 (ide_hwif_t *hwif) | 751 | static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif) |
| 752 | { | 752 | { |
| 753 | hwif->autodma = 0; | 753 | hwif->autodma = 0; |
| 754 | hwif->tuneproc = &ali15x3_tune_drive; | 754 | hwif->tuneproc = &ali15x3_tune_drive; |
| @@ -794,7 +794,7 @@ static void __init init_hwif_common_ali15x3 (ide_hwif_t *hwif) | |||
| 794 | * Sparc systems | 794 | * Sparc systems |
| 795 | */ | 795 | */ |
| 796 | 796 | ||
| 797 | static void __init init_hwif_ali15x3 (ide_hwif_t *hwif) | 797 | static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) |
| 798 | { | 798 | { |
| 799 | u8 ideic, inmir; | 799 | u8 ideic, inmir; |
| 800 | s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, | 800 | s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, |
| @@ -847,7 +847,7 @@ static void __init init_hwif_ali15x3 (ide_hwif_t *hwif) | |||
| 847 | * the actual work. | 847 | * the actual work. |
| 848 | */ | 848 | */ |
| 849 | 849 | ||
| 850 | static void __init init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase) | 850 | static void __devinit init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase) |
| 851 | { | 851 | { |
| 852 | if (m5229_revision < 0x20) | 852 | if (m5229_revision < 0x20) |
| 853 | return; | 853 | return; |
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index 4e0f13d1d060..844a6c9fb949 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c | |||
| @@ -73,6 +73,7 @@ static struct amd_ide_chip { | |||
| 73 | { PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, 0x50, AMD_UDMA_133 }, | 73 | { PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, 0x50, AMD_UDMA_133 }, |
| 74 | { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, 0x50, AMD_UDMA_133 }, | 74 | { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, 0x50, AMD_UDMA_133 }, |
| 75 | { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, 0x50, AMD_UDMA_133 }, | 75 | { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, 0x50, AMD_UDMA_133 }, |
| 76 | { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, 0x50, AMD_UDMA_133 }, | ||
| 76 | { 0 } | 77 | { 0 } |
| 77 | }; | 78 | }; |
| 78 | 79 | ||
| @@ -309,7 +310,7 @@ static int amd74xx_ide_dma_check(ide_drive_t *drive) | |||
| 309 | * and initialize its drive independent registers. | 310 | * and initialize its drive independent registers. |
| 310 | */ | 311 | */ |
| 311 | 312 | ||
| 312 | static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char *name) | 313 | static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, const char *name) |
| 313 | { | 314 | { |
| 314 | unsigned char t; | 315 | unsigned char t; |
| 315 | unsigned int u; | 316 | unsigned int u; |
| @@ -413,7 +414,7 @@ static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char | |||
| 413 | return dev->irq; | 414 | return dev->irq; |
| 414 | } | 415 | } |
| 415 | 416 | ||
| 416 | static void __init init_hwif_amd74xx(ide_hwif_t *hwif) | 417 | static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) |
| 417 | { | 418 | { |
| 418 | int i; | 419 | int i; |
| 419 | 420 | ||
| @@ -489,6 +490,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { | |||
| 489 | /* 13 */ DECLARE_NV_DEV("NFORCE-CK804"), | 490 | /* 13 */ DECLARE_NV_DEV("NFORCE-CK804"), |
| 490 | /* 14 */ DECLARE_NV_DEV("NFORCE-MCP04"), | 491 | /* 14 */ DECLARE_NV_DEV("NFORCE-MCP04"), |
| 491 | /* 15 */ DECLARE_NV_DEV("NFORCE-MCP51"), | 492 | /* 15 */ DECLARE_NV_DEV("NFORCE-MCP51"), |
| 493 | /* 16 */ DECLARE_NV_DEV("NFORCE-MCP55"), | ||
| 492 | }; | 494 | }; |
| 493 | 495 | ||
| 494 | static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id) | 496 | static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id) |
| @@ -524,6 +526,7 @@ static struct pci_device_id amd74xx_pci_tbl[] = { | |||
| 524 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13 }, | 526 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13 }, |
| 525 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 }, | 527 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 }, |
| 526 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15 }, | 528 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15 }, |
| 529 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 }, | ||
| 527 | { 0, }, | 530 | { 0, }, |
| 528 | }; | 531 | }; |
| 529 | MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl); | 532 | MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl); |
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c index 0381961db263..09269e574b3e 100644 --- a/drivers/ide/pci/cs5530.c +++ b/drivers/ide/pci/cs5530.c | |||
| @@ -217,7 +217,7 @@ static int cs5530_config_dma (ide_drive_t *drive) | |||
| 217 | * Initialize the cs5530 bridge for reliable IDE DMA operation. | 217 | * Initialize the cs5530 bridge for reliable IDE DMA operation. |
| 218 | */ | 218 | */ |
| 219 | 219 | ||
| 220 | static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char *name) | 220 | static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const char *name) |
| 221 | { | 221 | { |
| 222 | struct pci_dev *master_0 = NULL, *cs5530_0 = NULL; | 222 | struct pci_dev *master_0 = NULL, *cs5530_0 = NULL; |
| 223 | unsigned long flags; | 223 | unsigned long flags; |
| @@ -308,7 +308,7 @@ static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char | |||
| 308 | * performs channel-specific pre-initialization before drive probing. | 308 | * performs channel-specific pre-initialization before drive probing. |
| 309 | */ | 309 | */ |
| 310 | 310 | ||
| 311 | static void __init init_hwif_cs5530 (ide_hwif_t *hwif) | 311 | static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif) |
| 312 | { | 312 | { |
| 313 | unsigned long basereg; | 313 | unsigned long basereg; |
| 314 | u32 d0_timings; | 314 | u32 d0_timings; |
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index 80d67e99ccb5..5a33513f3dd1 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c | |||
| @@ -391,7 +391,7 @@ static void cy82c693_tune_drive (ide_drive_t *drive, u8 pio) | |||
| 391 | /* | 391 | /* |
| 392 | * this function is called during init and is used to setup the cy82c693 chip | 392 | * this function is called during init and is used to setup the cy82c693 chip |
| 393 | */ | 393 | */ |
| 394 | static unsigned int __init init_chipset_cy82c693(struct pci_dev *dev, const char *name) | 394 | static unsigned int __devinit init_chipset_cy82c693(struct pci_dev *dev, const char *name) |
| 395 | { | 395 | { |
| 396 | if (PCI_FUNC(dev->devfn) != 1) | 396 | if (PCI_FUNC(dev->devfn) != 1) |
| 397 | return 0; | 397 | return 0; |
| @@ -443,7 +443,7 @@ static unsigned int __init init_chipset_cy82c693(struct pci_dev *dev, const char | |||
| 443 | /* | 443 | /* |
| 444 | * the init function - called for each ide channel once | 444 | * the init function - called for each ide channel once |
| 445 | */ | 445 | */ |
| 446 | static void __init init_hwif_cy82c693(ide_hwif_t *hwif) | 446 | static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif) |
| 447 | { | 447 | { |
| 448 | hwif->autodma = 0; | 448 | hwif->autodma = 0; |
| 449 | 449 | ||
| @@ -467,9 +467,9 @@ static void __init init_hwif_cy82c693(ide_hwif_t *hwif) | |||
| 467 | hwif->drives[1].autodma = hwif->autodma; | 467 | hwif->drives[1].autodma = hwif->autodma; |
| 468 | } | 468 | } |
| 469 | 469 | ||
| 470 | static __initdata ide_hwif_t *primary; | 470 | static __devinitdata ide_hwif_t *primary; |
| 471 | 471 | ||
| 472 | void __init init_iops_cy82c693(ide_hwif_t *hwif) | 472 | void __devinit init_iops_cy82c693(ide_hwif_t *hwif) |
| 473 | { | 473 | { |
| 474 | if (PCI_FUNC(hwif->pci_dev->devfn) == 1) | 474 | if (PCI_FUNC(hwif->pci_dev->devfn) == 1) |
| 475 | primary = hwif; | 475 | primary = hwif; |
diff --git a/drivers/ide/pci/it8172.c b/drivers/ide/pci/it8172.c index 631927cf17d4..93462926b9d5 100644 --- a/drivers/ide/pci/it8172.c +++ b/drivers/ide/pci/it8172.c | |||
| @@ -216,7 +216,7 @@ fast_ata_pio: | |||
| 216 | return 0; | 216 | return 0; |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | static unsigned int __init init_chipset_it8172 (struct pci_dev *dev, const char *name) | 219 | static unsigned int __devinit init_chipset_it8172 (struct pci_dev *dev, const char *name) |
| 220 | { | 220 | { |
| 221 | unsigned char progif; | 221 | unsigned char progif; |
| 222 | 222 | ||
| @@ -230,7 +230,7 @@ static unsigned int __init init_chipset_it8172 (struct pci_dev *dev, const char | |||
| 230 | } | 230 | } |
| 231 | 231 | ||
| 232 | 232 | ||
| 233 | static void __init init_hwif_it8172 (ide_hwif_t *hwif) | 233 | static void __devinit init_hwif_it8172 (ide_hwif_t *hwif) |
| 234 | { | 234 | { |
| 235 | struct pci_dev* dev = hwif->pci_dev; | 235 | struct pci_dev* dev = hwif->pci_dev; |
| 236 | unsigned long cmdBase, ctrlBase; | 236 | unsigned long cmdBase, ctrlBase; |
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index 205a32fbc2f0..fcd5142f5cfe 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
| @@ -195,7 +195,7 @@ static int ns87415_ide_dma_check (ide_drive_t *drive) | |||
| 195 | return __ide_dma_check(drive); | 195 | return __ide_dma_check(drive); |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | static void __init init_hwif_ns87415 (ide_hwif_t *hwif) | 198 | static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) |
| 199 | { | 199 | { |
| 200 | struct pci_dev *dev = hwif->pci_dev; | 200 | struct pci_dev *dev = hwif->pci_dev; |
| 201 | unsigned int ctrl, using_inta; | 201 | unsigned int ctrl, using_inta; |
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c index cf4fd91d396a..7a7c2ef78ac2 100644 --- a/drivers/ide/pci/opti621.c +++ b/drivers/ide/pci/opti621.c | |||
| @@ -326,7 +326,7 @@ static void opti621_tune_drive (ide_drive_t *drive, u8 pio) | |||
| 326 | /* | 326 | /* |
| 327 | * init_hwif_opti621() is called once for each hwif found at boot. | 327 | * init_hwif_opti621() is called once for each hwif found at boot. |
| 328 | */ | 328 | */ |
| 329 | static void __init init_hwif_opti621 (ide_hwif_t *hwif) | 329 | static void __devinit init_hwif_opti621 (ide_hwif_t *hwif) |
| 330 | { | 330 | { |
| 331 | hwif->autodma = 0; | 331 | hwif->autodma = 0; |
| 332 | hwif->drives[0].drive_data = PIO_DONT_KNOW; | 332 | hwif->drives[0].drive_data = PIO_DONT_KNOW; |
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index 3bc3bf1be49b..10592cec6c43 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
| @@ -459,7 +459,7 @@ printk("%s: SC1200: resume\n", hwif->name); | |||
| 459 | * This gets invoked by the IDE driver once for each channel, | 459 | * This gets invoked by the IDE driver once for each channel, |
| 460 | * and performs channel-specific pre-initialization before drive probing. | 460 | * and performs channel-specific pre-initialization before drive probing. |
| 461 | */ | 461 | */ |
| 462 | static void __init init_hwif_sc1200 (ide_hwif_t *hwif) | 462 | static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif) |
| 463 | { | 463 | { |
| 464 | if (hwif->mate) | 464 | if (hwif->mate) |
| 465 | hwif->serialized = hwif->mate->serialized = 1; | 465 | hwif->serialized = hwif->mate->serialized = 1; |
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c index 1d970a0de21a..ea0806c82be0 100644 --- a/drivers/ide/pci/sl82c105.c +++ b/drivers/ide/pci/sl82c105.c | |||
| @@ -386,7 +386,7 @@ static unsigned int sl82c105_bridge_revision(struct pci_dev *dev) | |||
| 386 | * channel 0 here at least, but channel 1 has to be enabled by | 386 | * channel 0 here at least, but channel 1 has to be enabled by |
| 387 | * firmware or arch code. We still set both to 16 bits mode. | 387 | * firmware or arch code. We still set both to 16 bits mode. |
| 388 | */ | 388 | */ |
| 389 | static unsigned int __init init_chipset_sl82c105(struct pci_dev *dev, const char *msg) | 389 | static unsigned int __devinit init_chipset_sl82c105(struct pci_dev *dev, const char *msg) |
| 390 | { | 390 | { |
| 391 | u32 val; | 391 | u32 val; |
| 392 | 392 | ||
| @@ -399,7 +399,7 @@ static unsigned int __init init_chipset_sl82c105(struct pci_dev *dev, const char | |||
| 399 | return dev->irq; | 399 | return dev->irq; |
| 400 | } | 400 | } |
| 401 | 401 | ||
| 402 | static void __init init_dma_sl82c105(ide_hwif_t *hwif, unsigned long dma_base) | 402 | static void __devinit init_dma_sl82c105(ide_hwif_t *hwif, unsigned long dma_base) |
| 403 | { | 403 | { |
| 404 | unsigned int rev; | 404 | unsigned int rev; |
| 405 | u8 dma_state; | 405 | u8 dma_state; |
| @@ -431,7 +431,7 @@ static void __init init_dma_sl82c105(ide_hwif_t *hwif, unsigned long dma_base) | |||
| 431 | * Initialise the chip | 431 | * Initialise the chip |
| 432 | */ | 432 | */ |
| 433 | 433 | ||
| 434 | static void __init init_hwif_sl82c105(ide_hwif_t *hwif) | 434 | static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif) |
| 435 | { | 435 | { |
| 436 | struct pci_dev *dev = hwif->pci_dev; | 436 | struct pci_dev *dev = hwif->pci_dev; |
| 437 | u32 val; | 437 | u32 val; |
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 7fbf36342f73..5112c726633b 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
| @@ -196,7 +196,7 @@ fast_ata_pio: | |||
| 196 | } | 196 | } |
| 197 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 197 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
| 198 | 198 | ||
| 199 | static void __init init_hwif_slc90e66 (ide_hwif_t *hwif) | 199 | static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) |
| 200 | { | 200 | { |
| 201 | u8 reg47 = 0; | 201 | u8 reg47 = 0; |
| 202 | u8 mask = hwif->channel ? 0x01 : 0x02; /* bit0:Primary */ | 202 | u8 mask = hwif->channel ? 0x01 : 0x02; /* bit0:Primary */ |
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index a1df2bfe3631..f96b56838f33 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
| @@ -130,7 +130,7 @@ static int triflex_config_drive_xfer_rate(ide_drive_t *drive) | |||
| 130 | return hwif->ide_dma_off_quietly(drive); | 130 | return hwif->ide_dma_off_quietly(drive); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | static void __init init_hwif_triflex(ide_hwif_t *hwif) | 133 | static void __devinit init_hwif_triflex(ide_hwif_t *hwif) |
| 134 | { | 134 | { |
| 135 | hwif->tuneproc = &triflex_tune_drive; | 135 | hwif->tuneproc = &triflex_tune_drive; |
| 136 | hwif->speedproc = &triflex_tune_chipset; | 136 | hwif->speedproc = &triflex_tune_chipset; |
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 069dbffe2116..a4d099c937ff 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
| @@ -415,7 +415,7 @@ static int via82cxxx_ide_dma_check (ide_drive_t *drive) | |||
| 415 | * and initialize its drive independent registers. | 415 | * and initialize its drive independent registers. |
| 416 | */ | 416 | */ |
| 417 | 417 | ||
| 418 | static unsigned int __init init_chipset_via82cxxx(struct pci_dev *dev, const char *name) | 418 | static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const char *name) |
| 419 | { | 419 | { |
| 420 | struct pci_dev *isa = NULL; | 420 | struct pci_dev *isa = NULL; |
| 421 | u8 t, v; | 421 | u8 t, v; |
| @@ -576,7 +576,7 @@ static unsigned int __init init_chipset_via82cxxx(struct pci_dev *dev, const cha | |||
| 576 | return 0; | 576 | return 0; |
| 577 | } | 577 | } |
| 578 | 578 | ||
| 579 | static void __init init_hwif_via82cxxx(ide_hwif_t *hwif) | 579 | static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif) |
| 580 | { | 580 | { |
| 581 | int i; | 581 | int i; |
| 582 | 582 | ||
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index e501675ad72e..77da827b2898 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
| @@ -847,7 +847,7 @@ static int __init ide_scan_pcidev(struct pci_dev *dev) | |||
| 847 | d = list_entry(l, struct pci_driver, node); | 847 | d = list_entry(l, struct pci_driver, node); |
| 848 | if(d->id_table) | 848 | if(d->id_table) |
| 849 | { | 849 | { |
| 850 | const struct pci_device_id *id = pci_match_device(d->id_table, dev); | 850 | const struct pci_device_id *id = pci_match_id(d->id_table, dev); |
| 851 | if(id != NULL) | 851 | if(id != NULL) |
| 852 | { | 852 | { |
| 853 | if(d->probe(dev, id) >= 0) | 853 | if(d->probe(dev, id) >= 0) |
diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index 3a5f6ac5b364..7a42966d755b 100644 --- a/drivers/mmc/mmci.c +++ b/drivers/mmc/mmci.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/mmc/host.h> | 20 | #include <linux/mmc/host.h> |
| 21 | #include <linux/mmc/protocol.h> | 21 | #include <linux/mmc/protocol.h> |
| 22 | 22 | ||
| 23 | #include <asm/div64.h> | ||
| 23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
| 24 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
| 25 | #include <asm/scatterlist.h> | 26 | #include <asm/scatterlist.h> |
| @@ -70,6 +71,7 @@ static void mmci_stop_data(struct mmci_host *host) | |||
| 70 | static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) | 71 | static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) |
| 71 | { | 72 | { |
| 72 | unsigned int datactrl, timeout, irqmask; | 73 | unsigned int datactrl, timeout, irqmask; |
| 74 | unsigned long long clks; | ||
| 73 | void __iomem *base; | 75 | void __iomem *base; |
| 74 | 76 | ||
| 75 | DBG(host, "blksz %04x blks %04x flags %08x\n", | 77 | DBG(host, "blksz %04x blks %04x flags %08x\n", |
| @@ -81,9 +83,10 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) | |||
| 81 | 83 | ||
| 82 | mmci_init_sg(host, data); | 84 | mmci_init_sg(host, data); |
| 83 | 85 | ||
| 84 | timeout = data->timeout_clks + | 86 | clks = (unsigned long long)data->timeout_ns * host->cclk; |
| 85 | ((unsigned long long)data->timeout_ns * host->cclk) / | 87 | do_div(clks, 1000000000UL); |
| 86 | 1000000000ULL; | 88 | |
| 89 | timeout = data->timeout_clks + (unsigned int)clks; | ||
| 87 | 90 | ||
| 88 | base = host->base; | 91 | base = host->base; |
| 89 | writel(timeout, base + MMCIDATATIMER); | 92 | writel(timeout, base + MMCIDATATIMER); |
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index b7fbd30b49a0..0c41d4b41a65 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c | |||
| @@ -54,28 +54,6 @@ | |||
| 54 | #define DBGF(x...) do { } while (0) | 54 | #define DBGF(x...) do { } while (0) |
| 55 | #endif | 55 | #endif |
| 56 | 56 | ||
| 57 | #ifdef CONFIG_MMC_DEBUG | ||
| 58 | void DBG_REG(int reg, u8 value) | ||
| 59 | { | ||
| 60 | int i; | ||
| 61 | |||
| 62 | printk(KERN_DEBUG "wbsd: Register %d: 0x%02X %3d '%c' ", | ||
| 63 | reg, (int)value, (int)value, (value < 0x20)?'.':value); | ||
| 64 | |||
| 65 | for (i = 7;i >= 0;i--) | ||
| 66 | { | ||
| 67 | if (value & (1 << i)) | ||
| 68 | printk("x"); | ||
| 69 | else | ||
| 70 | printk("."); | ||
| 71 | } | ||
| 72 | |||
| 73 | printk("\n"); | ||
| 74 | } | ||
| 75 | #else | ||
| 76 | #define DBG_REG(r, v) do {} while (0) | ||
| 77 | #endif | ||
| 78 | |||
| 79 | /* | 57 | /* |
| 80 | * Device resources | 58 | * Device resources |
| 81 | */ | 59 | */ |
| @@ -92,6 +70,13 @@ MODULE_DEVICE_TABLE(pnp, pnp_dev_table); | |||
| 92 | 70 | ||
| 93 | #endif /* CONFIG_PNP */ | 71 | #endif /* CONFIG_PNP */ |
| 94 | 72 | ||
| 73 | static const int config_ports[] = { 0x2E, 0x4E }; | ||
| 74 | static const int unlock_codes[] = { 0x83, 0x87 }; | ||
| 75 | |||
| 76 | static const int valid_ids[] = { | ||
| 77 | 0x7112, | ||
| 78 | }; | ||
| 79 | |||
| 95 | #ifdef CONFIG_PNP | 80 | #ifdef CONFIG_PNP |
| 96 | static unsigned int nopnp = 0; | 81 | static unsigned int nopnp = 0; |
| 97 | #else | 82 | #else |
| @@ -1051,6 +1036,20 @@ static struct mmc_host_ops wbsd_ops = { | |||
| 1051 | \*****************************************************************************/ | 1036 | \*****************************************************************************/ |
| 1052 | 1037 | ||
| 1053 | /* | 1038 | /* |
| 1039 | * Helper function for card detection | ||
| 1040 | */ | ||
| 1041 | static void wbsd_detect_card(unsigned long data) | ||
| 1042 | { | ||
| 1043 | struct wbsd_host *host = (struct wbsd_host*)data; | ||
| 1044 | |||
| 1045 | BUG_ON(host == NULL); | ||
| 1046 | |||
| 1047 | DBG("Executing card detection\n"); | ||
| 1048 | |||
| 1049 | mmc_detect_change(host->mmc); | ||
| 1050 | } | ||
| 1051 | |||
| 1052 | /* | ||
| 1054 | * Tasklets | 1053 | * Tasklets |
| 1055 | */ | 1054 | */ |
| 1056 | 1055 | ||
| @@ -1075,7 +1074,6 @@ static void wbsd_tasklet_card(unsigned long param) | |||
| 1075 | { | 1074 | { |
| 1076 | struct wbsd_host* host = (struct wbsd_host*)param; | 1075 | struct wbsd_host* host = (struct wbsd_host*)param; |
| 1077 | u8 csr; | 1076 | u8 csr; |
| 1078 | int change = 0; | ||
| 1079 | 1077 | ||
| 1080 | spin_lock(&host->lock); | 1078 | spin_lock(&host->lock); |
| 1081 | 1079 | ||
| @@ -1094,14 +1092,20 @@ static void wbsd_tasklet_card(unsigned long param) | |||
| 1094 | { | 1092 | { |
| 1095 | DBG("Card inserted\n"); | 1093 | DBG("Card inserted\n"); |
| 1096 | host->flags |= WBSD_FCARD_PRESENT; | 1094 | host->flags |= WBSD_FCARD_PRESENT; |
| 1097 | change = 1; | 1095 | |
| 1096 | /* | ||
| 1097 | * Delay card detection to allow electrical connections | ||
| 1098 | * to stabilise. | ||
| 1099 | */ | ||
| 1100 | mod_timer(&host->timer, jiffies + HZ/2); | ||
| 1098 | } | 1101 | } |
| 1102 | |||
| 1103 | spin_unlock(&host->lock); | ||
| 1099 | } | 1104 | } |
| 1100 | else if (host->flags & WBSD_FCARD_PRESENT) | 1105 | else if (host->flags & WBSD_FCARD_PRESENT) |
| 1101 | { | 1106 | { |
| 1102 | DBG("Card removed\n"); | 1107 | DBG("Card removed\n"); |
| 1103 | host->flags &= ~WBSD_FCARD_PRESENT; | 1108 | host->flags &= ~WBSD_FCARD_PRESENT; |
| 1104 | change = 1; | ||
| 1105 | 1109 | ||
| 1106 | if (host->mrq) | 1110 | if (host->mrq) |
| 1107 | { | 1111 | { |
| @@ -1112,15 +1116,14 @@ static void wbsd_tasklet_card(unsigned long param) | |||
| 1112 | host->mrq->cmd->error = MMC_ERR_FAILED; | 1116 | host->mrq->cmd->error = MMC_ERR_FAILED; |
| 1113 | tasklet_schedule(&host->finish_tasklet); | 1117 | tasklet_schedule(&host->finish_tasklet); |
| 1114 | } | 1118 | } |
| 1115 | } | 1119 | |
| 1116 | 1120 | /* | |
| 1117 | /* | 1121 | * Unlock first since we might get a call back. |
| 1118 | * Unlock first since we might get a call back. | 1122 | */ |
| 1119 | */ | 1123 | spin_unlock(&host->lock); |
| 1120 | spin_unlock(&host->lock); | ||
| 1121 | 1124 | ||
| 1122 | if (change) | ||
| 1123 | mmc_detect_change(host->mmc); | 1125 | mmc_detect_change(host->mmc); |
| 1126 | } | ||
| 1124 | } | 1127 | } |
| 1125 | 1128 | ||
| 1126 | static void wbsd_tasklet_fifo(unsigned long param) | 1129 | static void wbsd_tasklet_fifo(unsigned long param) |
| @@ -1325,6 +1328,13 @@ static int __devinit wbsd_alloc_mmc(struct device* dev) | |||
| 1325 | spin_lock_init(&host->lock); | 1328 | spin_lock_init(&host->lock); |
| 1326 | 1329 | ||
| 1327 | /* | 1330 | /* |
| 1331 | * Set up detection timer | ||
| 1332 | */ | ||
| 1333 | init_timer(&host->timer); | ||
| 1334 | host->timer.data = (unsigned long)host; | ||
| 1335 | host->timer.function = wbsd_detect_card; | ||
| 1336 | |||
| 1337 | /* | ||
| 1328 | * Maximum number of segments. Worst case is one sector per segment | 1338 | * Maximum number of segments. Worst case is one sector per segment |
| 1329 | * so this will be 64kB/512. | 1339 | * so this will be 64kB/512. |
| 1330 | */ | 1340 | */ |
| @@ -1351,11 +1361,17 @@ static int __devinit wbsd_alloc_mmc(struct device* dev) | |||
| 1351 | static void __devexit wbsd_free_mmc(struct device* dev) | 1361 | static void __devexit wbsd_free_mmc(struct device* dev) |
| 1352 | { | 1362 | { |
| 1353 | struct mmc_host* mmc; | 1363 | struct mmc_host* mmc; |
| 1364 | struct wbsd_host* host; | ||
| 1354 | 1365 | ||
| 1355 | mmc = dev_get_drvdata(dev); | 1366 | mmc = dev_get_drvdata(dev); |
| 1356 | if (!mmc) | 1367 | if (!mmc) |
| 1357 | return; | 1368 | return; |
| 1358 | 1369 | ||
| 1370 | host = mmc_priv(mmc); | ||
| 1371 | BUG_ON(host == NULL); | ||
| 1372 | |||
| 1373 | del_timer_sync(&host->timer); | ||
| 1374 | |||
| 1359 | mmc_free_host(mmc); | 1375 | mmc_free_host(mmc); |
| 1360 | 1376 | ||
| 1361 | dev_set_drvdata(dev, NULL); | 1377 | dev_set_drvdata(dev, NULL); |
diff --git a/drivers/mmc/wbsd.h b/drivers/mmc/wbsd.h index 864f30828d01..661a9f6a6e6f 100644 --- a/drivers/mmc/wbsd.h +++ b/drivers/mmc/wbsd.h | |||
| @@ -8,13 +8,6 @@ | |||
| 8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | const int config_ports[] = { 0x2E, 0x4E }; | ||
| 12 | const int unlock_codes[] = { 0x83, 0x87 }; | ||
| 13 | |||
| 14 | const int valid_ids[] = { | ||
| 15 | 0x7112, | ||
| 16 | }; | ||
| 17 | |||
| 18 | #define LOCK_CODE 0xAA | 11 | #define LOCK_CODE 0xAA |
| 19 | 12 | ||
| 20 | #define WBSD_CONF_SWRST 0x02 | 13 | #define WBSD_CONF_SWRST 0x02 |
| @@ -187,4 +180,6 @@ struct wbsd_host | |||
| 187 | struct tasklet_struct timeout_tasklet; | 180 | struct tasklet_struct timeout_tasklet; |
| 188 | struct tasklet_struct finish_tasklet; | 181 | struct tasklet_struct finish_tasklet; |
| 189 | struct tasklet_struct block_tasklet; | 182 | struct tasklet_struct block_tasklet; |
| 183 | |||
| 184 | struct timer_list timer; /* Card detection timer */ | ||
| 190 | }; | 185 | }; |
diff --git a/drivers/mtd/afs.c b/drivers/mtd/afs.c index 801e6c7d0892..7363e101eb0f 100644 --- a/drivers/mtd/afs.c +++ b/drivers/mtd/afs.c | |||
| @@ -219,7 +219,7 @@ static int parse_afs_partitions(struct mtd_info *mtd, | |||
| 219 | */ | 219 | */ |
| 220 | for (idx = off = 0; off < mtd->size; off += mtd->erasesize) { | 220 | for (idx = off = 0; off < mtd->size; off += mtd->erasesize) { |
| 221 | struct image_info_struct iis; | 221 | struct image_info_struct iis; |
| 222 | u_int iis_ptr, img_ptr, size; | 222 | u_int iis_ptr, img_ptr; |
| 223 | 223 | ||
| 224 | /* Read the footer. */ | 224 | /* Read the footer. */ |
| 225 | ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask); | 225 | ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask); |
| @@ -236,21 +236,9 @@ static int parse_afs_partitions(struct mtd_info *mtd, | |||
| 236 | continue; | 236 | continue; |
| 237 | 237 | ||
| 238 | strcpy(str, iis.name); | 238 | strcpy(str, iis.name); |
| 239 | size = mtd->erasesize + off - img_ptr; | ||
| 240 | |||
| 241 | /* | ||
| 242 | * In order to support JFFS2 partitions on this layout, | ||
| 243 | * we must lie to MTD about the real size of JFFS2 | ||
| 244 | * partitions; this ensures that the AFS flash footer | ||
| 245 | * won't be erased by JFFS2. Please ensure that your | ||
| 246 | * JFFS2 partitions are given image numbers between | ||
| 247 | * 1000 and 2000 inclusive. | ||
| 248 | */ | ||
| 249 | if (iis.imageNumber >= 1000 && iis.imageNumber < 2000) | ||
| 250 | size -= mtd->erasesize; | ||
| 251 | 239 | ||
| 252 | parts[idx].name = str; | 240 | parts[idx].name = str; |
| 253 | parts[idx].size = size; | 241 | parts[idx].size = (iis.length + mtd->erasesize - 1) & ~(mtd->erasesize - 1); |
| 254 | parts[idx].offset = img_ptr; | 242 | parts[idx].offset = img_ptr; |
| 255 | parts[idx].mask_flags = 0; | 243 | parts[idx].mask_flags = 0; |
| 256 | 244 | ||
diff --git a/drivers/net/shaper.c b/drivers/net/shaper.c index 20edeb345792..3ad0b6751f6f 100644 --- a/drivers/net/shaper.c +++ b/drivers/net/shaper.c | |||
| @@ -135,10 +135,8 @@ static int shaper_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 135 | { | 135 | { |
| 136 | struct shaper *shaper = dev->priv; | 136 | struct shaper *shaper = dev->priv; |
| 137 | struct sk_buff *ptr; | 137 | struct sk_buff *ptr; |
| 138 | 138 | ||
| 139 | if (down_trylock(&shaper->sem)) | 139 | spin_lock(&shaper->lock); |
| 140 | return -1; | ||
| 141 | |||
| 142 | ptr=shaper->sendq.prev; | 140 | ptr=shaper->sendq.prev; |
| 143 | 141 | ||
| 144 | /* | 142 | /* |
| @@ -232,7 +230,7 @@ static int shaper_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 232 | shaper->stats.collisions++; | 230 | shaper->stats.collisions++; |
| 233 | } | 231 | } |
| 234 | shaper_kick(shaper); | 232 | shaper_kick(shaper); |
| 235 | up(&shaper->sem); | 233 | spin_unlock(&shaper->lock); |
| 236 | return 0; | 234 | return 0; |
| 237 | } | 235 | } |
| 238 | 236 | ||
| @@ -271,11 +269,9 @@ static void shaper_timer(unsigned long data) | |||
| 271 | { | 269 | { |
| 272 | struct shaper *shaper = (struct shaper *)data; | 270 | struct shaper *shaper = (struct shaper *)data; |
| 273 | 271 | ||
| 274 | if (!down_trylock(&shaper->sem)) { | 272 | spin_lock(&shaper->lock); |
| 275 | shaper_kick(shaper); | 273 | shaper_kick(shaper); |
| 276 | up(&shaper->sem); | 274 | spin_unlock(&shaper->lock); |
| 277 | } else | ||
| 278 | mod_timer(&shaper->timer, jiffies); | ||
| 279 | } | 275 | } |
| 280 | 276 | ||
| 281 | /* | 277 | /* |
| @@ -332,21 +328,6 @@ static void shaper_kick(struct shaper *shaper) | |||
| 332 | 328 | ||
| 333 | 329 | ||
| 334 | /* | 330 | /* |
| 335 | * Flush the shaper queues on a closedown | ||
| 336 | */ | ||
| 337 | |||
| 338 | static void shaper_flush(struct shaper *shaper) | ||
| 339 | { | ||
| 340 | struct sk_buff *skb; | ||
| 341 | |||
| 342 | down(&shaper->sem); | ||
| 343 | while((skb=skb_dequeue(&shaper->sendq))!=NULL) | ||
| 344 | dev_kfree_skb(skb); | ||
| 345 | shaper_kick(shaper); | ||
| 346 | up(&shaper->sem); | ||
| 347 | } | ||
| 348 | |||
| 349 | /* | ||
| 350 | * Bring the interface up. We just disallow this until a | 331 | * Bring the interface up. We just disallow this until a |
| 351 | * bind. | 332 | * bind. |
| 352 | */ | 333 | */ |
| @@ -375,7 +356,15 @@ static int shaper_open(struct net_device *dev) | |||
| 375 | static int shaper_close(struct net_device *dev) | 356 | static int shaper_close(struct net_device *dev) |
| 376 | { | 357 | { |
| 377 | struct shaper *shaper=dev->priv; | 358 | struct shaper *shaper=dev->priv; |
| 378 | shaper_flush(shaper); | 359 | struct sk_buff *skb; |
| 360 | |||
| 361 | while ((skb = skb_dequeue(&shaper->sendq)) != NULL) | ||
| 362 | dev_kfree_skb(skb); | ||
| 363 | |||
| 364 | spin_lock_bh(&shaper->lock); | ||
| 365 | shaper_kick(shaper); | ||
| 366 | spin_unlock_bh(&shaper->lock); | ||
| 367 | |||
| 379 | del_timer_sync(&shaper->timer); | 368 | del_timer_sync(&shaper->timer); |
| 380 | return 0; | 369 | return 0; |
| 381 | } | 370 | } |
| @@ -576,6 +565,7 @@ static void shaper_init_priv(struct net_device *dev) | |||
| 576 | init_timer(&sh->timer); | 565 | init_timer(&sh->timer); |
| 577 | sh->timer.function=shaper_timer; | 566 | sh->timer.function=shaper_timer; |
| 578 | sh->timer.data=(unsigned long)sh; | 567 | sh->timer.data=(unsigned long)sh; |
| 568 | spin_lock_init(&sh->lock); | ||
| 579 | } | 569 | } |
| 580 | 570 | ||
| 581 | /* | 571 | /* |
diff --git a/drivers/net/skge.h b/drivers/net/skge.h index 14d0cc01fb9a..fced3d2bc072 100644 --- a/drivers/net/skge.h +++ b/drivers/net/skge.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | /* PCI config registers */ | 7 | /* PCI config registers */ |
| 8 | #define PCI_DEV_REG1 0x40 | 8 | #define PCI_DEV_REG1 0x40 |
| 9 | #define PCI_DEV_REG2 0x44 | 9 | #define PCI_DEV_REG2 0x44 |
| 10 | #define PCI_REV_DESC 0x4 | ||
| 10 | 11 | ||
| 11 | #define PCI_STATUS_ERROR_BITS (PCI_STATUS_DETECTED_PARITY | \ | 12 | #define PCI_STATUS_ERROR_BITS (PCI_STATUS_DETECTED_PARITY | \ |
| 12 | PCI_STATUS_SIG_SYSTEM_ERROR | \ | 13 | PCI_STATUS_SIG_SYSTEM_ERROR | \ |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 7e371b1209a1..54640686e983 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
| @@ -66,8 +66,8 @@ | |||
| 66 | 66 | ||
| 67 | #define DRV_MODULE_NAME "tg3" | 67 | #define DRV_MODULE_NAME "tg3" |
| 68 | #define PFX DRV_MODULE_NAME ": " | 68 | #define PFX DRV_MODULE_NAME ": " |
| 69 | #define DRV_MODULE_VERSION "3.32" | 69 | #define DRV_MODULE_VERSION "3.33" |
| 70 | #define DRV_MODULE_RELDATE "June 24, 2005" | 70 | #define DRV_MODULE_RELDATE "July 5, 2005" |
| 71 | 71 | ||
| 72 | #define TG3_DEF_MAC_MODE 0 | 72 | #define TG3_DEF_MAC_MODE 0 |
| 73 | #define TG3_DEF_RX_MODE 0 | 73 | #define TG3_DEF_RX_MODE 0 |
| @@ -5117,7 +5117,7 @@ static void tg3_set_bdinfo(struct tg3 *tp, u32 bdinfo_addr, | |||
| 5117 | } | 5117 | } |
| 5118 | 5118 | ||
| 5119 | static void __tg3_set_rx_mode(struct net_device *); | 5119 | static void __tg3_set_rx_mode(struct net_device *); |
| 5120 | static void tg3_set_coalesce(struct tg3 *tp, struct ethtool_coalesce *ec) | 5120 | static void __tg3_set_coalesce(struct tg3 *tp, struct ethtool_coalesce *ec) |
| 5121 | { | 5121 | { |
| 5122 | tw32(HOSTCC_RXCOL_TICKS, ec->rx_coalesce_usecs); | 5122 | tw32(HOSTCC_RXCOL_TICKS, ec->rx_coalesce_usecs); |
| 5123 | tw32(HOSTCC_TXCOL_TICKS, ec->tx_coalesce_usecs); | 5123 | tw32(HOSTCC_TXCOL_TICKS, ec->tx_coalesce_usecs); |
| @@ -5460,7 +5460,7 @@ static int tg3_reset_hw(struct tg3 *tp) | |||
| 5460 | udelay(10); | 5460 | udelay(10); |
| 5461 | } | 5461 | } |
| 5462 | 5462 | ||
| 5463 | tg3_set_coalesce(tp, &tp->coal); | 5463 | __tg3_set_coalesce(tp, &tp->coal); |
| 5464 | 5464 | ||
| 5465 | /* set status block DMA address */ | 5465 | /* set status block DMA address */ |
| 5466 | tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH, | 5466 | tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH, |
| @@ -7821,6 +7821,60 @@ static int tg3_get_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) | |||
| 7821 | return 0; | 7821 | return 0; |
| 7822 | } | 7822 | } |
| 7823 | 7823 | ||
| 7824 | static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) | ||
| 7825 | { | ||
| 7826 | struct tg3 *tp = netdev_priv(dev); | ||
| 7827 | u32 max_rxcoal_tick_int = 0, max_txcoal_tick_int = 0; | ||
| 7828 | u32 max_stat_coal_ticks = 0, min_stat_coal_ticks = 0; | ||
| 7829 | |||
| 7830 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { | ||
| 7831 | max_rxcoal_tick_int = MAX_RXCOAL_TICK_INT; | ||
| 7832 | max_txcoal_tick_int = MAX_TXCOAL_TICK_INT; | ||
| 7833 | max_stat_coal_ticks = MAX_STAT_COAL_TICKS; | ||
| 7834 | min_stat_coal_ticks = MIN_STAT_COAL_TICKS; | ||
| 7835 | } | ||
| 7836 | |||
| 7837 | if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) || | ||
| 7838 | (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) || | ||
| 7839 | (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) || | ||
| 7840 | (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) || | ||
| 7841 | (ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) || | ||
| 7842 | (ec->tx_coalesce_usecs_irq > max_txcoal_tick_int) || | ||
| 7843 | (ec->rx_max_coalesced_frames_irq > MAX_RXCOAL_MAXF_INT) || | ||
| 7844 | (ec->tx_max_coalesced_frames_irq > MAX_TXCOAL_MAXF_INT) || | ||
| 7845 | (ec->stats_block_coalesce_usecs > max_stat_coal_ticks) || | ||
| 7846 | (ec->stats_block_coalesce_usecs < min_stat_coal_ticks)) | ||
| 7847 | return -EINVAL; | ||
| 7848 | |||
| 7849 | /* No rx interrupts will be generated if both are zero */ | ||
| 7850 | if ((ec->rx_coalesce_usecs == 0) && | ||
| 7851 | (ec->rx_max_coalesced_frames == 0)) | ||
| 7852 | return -EINVAL; | ||
| 7853 | |||
| 7854 | /* No tx interrupts will be generated if both are zero */ | ||
| 7855 | if ((ec->tx_coalesce_usecs == 0) && | ||
| 7856 | (ec->tx_max_coalesced_frames == 0)) | ||
| 7857 | return -EINVAL; | ||
| 7858 | |||
| 7859 | /* Only copy relevant parameters, ignore all others. */ | ||
| 7860 | tp->coal.rx_coalesce_usecs = ec->rx_coalesce_usecs; | ||
| 7861 | tp->coal.tx_coalesce_usecs = ec->tx_coalesce_usecs; | ||
| 7862 | tp->coal.rx_max_coalesced_frames = ec->rx_max_coalesced_frames; | ||
| 7863 | tp->coal.tx_max_coalesced_frames = ec->tx_max_coalesced_frames; | ||
| 7864 | tp->coal.rx_coalesce_usecs_irq = ec->rx_coalesce_usecs_irq; | ||
| 7865 | tp->coal.tx_coalesce_usecs_irq = ec->tx_coalesce_usecs_irq; | ||
| 7866 | tp->coal.rx_max_coalesced_frames_irq = ec->rx_max_coalesced_frames_irq; | ||
| 7867 | tp->coal.tx_max_coalesced_frames_irq = ec->tx_max_coalesced_frames_irq; | ||
| 7868 | tp->coal.stats_block_coalesce_usecs = ec->stats_block_coalesce_usecs; | ||
| 7869 | |||
| 7870 | if (netif_running(dev)) { | ||
| 7871 | tg3_full_lock(tp, 0); | ||
| 7872 | __tg3_set_coalesce(tp, &tp->coal); | ||
| 7873 | tg3_full_unlock(tp); | ||
| 7874 | } | ||
| 7875 | return 0; | ||
| 7876 | } | ||
| 7877 | |||
| 7824 | static struct ethtool_ops tg3_ethtool_ops = { | 7878 | static struct ethtool_ops tg3_ethtool_ops = { |
| 7825 | .get_settings = tg3_get_settings, | 7879 | .get_settings = tg3_get_settings, |
| 7826 | .set_settings = tg3_set_settings, | 7880 | .set_settings = tg3_set_settings, |
| @@ -7856,6 +7910,7 @@ static struct ethtool_ops tg3_ethtool_ops = { | |||
| 7856 | .get_stats_count = tg3_get_stats_count, | 7910 | .get_stats_count = tg3_get_stats_count, |
| 7857 | .get_ethtool_stats = tg3_get_ethtool_stats, | 7911 | .get_ethtool_stats = tg3_get_ethtool_stats, |
| 7858 | .get_coalesce = tg3_get_coalesce, | 7912 | .get_coalesce = tg3_get_coalesce, |
| 7913 | .set_coalesce = tg3_set_coalesce, | ||
| 7859 | }; | 7914 | }; |
| 7860 | 7915 | ||
| 7861 | static void __devinit tg3_get_eeprom_size(struct tg3 *tp) | 7916 | static void __devinit tg3_get_eeprom_size(struct tg3 *tp) |
| @@ -9800,6 +9855,12 @@ static void __devinit tg3_init_coal(struct tg3 *tp) | |||
| 9800 | ec->tx_coalesce_usecs = LOW_TXCOL_TICKS_CLRTCKS; | 9855 | ec->tx_coalesce_usecs = LOW_TXCOL_TICKS_CLRTCKS; |
| 9801 | ec->tx_coalesce_usecs_irq = DEFAULT_TXCOAL_TICK_INT_CLRTCKS; | 9856 | ec->tx_coalesce_usecs_irq = DEFAULT_TXCOAL_TICK_INT_CLRTCKS; |
| 9802 | } | 9857 | } |
| 9858 | |||
| 9859 | if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { | ||
| 9860 | ec->rx_coalesce_usecs_irq = 0; | ||
| 9861 | ec->tx_coalesce_usecs_irq = 0; | ||
| 9862 | ec->stats_block_coalesce_usecs = 0; | ||
| 9863 | } | ||
| 9803 | } | 9864 | } |
| 9804 | 9865 | ||
| 9805 | static int __devinit tg3_init_one(struct pci_dev *pdev, | 9866 | static int __devinit tg3_init_one(struct pci_dev *pdev, |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 99c5f9675a56..70ad450733e6 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
| @@ -879,31 +879,41 @@ | |||
| 879 | #define LOW_RXCOL_TICKS_CLRTCKS 0x00000014 | 879 | #define LOW_RXCOL_TICKS_CLRTCKS 0x00000014 |
| 880 | #define DEFAULT_RXCOL_TICKS 0x00000048 | 880 | #define DEFAULT_RXCOL_TICKS 0x00000048 |
| 881 | #define HIGH_RXCOL_TICKS 0x00000096 | 881 | #define HIGH_RXCOL_TICKS 0x00000096 |
| 882 | #define MAX_RXCOL_TICKS 0x000003ff | ||
| 882 | #define HOSTCC_TXCOL_TICKS 0x00003c0c | 883 | #define HOSTCC_TXCOL_TICKS 0x00003c0c |
| 883 | #define LOW_TXCOL_TICKS 0x00000096 | 884 | #define LOW_TXCOL_TICKS 0x00000096 |
| 884 | #define LOW_TXCOL_TICKS_CLRTCKS 0x00000048 | 885 | #define LOW_TXCOL_TICKS_CLRTCKS 0x00000048 |
| 885 | #define DEFAULT_TXCOL_TICKS 0x0000012c | 886 | #define DEFAULT_TXCOL_TICKS 0x0000012c |
| 886 | #define HIGH_TXCOL_TICKS 0x00000145 | 887 | #define HIGH_TXCOL_TICKS 0x00000145 |
| 888 | #define MAX_TXCOL_TICKS 0x000003ff | ||
| 887 | #define HOSTCC_RXMAX_FRAMES 0x00003c10 | 889 | #define HOSTCC_RXMAX_FRAMES 0x00003c10 |
| 888 | #define LOW_RXMAX_FRAMES 0x00000005 | 890 | #define LOW_RXMAX_FRAMES 0x00000005 |
| 889 | #define DEFAULT_RXMAX_FRAMES 0x00000008 | 891 | #define DEFAULT_RXMAX_FRAMES 0x00000008 |
| 890 | #define HIGH_RXMAX_FRAMES 0x00000012 | 892 | #define HIGH_RXMAX_FRAMES 0x00000012 |
| 893 | #define MAX_RXMAX_FRAMES 0x000000ff | ||
| 891 | #define HOSTCC_TXMAX_FRAMES 0x00003c14 | 894 | #define HOSTCC_TXMAX_FRAMES 0x00003c14 |
| 892 | #define LOW_TXMAX_FRAMES 0x00000035 | 895 | #define LOW_TXMAX_FRAMES 0x00000035 |
| 893 | #define DEFAULT_TXMAX_FRAMES 0x0000004b | 896 | #define DEFAULT_TXMAX_FRAMES 0x0000004b |
| 894 | #define HIGH_TXMAX_FRAMES 0x00000052 | 897 | #define HIGH_TXMAX_FRAMES 0x00000052 |
| 898 | #define MAX_TXMAX_FRAMES 0x000000ff | ||
| 895 | #define HOSTCC_RXCOAL_TICK_INT 0x00003c18 | 899 | #define HOSTCC_RXCOAL_TICK_INT 0x00003c18 |
| 896 | #define DEFAULT_RXCOAL_TICK_INT 0x00000019 | 900 | #define DEFAULT_RXCOAL_TICK_INT 0x00000019 |
| 897 | #define DEFAULT_RXCOAL_TICK_INT_CLRTCKS 0x00000014 | 901 | #define DEFAULT_RXCOAL_TICK_INT_CLRTCKS 0x00000014 |
| 902 | #define MAX_RXCOAL_TICK_INT 0x000003ff | ||
| 898 | #define HOSTCC_TXCOAL_TICK_INT 0x00003c1c | 903 | #define HOSTCC_TXCOAL_TICK_INT 0x00003c1c |
| 899 | #define DEFAULT_TXCOAL_TICK_INT 0x00000019 | 904 | #define DEFAULT_TXCOAL_TICK_INT 0x00000019 |
| 900 | #define DEFAULT_TXCOAL_TICK_INT_CLRTCKS 0x00000014 | 905 | #define DEFAULT_TXCOAL_TICK_INT_CLRTCKS 0x00000014 |
| 906 | #define MAX_TXCOAL_TICK_INT 0x000003ff | ||
| 901 | #define HOSTCC_RXCOAL_MAXF_INT 0x00003c20 | 907 | #define HOSTCC_RXCOAL_MAXF_INT 0x00003c20 |
| 902 | #define DEFAULT_RXCOAL_MAXF_INT 0x00000005 | 908 | #define DEFAULT_RXCOAL_MAXF_INT 0x00000005 |
| 909 | #define MAX_RXCOAL_MAXF_INT 0x000000ff | ||
| 903 | #define HOSTCC_TXCOAL_MAXF_INT 0x00003c24 | 910 | #define HOSTCC_TXCOAL_MAXF_INT 0x00003c24 |
| 904 | #define DEFAULT_TXCOAL_MAXF_INT 0x00000005 | 911 | #define DEFAULT_TXCOAL_MAXF_INT 0x00000005 |
| 912 | #define MAX_TXCOAL_MAXF_INT 0x000000ff | ||
| 905 | #define HOSTCC_STAT_COAL_TICKS 0x00003c28 | 913 | #define HOSTCC_STAT_COAL_TICKS 0x00003c28 |
| 906 | #define DEFAULT_STAT_COAL_TICKS 0x000f4240 | 914 | #define DEFAULT_STAT_COAL_TICKS 0x000f4240 |
| 915 | #define MAX_STAT_COAL_TICKS 0xd693d400 | ||
| 916 | #define MIN_STAT_COAL_TICKS 0x00000064 | ||
| 907 | /* 0x3c2c --> 0x3c30 unused */ | 917 | /* 0x3c2c --> 0x3c30 unused */ |
| 908 | #define HOSTCC_STATS_BLK_HOST_ADDR 0x00003c30 /* 64-bit */ | 918 | #define HOSTCC_STATS_BLK_HOST_ADDR 0x00003c30 /* 64-bit */ |
| 909 | #define HOSTCC_STATUS_BLK_HOST_ADDR 0x00003c38 /* 64-bit */ | 919 | #define HOSTCC_STATUS_BLK_HOST_ADDR 0x00003c38 /* 64-bit */ |
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 80edfa3abd29..4598c6a9212d 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c | |||
| @@ -3008,7 +3008,7 @@ static int __init parport_pc_init_superio (int autoirq, int autodma) | |||
| 3008 | int ret = 0; | 3008 | int ret = 0; |
| 3009 | 3009 | ||
| 3010 | while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) { | 3010 | while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) { |
| 3011 | id = pci_match_device (parport_pc_pci_tbl, pdev); | 3011 | id = pci_match_id(parport_pc_pci_tbl, pdev); |
| 3012 | if (id == NULL || id->driver_data >= last_sio) | 3012 | if (id == NULL || id->driver_data >= last_sio) |
| 3013 | continue; | 3013 | continue; |
| 3014 | 3014 | ||
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 7dea494c0d7b..3657f6199c48 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile | |||
| @@ -19,6 +19,7 @@ obj-$(CONFIG_HOTPLUG_PCI) += hotplug/ | |||
| 19 | # | 19 | # |
| 20 | # Some architectures use the generic PCI setup functions | 20 | # Some architectures use the generic PCI setup functions |
| 21 | # | 21 | # |
| 22 | obj-$(CONFIG_X86) += setup-bus.o | ||
| 22 | obj-$(CONFIG_ALPHA) += setup-bus.o setup-irq.o | 23 | obj-$(CONFIG_ALPHA) += setup-bus.o setup-irq.o |
| 23 | obj-$(CONFIG_ARM) += setup-bus.o setup-irq.o | 24 | obj-$(CONFIG_ARM) += setup-bus.o setup-irq.o |
| 24 | obj-$(CONFIG_PARISC) += setup-bus.o | 25 | obj-$(CONFIG_PARISC) += setup-bus.o |
diff --git a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c index 3903f8c559b6..b844bc972324 100644 --- a/drivers/pci/hotplug.c +++ b/drivers/pci/hotplug.c | |||
| @@ -54,7 +54,7 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp, | |||
| 54 | 54 | ||
| 55 | envp[i++] = scratch; | 55 | envp[i++] = scratch; |
| 56 | length += scnprintf (scratch, buffer_size - length, | 56 | length += scnprintf (scratch, buffer_size - length, |
| 57 | "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x\n", | 57 | "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x", |
| 58 | pdev->vendor, pdev->device, | 58 | pdev->vendor, pdev->device, |
| 59 | pdev->subsystem_vendor, pdev->subsystem_device, | 59 | pdev->subsystem_vendor, pdev->subsystem_device, |
| 60 | (u8)(pdev->class >> 16), (u8)(pdev->class >> 8), | 60 | (u8)(pdev->class >> 16), (u8)(pdev->class >> 8), |
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index e65bf2b395aa..e4115a0d5ba6 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
| 8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
| 9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
| 10 | #include <linux/pci-dynids.h> | ||
| 11 | #include "pci.h" | 10 | #include "pci.h" |
| 12 | 11 | ||
| 13 | /* | 12 | /* |
| @@ -18,36 +17,12 @@ | |||
| 18 | * Dynamic device IDs are disabled for !CONFIG_HOTPLUG | 17 | * Dynamic device IDs are disabled for !CONFIG_HOTPLUG |
| 19 | */ | 18 | */ |
| 20 | 19 | ||
| 21 | #ifdef CONFIG_HOTPLUG | 20 | struct pci_dynid { |
| 22 | /** | 21 | struct list_head node; |
| 23 | * pci_device_probe_dynamic() | 22 | struct pci_device_id id; |
| 24 | * | 23 | }; |
| 25 | * Walk the dynamic ID list looking for a match. | ||
| 26 | * returns 0 and sets pci_dev->driver when drv claims pci_dev, else error. | ||
| 27 | */ | ||
| 28 | static int | ||
| 29 | pci_device_probe_dynamic(struct pci_driver *drv, struct pci_dev *pci_dev) | ||
| 30 | { | ||
| 31 | int error = -ENODEV; | ||
| 32 | struct list_head *pos; | ||
| 33 | struct dynid *dynid; | ||
| 34 | 24 | ||
| 35 | spin_lock(&drv->dynids.lock); | 25 | #ifdef CONFIG_HOTPLUG |
| 36 | list_for_each(pos, &drv->dynids.list) { | ||
| 37 | dynid = list_entry(pos, struct dynid, node); | ||
| 38 | if (pci_match_one_device(&dynid->id, pci_dev)) { | ||
| 39 | spin_unlock(&drv->dynids.lock); | ||
| 40 | error = drv->probe(pci_dev, &dynid->id); | ||
| 41 | if (error >= 0) { | ||
| 42 | pci_dev->driver = drv; | ||
| 43 | return 0; | ||
| 44 | } | ||
| 45 | return error; | ||
| 46 | } | ||
| 47 | } | ||
| 48 | spin_unlock(&drv->dynids.lock); | ||
| 49 | return error; | ||
| 50 | } | ||
| 51 | 26 | ||
| 52 | /** | 27 | /** |
| 53 | * store_new_id | 28 | * store_new_id |
| @@ -58,8 +33,7 @@ pci_device_probe_dynamic(struct pci_driver *drv, struct pci_dev *pci_dev) | |||
| 58 | static inline ssize_t | 33 | static inline ssize_t |
| 59 | store_new_id(struct device_driver *driver, const char *buf, size_t count) | 34 | store_new_id(struct device_driver *driver, const char *buf, size_t count) |
| 60 | { | 35 | { |
| 61 | struct dynid *dynid; | 36 | struct pci_dynid *dynid; |
| 62 | struct bus_type * bus; | ||
| 63 | struct pci_driver *pdrv = to_pci_driver(driver); | 37 | struct pci_driver *pdrv = to_pci_driver(driver); |
| 64 | __u32 vendor=PCI_ANY_ID, device=PCI_ANY_ID, subvendor=PCI_ANY_ID, | 38 | __u32 vendor=PCI_ANY_ID, device=PCI_ANY_ID, subvendor=PCI_ANY_ID, |
| 65 | subdevice=PCI_ANY_ID, class=0, class_mask=0; | 39 | subdevice=PCI_ANY_ID, class=0, class_mask=0; |
| @@ -91,37 +65,22 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count) | |||
| 91 | list_add_tail(&pdrv->dynids.list, &dynid->node); | 65 | list_add_tail(&pdrv->dynids.list, &dynid->node); |
| 92 | spin_unlock(&pdrv->dynids.lock); | 66 | spin_unlock(&pdrv->dynids.lock); |
| 93 | 67 | ||
| 94 | bus = get_bus(pdrv->driver.bus); | 68 | if (get_driver(&pdrv->driver)) { |
| 95 | if (bus) { | 69 | driver_attach(&pdrv->driver); |
| 96 | if (get_driver(&pdrv->driver)) { | 70 | put_driver(&pdrv->driver); |
| 97 | down_write(&bus->subsys.rwsem); | ||
| 98 | driver_attach(&pdrv->driver); | ||
| 99 | up_write(&bus->subsys.rwsem); | ||
| 100 | put_driver(&pdrv->driver); | ||
| 101 | } | ||
| 102 | put_bus(bus); | ||
| 103 | } | 71 | } |
| 104 | 72 | ||
| 105 | return count; | 73 | return count; |
| 106 | } | 74 | } |
| 107 | |||
| 108 | static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id); | 75 | static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id); |
| 109 | static inline void | ||
| 110 | pci_init_dynids(struct pci_dynids *dynids) | ||
| 111 | { | ||
| 112 | spin_lock_init(&dynids->lock); | ||
| 113 | INIT_LIST_HEAD(&dynids->list); | ||
| 114 | } | ||
| 115 | 76 | ||
| 116 | static void | 77 | static void |
| 117 | pci_free_dynids(struct pci_driver *drv) | 78 | pci_free_dynids(struct pci_driver *drv) |
| 118 | { | 79 | { |
| 119 | struct list_head *pos, *n; | 80 | struct pci_dynid *dynid, *n; |
| 120 | struct dynid *dynid; | ||
| 121 | 81 | ||
| 122 | spin_lock(&drv->dynids.lock); | 82 | spin_lock(&drv->dynids.lock); |
| 123 | list_for_each_safe(pos, n, &drv->dynids.list) { | 83 | list_for_each_entry_safe(dynid, n, &drv->dynids.list, node) { |
| 124 | dynid = list_entry(pos, struct dynid, node); | ||
| 125 | list_del(&dynid->node); | 84 | list_del(&dynid->node); |
| 126 | kfree(dynid); | 85 | kfree(dynid); |
| 127 | } | 86 | } |
| @@ -138,83 +97,70 @@ pci_create_newid_file(struct pci_driver *drv) | |||
| 138 | return error; | 97 | return error; |
| 139 | } | 98 | } |
| 140 | 99 | ||
| 141 | static int | ||
| 142 | pci_bus_match_dynids(const struct pci_dev *pci_dev, struct pci_driver *pci_drv) | ||
| 143 | { | ||
| 144 | struct list_head *pos; | ||
| 145 | struct dynid *dynid; | ||
| 146 | |||
| 147 | spin_lock(&pci_drv->dynids.lock); | ||
| 148 | list_for_each(pos, &pci_drv->dynids.list) { | ||
| 149 | dynid = list_entry(pos, struct dynid, node); | ||
| 150 | if (pci_match_one_device(&dynid->id, pci_dev)) { | ||
| 151 | spin_unlock(&pci_drv->dynids.lock); | ||
| 152 | return 1; | ||
| 153 | } | ||
| 154 | } | ||
| 155 | spin_unlock(&pci_drv->dynids.lock); | ||
| 156 | return 0; | ||
| 157 | } | ||
| 158 | |||
| 159 | #else /* !CONFIG_HOTPLUG */ | 100 | #else /* !CONFIG_HOTPLUG */ |
| 160 | static inline int pci_device_probe_dynamic(struct pci_driver *drv, struct pci_dev *pci_dev) | ||
| 161 | { | ||
| 162 | return -ENODEV; | ||
| 163 | } | ||
| 164 | static inline void pci_init_dynids(struct pci_dynids *dynids) {} | ||
| 165 | static inline void pci_free_dynids(struct pci_driver *drv) {} | 101 | static inline void pci_free_dynids(struct pci_driver *drv) {} |
| 166 | static inline int pci_create_newid_file(struct pci_driver *drv) | 102 | static inline int pci_create_newid_file(struct pci_driver *drv) |
| 167 | { | 103 | { |
| 168 | return 0; | 104 | return 0; |
| 169 | } | 105 | } |
| 170 | static inline int pci_bus_match_dynids(const struct pci_dev *pci_dev, struct pci_driver *pci_drv) | ||
| 171 | { | ||
| 172 | return 0; | ||
| 173 | } | ||
| 174 | #endif | 106 | #endif |
| 175 | 107 | ||
| 176 | /** | 108 | /** |
| 177 | * pci_match_device - Tell if a PCI device structure has a matching | 109 | * pci_match_id - See if a pci device matches a given pci_id table |
| 178 | * PCI device id structure | ||
| 179 | * @ids: array of PCI device id structures to search in | 110 | * @ids: array of PCI device id structures to search in |
| 180 | * @dev: the PCI device structure to match against | 111 | * @dev: the PCI device structure to match against. |
| 181 | * | 112 | * |
| 182 | * Used by a driver to check whether a PCI device present in the | 113 | * Used by a driver to check whether a PCI device present in the |
| 183 | * system is in its list of supported devices.Returns the matching | 114 | * system is in its list of supported devices. Returns the matching |
| 184 | * pci_device_id structure or %NULL if there is no match. | 115 | * pci_device_id structure or %NULL if there is no match. |
| 116 | * | ||
| 117 | * Depreciated, don't use this as it will not catch any dynamic ids | ||
| 118 | * that a driver might want to check for. | ||
| 185 | */ | 119 | */ |
| 186 | const struct pci_device_id * | 120 | const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, |
| 187 | pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) | 121 | struct pci_dev *dev) |
| 188 | { | 122 | { |
| 189 | while (ids->vendor || ids->subvendor || ids->class_mask) { | 123 | if (ids) { |
| 190 | if (pci_match_one_device(ids, dev)) | 124 | while (ids->vendor || ids->subvendor || ids->class_mask) { |
| 191 | return ids; | 125 | if (pci_match_one_device(ids, dev)) |
| 192 | ids++; | 126 | return ids; |
| 127 | ids++; | ||
| 128 | } | ||
| 193 | } | 129 | } |
| 194 | return NULL; | 130 | return NULL; |
| 195 | } | 131 | } |
| 196 | 132 | ||
| 197 | /** | 133 | /** |
| 198 | * pci_device_probe_static() | 134 | * pci_match_device - Tell if a PCI device structure has a matching |
| 199 | * | 135 | * PCI device id structure |
| 200 | * returns 0 and sets pci_dev->driver when drv claims pci_dev, else error. | 136 | * @ids: array of PCI device id structures to search in |
| 137 | * @dev: the PCI device structure to match against | ||
| 138 | * @drv: the PCI driver to match against | ||
| 139 | * | ||
| 140 | * Used by a driver to check whether a PCI device present in the | ||
| 141 | * system is in its list of supported devices. Returns the matching | ||
| 142 | * pci_device_id structure or %NULL if there is no match. | ||
| 201 | */ | 143 | */ |
| 202 | static int | 144 | const struct pci_device_id *pci_match_device(struct pci_driver *drv, |
| 203 | pci_device_probe_static(struct pci_driver *drv, struct pci_dev *pci_dev) | 145 | struct pci_dev *dev) |
| 204 | { | 146 | { |
| 205 | int error = -ENODEV; | ||
| 206 | const struct pci_device_id *id; | 147 | const struct pci_device_id *id; |
| 148 | struct pci_dynid *dynid; | ||
| 207 | 149 | ||
| 208 | if (!drv->id_table) | 150 | id = pci_match_id(drv->id_table, dev); |
| 209 | return error; | ||
| 210 | id = pci_match_device(drv->id_table, pci_dev); | ||
| 211 | if (id) | 151 | if (id) |
| 212 | error = drv->probe(pci_dev, id); | 152 | return id; |
| 213 | if (error >= 0) { | 153 | |
| 214 | pci_dev->driver = drv; | 154 | /* static ids didn't match, lets look at the dynamic ones */ |
| 215 | error = 0; | 155 | spin_lock(&drv->dynids.lock); |
| 156 | list_for_each_entry(dynid, &drv->dynids.list, node) { | ||
| 157 | if (pci_match_one_device(&dynid->id, dev)) { | ||
| 158 | spin_unlock(&drv->dynids.lock); | ||
| 159 | return &dynid->id; | ||
| 160 | } | ||
| 216 | } | 161 | } |
| 217 | return error; | 162 | spin_unlock(&drv->dynids.lock); |
| 163 | return NULL; | ||
| 218 | } | 164 | } |
| 219 | 165 | ||
| 220 | /** | 166 | /** |
| @@ -225,13 +171,20 @@ pci_device_probe_static(struct pci_driver *drv, struct pci_dev *pci_dev) | |||
| 225 | */ | 171 | */ |
| 226 | static int | 172 | static int |
| 227 | __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev) | 173 | __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev) |
| 228 | { | 174 | { |
| 175 | const struct pci_device_id *id; | ||
| 229 | int error = 0; | 176 | int error = 0; |
| 230 | 177 | ||
| 231 | if (!pci_dev->driver && drv->probe) { | 178 | if (!pci_dev->driver && drv->probe) { |
| 232 | error = pci_device_probe_static(drv, pci_dev); | 179 | error = -ENODEV; |
| 233 | if (error == -ENODEV) | 180 | |
| 234 | error = pci_device_probe_dynamic(drv, pci_dev); | 181 | id = pci_match_device(drv, pci_dev); |
| 182 | if (id) | ||
| 183 | error = drv->probe(pci_dev, id); | ||
| 184 | if (error >= 0) { | ||
| 185 | pci_dev->driver = drv; | ||
| 186 | error = 0; | ||
| 187 | } | ||
| 235 | } | 188 | } |
| 236 | return error; | 189 | return error; |
| 237 | } | 190 | } |
| @@ -371,12 +324,6 @@ static struct kobj_type pci_driver_kobj_type = { | |||
| 371 | .sysfs_ops = &pci_driver_sysfs_ops, | 324 | .sysfs_ops = &pci_driver_sysfs_ops, |
| 372 | }; | 325 | }; |
| 373 | 326 | ||
| 374 | static int | ||
| 375 | pci_populate_driver_dir(struct pci_driver *drv) | ||
| 376 | { | ||
| 377 | return pci_create_newid_file(drv); | ||
| 378 | } | ||
| 379 | |||
| 380 | /** | 327 | /** |
| 381 | * pci_register_driver - register a new pci driver | 328 | * pci_register_driver - register a new pci driver |
| 382 | * @drv: the driver structure to register | 329 | * @drv: the driver structure to register |
| @@ -401,13 +348,15 @@ int pci_register_driver(struct pci_driver *drv) | |||
| 401 | drv->driver.shutdown = pci_device_shutdown; | 348 | drv->driver.shutdown = pci_device_shutdown; |
| 402 | drv->driver.owner = drv->owner; | 349 | drv->driver.owner = drv->owner; |
| 403 | drv->driver.kobj.ktype = &pci_driver_kobj_type; | 350 | drv->driver.kobj.ktype = &pci_driver_kobj_type; |
| 404 | pci_init_dynids(&drv->dynids); | 351 | |
| 352 | spin_lock_init(&drv->dynids.lock); | ||
| 353 | INIT_LIST_HEAD(&drv->dynids.list); | ||
| 405 | 354 | ||
| 406 | /* register with core */ | 355 | /* register with core */ |
| 407 | error = driver_register(&drv->driver); | 356 | error = driver_register(&drv->driver); |
| 408 | 357 | ||
| 409 | if (!error) | 358 | if (!error) |
| 410 | pci_populate_driver_dir(drv); | 359 | error = pci_create_newid_file(drv); |
| 411 | 360 | ||
| 412 | return error; | 361 | return error; |
| 413 | } | 362 | } |
| @@ -463,21 +412,17 @@ pci_dev_driver(const struct pci_dev *dev) | |||
| 463 | * system is in its list of supported devices.Returns the matching | 412 | * system is in its list of supported devices.Returns the matching |
| 464 | * pci_device_id structure or %NULL if there is no match. | 413 | * pci_device_id structure or %NULL if there is no match. |
| 465 | */ | 414 | */ |
| 466 | static int pci_bus_match(struct device * dev, struct device_driver * drv) | 415 | static int pci_bus_match(struct device *dev, struct device_driver *drv) |
| 467 | { | 416 | { |
| 468 | const struct pci_dev * pci_dev = to_pci_dev(dev); | 417 | struct pci_dev *pci_dev = to_pci_dev(dev); |
| 469 | struct pci_driver * pci_drv = to_pci_driver(drv); | 418 | struct pci_driver *pci_drv = to_pci_driver(drv); |
| 470 | const struct pci_device_id * ids = pci_drv->id_table; | ||
| 471 | const struct pci_device_id *found_id; | 419 | const struct pci_device_id *found_id; |
| 472 | 420 | ||
| 473 | if (!ids) | 421 | found_id = pci_match_device(pci_drv, pci_dev); |
| 474 | return 0; | ||
| 475 | |||
| 476 | found_id = pci_match_device(ids, pci_dev); | ||
| 477 | if (found_id) | 422 | if (found_id) |
| 478 | return 1; | 423 | return 1; |
| 479 | 424 | ||
| 480 | return pci_bus_match_dynids(pci_dev, pci_drv); | 425 | return 0; |
| 481 | } | 426 | } |
| 482 | 427 | ||
| 483 | /** | 428 | /** |
| @@ -536,6 +481,7 @@ static int __init pci_driver_init(void) | |||
| 536 | 481 | ||
| 537 | postcore_initcall(pci_driver_init); | 482 | postcore_initcall(pci_driver_init); |
| 538 | 483 | ||
| 484 | EXPORT_SYMBOL(pci_match_id); | ||
| 539 | EXPORT_SYMBOL(pci_match_device); | 485 | EXPORT_SYMBOL(pci_match_device); |
| 540 | EXPORT_SYMBOL(pci_register_driver); | 486 | EXPORT_SYMBOL(pci_register_driver); |
| 541 | EXPORT_SYMBOL(pci_unregister_driver); | 487 | EXPORT_SYMBOL(pci_unregister_driver); |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index f04b9ffe4153..d382bdb7b560 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -334,10 +334,6 @@ EXPORT_SYMBOL(pci_choose_state); | |||
| 334 | /** | 334 | /** |
| 335 | * pci_save_state - save the PCI configuration space of a device before suspending | 335 | * pci_save_state - save the PCI configuration space of a device before suspending |
| 336 | * @dev: - PCI device that we're dealing with | 336 | * @dev: - PCI device that we're dealing with |
| 337 | * @buffer: - buffer to hold config space context | ||
| 338 | * | ||
| 339 | * @buffer must be large enough to hold the entire PCI 2.2 config space | ||
| 340 | * (>= 64 bytes). | ||
| 341 | */ | 337 | */ |
| 342 | int | 338 | int |
| 343 | pci_save_state(struct pci_dev *dev) | 339 | pci_save_state(struct pci_dev *dev) |
| @@ -352,8 +348,6 @@ pci_save_state(struct pci_dev *dev) | |||
| 352 | /** | 348 | /** |
| 353 | * pci_restore_state - Restore the saved state of a PCI device | 349 | * pci_restore_state - Restore the saved state of a PCI device |
| 354 | * @dev: - PCI device that we're dealing with | 350 | * @dev: - PCI device that we're dealing with |
| 355 | * @buffer: - saved PCI config space | ||
| 356 | * | ||
| 357 | */ | 351 | */ |
| 358 | int | 352 | int |
| 359 | pci_restore_state(struct pci_dev *dev) | 353 | pci_restore_state(struct pci_dev *dev) |
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h index 537b372dc340..a63bd8f72601 100644 --- a/drivers/pci/pcie/portdrv.h +++ b/drivers/pci/pcie/portdrv.h | |||
| @@ -27,6 +27,11 @@ | |||
| 27 | 27 | ||
| 28 | #define get_descriptor_id(type, service) (((type - 4) << 4) | service) | 28 | #define get_descriptor_id(type, service) (((type - 4) << 4) | service) |
| 29 | 29 | ||
| 30 | struct pcie_port_device_ext { | ||
| 31 | int interrupt_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */ | ||
| 32 | unsigned int saved_msi_config_space[5]; | ||
| 33 | }; | ||
| 34 | |||
| 30 | extern struct bus_type pcie_port_bus_type; | 35 | extern struct bus_type pcie_port_bus_type; |
| 31 | extern int pcie_port_device_probe(struct pci_dev *dev); | 36 | extern int pcie_port_device_probe(struct pci_dev *dev); |
| 32 | extern int pcie_port_device_register(struct pci_dev *dev); | 37 | extern int pcie_port_device_register(struct pci_dev *dev); |
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index f5c5f10a3d2f..4db69982876e 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c | |||
| @@ -275,10 +275,17 @@ int pcie_port_device_probe(struct pci_dev *dev) | |||
| 275 | 275 | ||
| 276 | int pcie_port_device_register(struct pci_dev *dev) | 276 | int pcie_port_device_register(struct pci_dev *dev) |
| 277 | { | 277 | { |
| 278 | struct pcie_port_device_ext *p_ext; | ||
| 278 | int status, type, capabilities, irq_mode, i; | 279 | int status, type, capabilities, irq_mode, i; |
| 279 | int vectors[PCIE_PORT_DEVICE_MAXSERVICES]; | 280 | int vectors[PCIE_PORT_DEVICE_MAXSERVICES]; |
| 280 | u16 reg16; | 281 | u16 reg16; |
| 281 | 282 | ||
| 283 | /* Allocate port device extension */ | ||
| 284 | if (!(p_ext = kmalloc(sizeof(struct pcie_port_device_ext), GFP_KERNEL))) | ||
| 285 | return -ENOMEM; | ||
| 286 | |||
| 287 | pci_set_drvdata(dev, p_ext); | ||
| 288 | |||
| 282 | /* Get port type */ | 289 | /* Get port type */ |
| 283 | pci_read_config_word(dev, | 290 | pci_read_config_word(dev, |
| 284 | pci_find_capability(dev, PCI_CAP_ID_EXP) + | 291 | pci_find_capability(dev, PCI_CAP_ID_EXP) + |
| @@ -288,6 +295,7 @@ int pcie_port_device_register(struct pci_dev *dev) | |||
| 288 | /* Now get port services */ | 295 | /* Now get port services */ |
| 289 | capabilities = get_port_device_capability(dev); | 296 | capabilities = get_port_device_capability(dev); |
| 290 | irq_mode = assign_interrupt_mode(dev, vectors, capabilities); | 297 | irq_mode = assign_interrupt_mode(dev, vectors, capabilities); |
| 298 | p_ext->interrupt_mode = irq_mode; | ||
| 291 | 299 | ||
| 292 | /* Allocate child services if any */ | 300 | /* Allocate child services if any */ |
| 293 | for (i = 0; i < PCIE_PORT_DEVICE_MAXSERVICES; i++) { | 301 | for (i = 0; i < PCIE_PORT_DEVICE_MAXSERVICES; i++) { |
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index e9095ee508e3..30bac7ed7c16 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
| @@ -29,6 +29,78 @@ MODULE_LICENSE("GPL"); | |||
| 29 | /* global data */ | 29 | /* global data */ |
| 30 | static const char device_name[] = "pcieport-driver"; | 30 | static const char device_name[] = "pcieport-driver"; |
| 31 | 31 | ||
| 32 | static void pci_save_msi_state(struct pci_dev *dev) | ||
| 33 | { | ||
| 34 | struct pcie_port_device_ext *p_ext = pci_get_drvdata(dev); | ||
| 35 | int i = 0, pos; | ||
| 36 | u16 control; | ||
| 37 | |||
| 38 | if ((pos = pci_find_capability(dev, PCI_CAP_ID_MSI)) <= 0) | ||
| 39 | return; | ||
| 40 | |||
| 41 | pci_read_config_dword(dev, pos, &p_ext->saved_msi_config_space[i++]); | ||
| 42 | control = p_ext->saved_msi_config_space[0] >> 16; | ||
| 43 | pci_read_config_dword(dev, pos + PCI_MSI_ADDRESS_LO, | ||
| 44 | &p_ext->saved_msi_config_space[i++]); | ||
| 45 | if (control & PCI_MSI_FLAGS_64BIT) { | ||
| 46 | pci_read_config_dword(dev, pos + PCI_MSI_ADDRESS_HI, | ||
| 47 | &p_ext->saved_msi_config_space[i++]); | ||
| 48 | pci_read_config_dword(dev, pos + PCI_MSI_DATA_64, | ||
| 49 | &p_ext->saved_msi_config_space[i++]); | ||
| 50 | } else | ||
| 51 | pci_read_config_dword(dev, pos + PCI_MSI_DATA_32, | ||
| 52 | &p_ext->saved_msi_config_space[i++]); | ||
| 53 | if (control & PCI_MSI_FLAGS_MASKBIT) | ||
| 54 | pci_read_config_dword(dev, pos + PCI_MSI_MASK_BIT, | ||
| 55 | &p_ext->saved_msi_config_space[i++]); | ||
| 56 | } | ||
| 57 | |||
| 58 | static void pci_restore_msi_state(struct pci_dev *dev) | ||
| 59 | { | ||
| 60 | struct pcie_port_device_ext *p_ext = pci_get_drvdata(dev); | ||
| 61 | int i = 0, pos; | ||
| 62 | u16 control; | ||
| 63 | |||
| 64 | if ((pos = pci_find_capability(dev, PCI_CAP_ID_MSI)) <= 0) | ||
| 65 | return; | ||
| 66 | |||
| 67 | control = p_ext->saved_msi_config_space[i++] >> 16; | ||
| 68 | pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control); | ||
| 69 | pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_LO, | ||
| 70 | p_ext->saved_msi_config_space[i++]); | ||
| 71 | if (control & PCI_MSI_FLAGS_64BIT) { | ||
| 72 | pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_HI, | ||
| 73 | p_ext->saved_msi_config_space[i++]); | ||
| 74 | pci_write_config_dword(dev, pos + PCI_MSI_DATA_64, | ||
| 75 | p_ext->saved_msi_config_space[i++]); | ||
| 76 | } else | ||
| 77 | pci_write_config_dword(dev, pos + PCI_MSI_DATA_32, | ||
| 78 | p_ext->saved_msi_config_space[i++]); | ||
| 79 | if (control & PCI_MSI_FLAGS_MASKBIT) | ||
| 80 | pci_write_config_dword(dev, pos + PCI_MSI_MASK_BIT, | ||
| 81 | p_ext->saved_msi_config_space[i++]); | ||
| 82 | } | ||
| 83 | |||
| 84 | static void pcie_portdrv_save_config(struct pci_dev *dev) | ||
| 85 | { | ||
| 86 | struct pcie_port_device_ext *p_ext = pci_get_drvdata(dev); | ||
| 87 | |||
| 88 | pci_save_state(dev); | ||
| 89 | if (p_ext->interrupt_mode == PCIE_PORT_MSI_MODE) | ||
| 90 | pci_save_msi_state(dev); | ||
| 91 | } | ||
| 92 | |||
| 93 | static void pcie_portdrv_restore_config(struct pci_dev *dev) | ||
| 94 | { | ||
| 95 | struct pcie_port_device_ext *p_ext = pci_get_drvdata(dev); | ||
| 96 | |||
| 97 | pci_restore_state(dev); | ||
| 98 | if (p_ext->interrupt_mode == PCIE_PORT_MSI_MODE) | ||
| 99 | pci_restore_msi_state(dev); | ||
| 100 | pci_enable_device(dev); | ||
| 101 | pci_set_master(dev); | ||
| 102 | } | ||
| 103 | |||
| 32 | /* | 104 | /* |
| 33 | * pcie_portdrv_probe - Probe PCI-Express port devices | 105 | * pcie_portdrv_probe - Probe PCI-Express port devices |
| 34 | * @dev: PCI-Express port device being probed | 106 | * @dev: PCI-Express port device being probed |
| @@ -64,16 +136,21 @@ static int __devinit pcie_portdrv_probe (struct pci_dev *dev, | |||
| 64 | static void pcie_portdrv_remove (struct pci_dev *dev) | 136 | static void pcie_portdrv_remove (struct pci_dev *dev) |
| 65 | { | 137 | { |
| 66 | pcie_port_device_remove(dev); | 138 | pcie_port_device_remove(dev); |
| 139 | kfree(pci_get_drvdata(dev)); | ||
| 67 | } | 140 | } |
| 68 | 141 | ||
| 69 | #ifdef CONFIG_PM | 142 | #ifdef CONFIG_PM |
| 70 | static int pcie_portdrv_suspend (struct pci_dev *dev, pm_message_t state) | 143 | static int pcie_portdrv_suspend (struct pci_dev *dev, pm_message_t state) |
| 71 | { | 144 | { |
| 72 | return pcie_port_device_suspend(dev, state); | 145 | int ret = pcie_port_device_suspend(dev, state); |
| 146 | |||
| 147 | pcie_portdrv_save_config(dev); | ||
| 148 | return ret; | ||
| 73 | } | 149 | } |
| 74 | 150 | ||
| 75 | static int pcie_portdrv_resume (struct pci_dev *dev) | 151 | static int pcie_portdrv_resume (struct pci_dev *dev) |
| 76 | { | 152 | { |
| 153 | pcie_portdrv_restore_config(dev); | ||
| 77 | return pcie_port_device_resume(dev); | 154 | return pcie_port_device_resume(dev); |
| 78 | } | 155 | } |
| 79 | #endif | 156 | #endif |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 6a0a82f0508b..df3bdae2040f 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
| @@ -239,9 +239,8 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
| 239 | 239 | ||
| 240 | if (dev->transparent) { | 240 | if (dev->transparent) { |
| 241 | printk(KERN_INFO "PCI: Transparent bridge - %s\n", pci_name(dev)); | 241 | printk(KERN_INFO "PCI: Transparent bridge - %s\n", pci_name(dev)); |
| 242 | for(i = 0; i < PCI_BUS_NUM_RESOURCES; i++) | 242 | for(i = 3; i < PCI_BUS_NUM_RESOURCES; i++) |
| 243 | child->resource[i] = child->parent->resource[i]; | 243 | child->resource[i] = child->parent->resource[i - 3]; |
| 244 | return; | ||
| 245 | } | 244 | } |
| 246 | 245 | ||
| 247 | for(i=0; i<3; i++) | 246 | for(i=0; i<3; i++) |
| @@ -398,6 +397,16 @@ static void pci_enable_crs(struct pci_dev *dev) | |||
| 398 | pci_write_config_word(dev, rpcap + PCI_EXP_RTCTL, rpctl); | 397 | pci_write_config_word(dev, rpcap + PCI_EXP_RTCTL, rpctl); |
| 399 | } | 398 | } |
| 400 | 399 | ||
| 400 | static void __devinit pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max) | ||
| 401 | { | ||
| 402 | struct pci_bus *parent = child->parent; | ||
| 403 | while (parent->parent && parent->subordinate < max) { | ||
| 404 | parent->subordinate = max; | ||
| 405 | pci_write_config_byte(parent->self, PCI_SUBORDINATE_BUS, max); | ||
| 406 | parent = parent->parent; | ||
| 407 | } | ||
| 408 | } | ||
| 409 | |||
| 401 | unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus); | 410 | unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus); |
| 402 | 411 | ||
| 403 | /* | 412 | /* |
| @@ -499,7 +508,13 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max | |||
| 499 | 508 | ||
| 500 | if (!is_cardbus) { | 509 | if (!is_cardbus) { |
| 501 | child->bridge_ctl = PCI_BRIDGE_CTL_NO_ISA; | 510 | child->bridge_ctl = PCI_BRIDGE_CTL_NO_ISA; |
| 502 | 511 | /* | |
| 512 | * Adjust subordinate busnr in parent buses. | ||
| 513 | * We do this before scanning for children because | ||
| 514 | * some devices may not be detected if the bios | ||
| 515 | * was lazy. | ||
| 516 | */ | ||
| 517 | pci_fixup_parent_subordinate_busnr(child, max); | ||
| 503 | /* Now we can scan all subordinate buses... */ | 518 | /* Now we can scan all subordinate buses... */ |
| 504 | max = pci_scan_child_bus(child); | 519 | max = pci_scan_child_bus(child); |
| 505 | } else { | 520 | } else { |
| @@ -513,6 +528,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max | |||
| 513 | max+i+1)) | 528 | max+i+1)) |
| 514 | break; | 529 | break; |
| 515 | max += i; | 530 | max += i; |
| 531 | pci_fixup_parent_subordinate_busnr(child, max); | ||
| 516 | } | 532 | } |
| 517 | /* | 533 | /* |
| 518 | * Set the subordinate bus number to its real value. | 534 | * Set the subordinate bus number to its real value. |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 968033fd29f0..1521fd5d95cc 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
| @@ -767,6 +767,7 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev) | |||
| 767 | if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) { | 767 | if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) { |
| 768 | if (dev->device == PCI_DEVICE_ID_INTEL_82845_HB) | 768 | if (dev->device == PCI_DEVICE_ID_INTEL_82845_HB) |
| 769 | switch(dev->subsystem_device) { | 769 | switch(dev->subsystem_device) { |
| 770 | case 0x8025: /* P4B-LX */ | ||
| 770 | case 0x8070: /* P4B */ | 771 | case 0x8070: /* P4B */ |
| 771 | case 0x8088: /* P4B533 */ | 772 | case 0x8088: /* P4B533 */ |
| 772 | case 0x1626: /* L3C notebook */ | 773 | case 0x1626: /* L3C notebook */ |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 6b628de948af..c1bdfb424658 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
| @@ -273,6 +273,8 @@ find_free_bus_resource(struct pci_bus *bus, unsigned long type) | |||
| 273 | 273 | ||
| 274 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | 274 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { |
| 275 | r = bus->resource[i]; | 275 | r = bus->resource[i]; |
| 276 | if (r == &ioport_resource || r == &iomem_resource) | ||
| 277 | continue; | ||
| 276 | if (r && (r->flags & type_mask) == type && !r->parent) | 278 | if (r && (r->flags & type_mask) == type && !r->parent) |
| 277 | return r; | 279 | return r; |
| 278 | } | 280 | } |
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c index 8f0f46907a81..87302fb14885 100644 --- a/drivers/sbus/char/bpp.c +++ b/drivers/sbus/char/bpp.c | |||
| @@ -79,10 +79,6 @@ struct inst { | |||
| 79 | 79 | ||
| 80 | unsigned char run_length; | 80 | unsigned char run_length; |
| 81 | unsigned char repeat_byte; | 81 | unsigned char repeat_byte; |
| 82 | |||
| 83 | /* These members manage timeouts for programmed delays */ | ||
| 84 | wait_queue_head_t wait_queue; | ||
| 85 | struct timer_list timer_list; | ||
| 86 | }; | 82 | }; |
| 87 | 83 | ||
| 88 | static struct inst instances[BPP_NO]; | 84 | static struct inst instances[BPP_NO]; |
| @@ -297,16 +293,10 @@ static unsigned short get_pins(unsigned minor) | |||
| 297 | 293 | ||
| 298 | #endif /* __sparc__ */ | 294 | #endif /* __sparc__ */ |
| 299 | 295 | ||
| 300 | static void bpp_wake_up(unsigned long val) | ||
| 301 | { wake_up(&instances[val].wait_queue); } | ||
| 302 | |||
| 303 | static void snooze(unsigned long snooze_time, unsigned minor) | 296 | static void snooze(unsigned long snooze_time, unsigned minor) |
| 304 | { | 297 | { |
| 305 | init_timer(&instances[minor].timer_list); | 298 | set_current_state(TASK_UNINTERRUPTIBLE); |
| 306 | instances[minor].timer_list.expires = jiffies + snooze_time + 1; | 299 | schedule_timeout(snooze_time + 1); |
| 307 | instances[minor].timer_list.data = minor; | ||
| 308 | add_timer(&instances[minor].timer_list); | ||
| 309 | sleep_on (&instances[minor].wait_queue); | ||
| 310 | } | 300 | } |
| 311 | 301 | ||
| 312 | static int wait_for(unsigned short set, unsigned short clr, | 302 | static int wait_for(unsigned short set, unsigned short clr, |
| @@ -880,11 +870,8 @@ static void probeLptPort(unsigned idx) | |||
| 880 | instances[idx].enhanced = 0; | 870 | instances[idx].enhanced = 0; |
| 881 | instances[idx].direction = 0; | 871 | instances[idx].direction = 0; |
| 882 | instances[idx].mode = COMPATIBILITY; | 872 | instances[idx].mode = COMPATIBILITY; |
| 883 | instances[idx].wait_queue = 0; | ||
| 884 | instances[idx].run_length = 0; | 873 | instances[idx].run_length = 0; |
| 885 | instances[idx].run_flag = 0; | 874 | instances[idx].run_flag = 0; |
| 886 | init_timer(&instances[idx].timer_list); | ||
| 887 | instances[idx].timer_list.function = bpp_wake_up; | ||
| 888 | if (!request_region(lpAddr,3, dev_name)) return; | 875 | if (!request_region(lpAddr,3, dev_name)) return; |
| 889 | 876 | ||
| 890 | /* | 877 | /* |
| @@ -977,11 +964,8 @@ static void probeLptPort(unsigned idx) | |||
| 977 | instances[idx].enhanced = 0; | 964 | instances[idx].enhanced = 0; |
| 978 | instances[idx].direction = 0; | 965 | instances[idx].direction = 0; |
| 979 | instances[idx].mode = COMPATIBILITY; | 966 | instances[idx].mode = COMPATIBILITY; |
| 980 | init_waitqueue_head(&instances[idx].wait_queue); | ||
| 981 | instances[idx].run_length = 0; | 967 | instances[idx].run_length = 0; |
| 982 | instances[idx].run_flag = 0; | 968 | instances[idx].run_flag = 0; |
| 983 | init_timer(&instances[idx].timer_list); | ||
| 984 | instances[idx].timer_list.function = bpp_wake_up; | ||
| 985 | 969 | ||
| 986 | if (!rp) return; | 970 | if (!rp) return; |
| 987 | 971 | ||
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 9224fc3184ea..7e8fc7c1d4cc 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
| @@ -2061,7 +2061,8 @@ static void __init serial8250_isa_init_ports(void) | |||
| 2061 | up->port.ops = &serial8250_pops; | 2061 | up->port.ops = &serial8250_pops; |
| 2062 | } | 2062 | } |
| 2063 | 2063 | ||
| 2064 | for (i = 0, up = serial8250_ports; i < ARRAY_SIZE(old_serial_port); | 2064 | for (i = 0, up = serial8250_ports; |
| 2065 | i < ARRAY_SIZE(old_serial_port) && i < UART_NR; | ||
| 2065 | i++, up++) { | 2066 | i++, up++) { |
| 2066 | up->port.iobase = old_serial_port[i].port; | 2067 | up->port.iobase = old_serial_port[i].port; |
| 2067 | up->port.irq = irq_canonicalize(old_serial_port[i].irq); | 2068 | up->port.irq = irq_canonicalize(old_serial_port[i].irq); |
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c index de26cf7b003c..7911912f50c7 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c | |||
| @@ -94,12 +94,42 @@ void smc1_lineif(struct uart_cpm_port *pinfo) | |||
| 94 | ((immap_t *)IMAP_ADDR)->im_ioport.iop_paodr &= ~iobits; | 94 | ((immap_t *)IMAP_ADDR)->im_ioport.iop_paodr &= ~iobits; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | #ifdef CONFIG_MPC885ADS | ||
| 98 | /* Enable SMC1 transceivers */ | ||
| 99 | { | ||
| 100 | volatile uint __iomem *bcsr1 = ioremap(BCSR1, 4); | ||
| 101 | uint tmp; | ||
| 102 | |||
| 103 | tmp = in_be32(bcsr1); | ||
| 104 | tmp &= ~BCSR1_RS232EN_1; | ||
| 105 | out_be32(bcsr1, tmp); | ||
| 106 | iounmap(bcsr1); | ||
| 107 | } | ||
| 108 | #endif | ||
| 109 | |||
| 97 | pinfo->brg = 1; | 110 | pinfo->brg = 1; |
| 98 | } | 111 | } |
| 99 | 112 | ||
| 100 | void smc2_lineif(struct uart_cpm_port *pinfo) | 113 | void smc2_lineif(struct uart_cpm_port *pinfo) |
| 101 | { | 114 | { |
| 102 | /* XXX SMC2: insert port configuration here */ | 115 | #ifdef CONFIG_MPC885ADS |
| 116 | volatile cpm8xx_t *cp = cpmp; | ||
| 117 | volatile uint __iomem *bcsr1; | ||
| 118 | uint tmp; | ||
| 119 | |||
| 120 | cp->cp_pepar |= 0x00000c00; | ||
| 121 | cp->cp_pedir &= ~0x00000c00; | ||
| 122 | cp->cp_peso &= ~0x00000400; | ||
| 123 | cp->cp_peso |= 0x00000800; | ||
| 124 | |||
| 125 | /* Enable SMC2 transceivers */ | ||
| 126 | bcsr1 = ioremap(BCSR1, 4); | ||
| 127 | tmp = in_be32(bcsr1); | ||
| 128 | tmp &= ~BCSR1_RS232EN_2; | ||
| 129 | out_be32(bcsr1, tmp); | ||
| 130 | iounmap(bcsr1); | ||
| 131 | #endif | ||
| 132 | |||
| 103 | pinfo->brg = 2; | 133 | pinfo->brg = 2; |
| 104 | } | 134 | } |
| 105 | 135 | ||
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 5c4678478b1d..7365d4b50b95 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c | |||
| @@ -522,14 +522,11 @@ static void s3c24xx_serial_shutdown(struct uart_port *port) | |||
| 522 | static int s3c24xx_serial_startup(struct uart_port *port) | 522 | static int s3c24xx_serial_startup(struct uart_port *port) |
| 523 | { | 523 | { |
| 524 | struct s3c24xx_uart_port *ourport = to_ourport(port); | 524 | struct s3c24xx_uart_port *ourport = to_ourport(port); |
| 525 | unsigned long flags; | ||
| 526 | int ret; | 525 | int ret; |
| 527 | 526 | ||
| 528 | dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n", | 527 | dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n", |
| 529 | port->mapbase, port->membase); | 528 | port->mapbase, port->membase); |
| 530 | 529 | ||
| 531 | local_irq_save(flags); | ||
| 532 | |||
| 533 | rx_enabled(port) = 1; | 530 | rx_enabled(port) = 1; |
| 534 | 531 | ||
| 535 | ret = request_irq(RX_IRQ(port), | 532 | ret = request_irq(RX_IRQ(port), |
| @@ -563,12 +560,10 @@ static int s3c24xx_serial_startup(struct uart_port *port) | |||
| 563 | /* the port reset code should have done the correct | 560 | /* the port reset code should have done the correct |
| 564 | * register setup for the port controls */ | 561 | * register setup for the port controls */ |
| 565 | 562 | ||
| 566 | local_irq_restore(flags); | ||
| 567 | return ret; | 563 | return ret; |
| 568 | 564 | ||
| 569 | err: | 565 | err: |
| 570 | s3c24xx_serial_shutdown(port); | 566 | s3c24xx_serial_shutdown(port); |
| 571 | local_irq_restore(flags); | ||
| 572 | return ret; | 567 | return ret; |
| 573 | } | 568 | } |
| 574 | 569 | ||
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 139863a787f3..54699c3a00ab 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
| @@ -1808,6 +1808,12 @@ uart_set_options(struct uart_port *port, struct console *co, | |||
| 1808 | struct termios termios; | 1808 | struct termios termios; |
| 1809 | int i; | 1809 | int i; |
| 1810 | 1810 | ||
| 1811 | /* | ||
| 1812 | * Ensure that the serial console lock is initialised | ||
| 1813 | * early. | ||
| 1814 | */ | ||
| 1815 | spin_lock_init(&port->lock); | ||
| 1816 | |||
| 1811 | memset(&termios, 0, sizeof(struct termios)); | 1817 | memset(&termios, 0, sizeof(struct termios)); |
| 1812 | 1818 | ||
| 1813 | termios.c_cflag = CREAD | HUPCL | CLOCAL; | 1819 | termios.c_cflag = CREAD | HUPCL | CLOCAL; |
| @@ -2196,10 +2202,16 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port) | |||
| 2196 | 2202 | ||
| 2197 | state->port = port; | 2203 | state->port = port; |
| 2198 | 2204 | ||
| 2199 | spin_lock_init(&port->lock); | ||
| 2200 | port->cons = drv->cons; | 2205 | port->cons = drv->cons; |
| 2201 | port->info = state->info; | 2206 | port->info = state->info; |
| 2202 | 2207 | ||
| 2208 | /* | ||
| 2209 | * If this port is a console, then the spinlock is already | ||
| 2210 | * initialised. | ||
| 2211 | */ | ||
| 2212 | if (!uart_console(port)) | ||
| 2213 | spin_lock_init(&port->lock); | ||
| 2214 | |||
| 2203 | uart_configure_port(drv, state, port); | 2215 | uart_configure_port(drv, state, port); |
| 2204 | 2216 | ||
| 2205 | /* | 2217 | /* |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index b209adbd508a..9dd0fbccf994 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
| @@ -142,7 +142,6 @@ static int fbcon_set_origin(struct vc_data *); | |||
| 142 | #define CURSOR_DRAW_DELAY (1) | 142 | #define CURSOR_DRAW_DELAY (1) |
| 143 | 143 | ||
| 144 | /* # VBL ints between cursor state changes */ | 144 | /* # VBL ints between cursor state changes */ |
| 145 | #define ARM_CURSOR_BLINK_RATE (10) | ||
| 146 | #define ATARI_CURSOR_BLINK_RATE (42) | 145 | #define ATARI_CURSOR_BLINK_RATE (42) |
| 147 | #define MAC_CURSOR_BLINK_RATE (32) | 146 | #define MAC_CURSOR_BLINK_RATE (32) |
| 148 | #define DEFAULT_CURSOR_BLINK_RATE (20) | 147 | #define DEFAULT_CURSOR_BLINK_RATE (20) |
| @@ -288,7 +287,7 @@ static void fb_flashcursor(void *private) | |||
| 288 | release_console_sem(); | 287 | release_console_sem(); |
| 289 | } | 288 | } |
| 290 | 289 | ||
| 291 | #if (defined(__arm__) && defined(IRQ_VSYNCPULSE)) || defined(CONFIG_ATARI) || defined(CONFIG_MAC) | 290 | #if defined(CONFIG_ATARI) || defined(CONFIG_MAC) |
| 292 | static int cursor_blink_rate; | 291 | static int cursor_blink_rate; |
| 293 | static irqreturn_t fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) | 292 | static irqreturn_t fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) |
| 294 | { | 293 | { |
| @@ -878,11 +877,6 @@ static const char *fbcon_startup(void) | |||
| 878 | } | 877 | } |
| 879 | #endif /* CONFIG_MAC */ | 878 | #endif /* CONFIG_MAC */ |
| 880 | 879 | ||
| 881 | #if defined(__arm__) && defined(IRQ_VSYNCPULSE) | ||
| 882 | cursor_blink_rate = ARM_CURSOR_BLINK_RATE; | ||
| 883 | irqres = request_irq(IRQ_VSYNCPULSE, fb_vbl_handler, SA_SHIRQ, | ||
| 884 | "framebuffer vbl", info); | ||
| 885 | #endif | ||
| 886 | /* Initialize the work queue. If the driver provides its | 880 | /* Initialize the work queue. If the driver provides its |
| 887 | * own work queue this means it will use something besides | 881 | * own work queue this means it will use something besides |
| 888 | * default timer to flash the cursor. */ | 882 | * default timer to flash the cursor. */ |
diff --git a/fs/fat/cache.c b/fs/fat/cache.c index 7c52e465a619..77c24fcf712a 100644 --- a/fs/fat/cache.c +++ b/fs/fat/cache.c | |||
| @@ -56,7 +56,7 @@ int __init fat_cache_init(void) | |||
| 56 | return 0; | 56 | return 0; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | void __exit fat_cache_destroy(void) | 59 | void fat_cache_destroy(void) |
| 60 | { | 60 | { |
| 61 | if (kmem_cache_destroy(fat_cache_cachep)) | 61 | if (kmem_cache_destroy(fat_cache_cachep)) |
| 62 | printk(KERN_INFO "fat_cache: not all structures were freed\n"); | 62 | printk(KERN_INFO "fat_cache: not all structures were freed\n"); |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 3e31c4a736f1..96ae85b67eba 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
| @@ -1327,7 +1327,7 @@ out_fail: | |||
| 1327 | EXPORT_SYMBOL(fat_fill_super); | 1327 | EXPORT_SYMBOL(fat_fill_super); |
| 1328 | 1328 | ||
| 1329 | int __init fat_cache_init(void); | 1329 | int __init fat_cache_init(void); |
| 1330 | void __exit fat_cache_destroy(void); | 1330 | void fat_cache_destroy(void); |
| 1331 | 1331 | ||
| 1332 | static int __init init_fat_fs(void) | 1332 | static int __init init_fat_fs(void) |
| 1333 | { | 1333 | { |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index b5e54a9e9fa7..51f0fe0ac165 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
| @@ -1505,6 +1505,7 @@ | |||
| 1505 | #define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */ | 1505 | #define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */ |
| 1506 | #define PSSR_RDH (1 << 5) /* Read Disable Hold */ | 1506 | #define PSSR_RDH (1 << 5) /* Read Disable Hold */ |
| 1507 | #define PSSR_PH (1 << 4) /* Peripheral Control Hold */ | 1507 | #define PSSR_PH (1 << 4) /* Peripheral Control Hold */ |
| 1508 | #define PSSR_STS (1 << 3) /* Standby Mode Status */ | ||
| 1508 | #define PSSR_VFS (1 << 2) /* VDD Fault Status */ | 1509 | #define PSSR_VFS (1 << 2) /* VDD Fault Status */ |
| 1509 | #define PSSR_BFS (1 << 1) /* Battery Fault Status */ | 1510 | #define PSSR_BFS (1 << 1) /* Battery Fault Status */ |
| 1510 | #define PSSR_SSS (1 << 0) /* Software Sleep Status */ | 1511 | #define PSSR_SSS (1 << 0) /* Software Sleep Status */ |
| @@ -1965,6 +1966,7 @@ | |||
| 1965 | #define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */ | 1966 | #define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */ |
| 1966 | #define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */ | 1967 | #define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */ |
| 1967 | 1968 | ||
| 1969 | #define MDREFR_K0DB4 (1 << 29) /* SDCLK0 Divide by 4 Control/Status */ | ||
| 1968 | #define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */ | 1970 | #define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */ |
| 1969 | #define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */ | 1971 | #define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */ |
| 1970 | #define MDREFR_K0FREE (1 << 23) /* SDRAM Free-Running Control */ | 1972 | #define MDREFR_K0FREE (1 << 23) /* SDRAM Free-Running Control */ |
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h index 3a32e929ec8c..56c6bf4ab0c3 100644 --- a/include/asm-arm/mach/arch.h +++ b/include/asm-arm/mach/arch.h | |||
| @@ -26,7 +26,7 @@ struct machine_desc { | |||
| 26 | * page tabe entry */ | 26 | * page tabe entry */ |
| 27 | 27 | ||
| 28 | const char *name; /* architecture name */ | 28 | const char *name; /* architecture name */ |
| 29 | unsigned int param_offset; /* parameter page */ | 29 | unsigned long boot_params; /* tagged list */ |
| 30 | 30 | ||
| 31 | unsigned int video_start; /* start of video RAM */ | 31 | unsigned int video_start; /* start of video RAM */ |
| 32 | unsigned int video_end; /* end of video RAM */ | 32 | unsigned int video_end; /* end of video RAM */ |
| @@ -54,38 +54,6 @@ const struct machine_desc __mach_desc_##_type \ | |||
| 54 | .nr = MACH_TYPE_##_type, \ | 54 | .nr = MACH_TYPE_##_type, \ |
| 55 | .name = _name, | 55 | .name = _name, |
| 56 | 56 | ||
| 57 | #define MAINTAINER(n) | ||
| 58 | |||
| 59 | #define BOOT_MEM(_pram,_pio,_vio) \ | ||
| 60 | .phys_ram = _pram, \ | ||
| 61 | .phys_io = _pio, \ | ||
| 62 | .io_pg_offst = ((_vio)>>18)&0xfffc, | ||
| 63 | |||
| 64 | #define BOOT_PARAMS(_params) \ | ||
| 65 | .param_offset = _params, | ||
| 66 | |||
| 67 | #define VIDEO(_start,_end) \ | ||
| 68 | .video_start = _start, \ | ||
| 69 | .video_end = _end, | ||
| 70 | |||
| 71 | #define DISABLE_PARPORT(_n) \ | ||
| 72 | .reserve_lp##_n = 1, | ||
| 73 | |||
| 74 | #define SOFT_REBOOT \ | ||
| 75 | .soft_reboot = 1, | ||
| 76 | |||
| 77 | #define FIXUP(_func) \ | ||
| 78 | .fixup = _func, | ||
| 79 | |||
| 80 | #define MAPIO(_func) \ | ||
| 81 | .map_io = _func, | ||
| 82 | |||
| 83 | #define INITIRQ(_func) \ | ||
| 84 | .init_irq = _func, | ||
| 85 | |||
| 86 | #define INIT_MACHINE(_func) \ | ||
| 87 | .init_machine = _func, | ||
| 88 | |||
| 89 | #define MACHINE_END \ | 57 | #define MACHINE_END \ |
| 90 | }; | 58 | }; |
| 91 | 59 | ||
diff --git a/include/asm-arm/stat.h b/include/asm-arm/stat.h index ca8e7a8436da..ec4e2c2e3b47 100644 --- a/include/asm-arm/stat.h +++ b/include/asm-arm/stat.h | |||
| @@ -89,6 +89,6 @@ struct stat64 { | |||
| 89 | unsigned long st_ctime_nsec; | 89 | unsigned long st_ctime_nsec; |
| 90 | 90 | ||
| 91 | unsigned long long st_ino; | 91 | unsigned long long st_ino; |
| 92 | }; | 92 | } __attribute__((packed)); |
| 93 | 93 | ||
| 94 | #endif | 94 | #endif |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index cdf49f442fd2..2f44b2044214 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
| @@ -85,7 +85,9 @@ struct pt_regs; | |||
| 85 | void die(const char *msg, struct pt_regs *regs, int err) | 85 | void die(const char *msg, struct pt_regs *regs, int err) |
| 86 | __attribute__((noreturn)); | 86 | __attribute__((noreturn)); |
| 87 | 87 | ||
| 88 | void die_if_kernel(const char *str, struct pt_regs *regs, int err); | 88 | struct siginfo; |
| 89 | void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, | ||
| 90 | unsigned long err, unsigned long trap); | ||
| 89 | 91 | ||
| 90 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, | 92 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, |
| 91 | struct pt_regs *), | 93 | struct pt_regs *), |
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h index 714d69c819d3..7c31f2d564a1 100644 --- a/include/asm-ppc/mpc8xx.h +++ b/include/asm-ppc/mpc8xx.h | |||
| @@ -68,6 +68,10 @@ | |||
| 68 | #include <platforms/lantec.h> | 68 | #include <platforms/lantec.h> |
| 69 | #endif | 69 | #endif |
| 70 | 70 | ||
| 71 | #if defined(CONFIG_MPC885ADS) | ||
| 72 | #include <platforms/mpc885ads.h> | ||
| 73 | #endif | ||
| 74 | |||
| 71 | /* Currently, all 8xx boards that support a processor to PCI/ISA bridge | 75 | /* Currently, all 8xx boards that support a processor to PCI/ISA bridge |
| 72 | * use the same memory map. | 76 | * use the same memory map. |
| 73 | */ | 77 | */ |
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 018e2e46082b..8b70edcb80dc 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h | |||
| @@ -16,6 +16,18 @@ | |||
| 16 | #include <asm/pil.h> | 16 | #include <asm/pil.h> |
| 17 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
| 18 | 18 | ||
| 19 | struct ino_bucket; | ||
| 20 | |||
| 21 | #define MAX_IRQ_DESC_ACTION 4 | ||
| 22 | |||
| 23 | struct irq_desc { | ||
| 24 | void (*pre_handler)(struct ino_bucket *, void *, void *); | ||
| 25 | void *pre_handler_arg1; | ||
| 26 | void *pre_handler_arg2; | ||
| 27 | u32 action_active_mask; | ||
| 28 | struct irqaction action[MAX_IRQ_DESC_ACTION]; | ||
| 29 | }; | ||
| 30 | |||
| 19 | /* You should not mess with this directly. That's the job of irq.c. | 31 | /* You should not mess with this directly. That's the job of irq.c. |
| 20 | * | 32 | * |
| 21 | * If you make changes here, please update hand coded assembler of | 33 | * If you make changes here, please update hand coded assembler of |
| @@ -42,24 +54,11 @@ struct ino_bucket { | |||
| 42 | /* Miscellaneous flags. */ | 54 | /* Miscellaneous flags. */ |
| 43 | /*0x06*/unsigned char flags; | 55 | /*0x06*/unsigned char flags; |
| 44 | 56 | ||
| 45 | /* This is used to deal with IBF_DMA_SYNC on | 57 | /* Currently unused. */ |
| 46 | * Sabre systems. | 58 | /*0x07*/unsigned char __pad; |
| 47 | */ | 59 | |
| 48 | /*0x07*/unsigned char synctab_ent; | 60 | /* Reference to IRQ descriptor for this bucket. */ |
| 49 | 61 | /*0x08*/struct irq_desc *irq_info; | |
| 50 | /* Reference to handler for this IRQ. If this is | ||
| 51 | * non-NULL this means it is active and should be | ||
| 52 | * serviced. Else the pending member is set to one | ||
| 53 | * and later registry of the interrupt checks for | ||
| 54 | * this condition. | ||
| 55 | * | ||
| 56 | * Normally this is just an irq_action structure. | ||
| 57 | * But, on PCI, if multiple interrupt sources behind | ||
| 58 | * a bridge have multiple interrupt sources that share | ||
| 59 | * the same INO bucket, this points to an array of | ||
| 60 | * pointers to four IRQ action structures. | ||
| 61 | */ | ||
| 62 | /*0x08*/void *irq_info; | ||
| 63 | 62 | ||
| 64 | /* Sun5 Interrupt Clear Register. */ | 63 | /* Sun5 Interrupt Clear Register. */ |
| 65 | /*0x10*/unsigned long iclr; | 64 | /*0x10*/unsigned long iclr; |
| @@ -69,12 +68,6 @@ struct ino_bucket { | |||
| 69 | 68 | ||
| 70 | }; | 69 | }; |
| 71 | 70 | ||
| 72 | #ifdef CONFIG_PCI | ||
| 73 | extern unsigned long pci_dma_wsync; | ||
| 74 | extern unsigned long dma_sync_reg_table[256]; | ||
| 75 | extern unsigned char dma_sync_reg_table_entry; | ||
| 76 | #endif | ||
| 77 | |||
| 78 | /* IMAP/ICLR register defines */ | 71 | /* IMAP/ICLR register defines */ |
| 79 | #define IMAP_VALID 0x80000000 /* IRQ Enabled */ | 72 | #define IMAP_VALID 0x80000000 /* IRQ Enabled */ |
| 80 | #define IMAP_TID_UPA 0x7c000000 /* UPA TargetID */ | 73 | #define IMAP_TID_UPA 0x7c000000 /* UPA TargetID */ |
| @@ -90,11 +83,9 @@ extern unsigned char dma_sync_reg_table_entry; | |||
| 90 | #define ICLR_PENDING 0x00000003 /* Pending state */ | 83 | #define ICLR_PENDING 0x00000003 /* Pending state */ |
| 91 | 84 | ||
| 92 | /* Only 8-bits are available, be careful. -DaveM */ | 85 | /* Only 8-bits are available, be careful. -DaveM */ |
| 93 | #define IBF_DMA_SYNC 0x01 /* DMA synchronization behind PCI bridge needed. */ | 86 | #define IBF_PCI 0x02 /* PSYCHO/SABRE/SCHIZO PCI interrupt. */ |
| 94 | #define IBF_PCI 0x02 /* Indicates PSYCHO/SABRE/SCHIZO PCI interrupt. */ | 87 | #define IBF_ACTIVE 0x04 /* Interrupt is active and has a handler.*/ |
| 95 | #define IBF_ACTIVE 0x04 /* This interrupt is active and has a handler. */ | 88 | #define IBF_INPROGRESS 0x10 /* IRQ is being serviced. */ |
| 96 | #define IBF_MULTI 0x08 /* On PCI, indicates shared bucket. */ | ||
| 97 | #define IBF_INPROGRESS 0x10 /* IRQ is being serviced. */ | ||
| 98 | 89 | ||
| 99 | #define NUM_IVECS (IMAP_INR + 1) | 90 | #define NUM_IVECS (IMAP_INR + 1) |
| 100 | extern struct ino_bucket ivector_table[NUM_IVECS]; | 91 | extern struct ino_bucket ivector_table[NUM_IVECS]; |
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index 4c15610a2bac..38bbbccb4068 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h | |||
| @@ -145,6 +145,9 @@ struct pci_pbm_info { | |||
| 145 | /* Physical address base of PBM registers. */ | 145 | /* Physical address base of PBM registers. */ |
| 146 | unsigned long pbm_regs; | 146 | unsigned long pbm_regs; |
| 147 | 147 | ||
| 148 | /* Physical address of DMA sync register, if any. */ | ||
| 149 | unsigned long sync_reg; | ||
| 150 | |||
| 148 | /* Opaque 32-bit system bus Port ID. */ | 151 | /* Opaque 32-bit system bus Port ID. */ |
| 149 | u32 portid; | 152 | u32 portid; |
| 150 | 153 | ||
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h index becdf1bc5924..e3059bb4a465 100644 --- a/include/asm-sparc64/signal.h +++ b/include/asm-sparc64/signal.h | |||
| @@ -162,21 +162,6 @@ struct sigstack { | |||
| 162 | #define MINSIGSTKSZ 4096 | 162 | #define MINSIGSTKSZ 4096 |
| 163 | #define SIGSTKSZ 16384 | 163 | #define SIGSTKSZ 16384 |
| 164 | 164 | ||
| 165 | #ifdef __KERNEL__ | ||
| 166 | /* | ||
| 167 | * DJHR | ||
| 168 | * SA_STATIC_ALLOC is used for the SPARC system to indicate that this | ||
| 169 | * interrupt handler's irq structure should be statically allocated | ||
| 170 | * by the request_irq routine. | ||
| 171 | * The alternative is that arch/sparc/kernel/irq.c has carnal knowledge | ||
| 172 | * of interrupt usage and that sucks. Also without a flag like this | ||
| 173 | * it may be possible for the free_irq routine to attempt to free | ||
| 174 | * statically allocated data.. which is NOT GOOD. | ||
| 175 | * | ||
| 176 | */ | ||
| 177 | #define SA_STATIC_ALLOC 0x80 | ||
| 178 | #endif | ||
| 179 | |||
| 180 | #include <asm-generic/signal.h> | 165 | #include <asm-generic/signal.h> |
| 181 | 166 | ||
| 182 | struct __new_sigaction { | 167 | struct __new_sigaction { |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 70a4ebb5d964..ecb0d39c0798 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
| @@ -346,10 +346,27 @@ COMPATIBLE_IOCTL(PPPOEIOCDFWD) | |||
| 346 | /* LP */ | 346 | /* LP */ |
| 347 | COMPATIBLE_IOCTL(LPGETSTATUS) | 347 | COMPATIBLE_IOCTL(LPGETSTATUS) |
| 348 | /* ppdev */ | 348 | /* ppdev */ |
| 349 | COMPATIBLE_IOCTL(PPSETMODE) | ||
| 350 | COMPATIBLE_IOCTL(PPRSTATUS) | ||
| 351 | COMPATIBLE_IOCTL(PPRCONTROL) | ||
| 352 | COMPATIBLE_IOCTL(PPWCONTROL) | ||
| 353 | COMPATIBLE_IOCTL(PPFCONTROL) | ||
| 354 | COMPATIBLE_IOCTL(PPRDATA) | ||
| 355 | COMPATIBLE_IOCTL(PPWDATA) | ||
| 349 | COMPATIBLE_IOCTL(PPCLAIM) | 356 | COMPATIBLE_IOCTL(PPCLAIM) |
| 350 | COMPATIBLE_IOCTL(PPRELEASE) | 357 | COMPATIBLE_IOCTL(PPRELEASE) |
| 351 | COMPATIBLE_IOCTL(PPEXCL) | ||
| 352 | COMPATIBLE_IOCTL(PPYIELD) | 358 | COMPATIBLE_IOCTL(PPYIELD) |
| 359 | COMPATIBLE_IOCTL(PPEXCL) | ||
| 360 | COMPATIBLE_IOCTL(PPDATADIR) | ||
| 361 | COMPATIBLE_IOCTL(PPNEGOT) | ||
| 362 | COMPATIBLE_IOCTL(PPWCTLONIRQ) | ||
| 363 | COMPATIBLE_IOCTL(PPCLRIRQ) | ||
| 364 | COMPATIBLE_IOCTL(PPSETPHASE) | ||
| 365 | COMPATIBLE_IOCTL(PPGETMODES) | ||
| 366 | COMPATIBLE_IOCTL(PPGETMODE) | ||
| 367 | COMPATIBLE_IOCTL(PPGETPHASE) | ||
| 368 | COMPATIBLE_IOCTL(PPGETFLAGS) | ||
| 369 | COMPATIBLE_IOCTL(PPSETFLAGS) | ||
| 353 | /* CDROM stuff */ | 370 | /* CDROM stuff */ |
| 354 | COMPATIBLE_IOCTL(CDROMPAUSE) | 371 | COMPATIBLE_IOCTL(CDROMPAUSE) |
| 355 | COMPATIBLE_IOCTL(CDROMRESUME) | 372 | COMPATIBLE_IOCTL(CDROMRESUME) |
diff --git a/include/linux/if_shaper.h b/include/linux/if_shaper.h index 004e6f09a6e2..68c896a36a34 100644 --- a/include/linux/if_shaper.h +++ b/include/linux/if_shaper.h | |||
| @@ -23,7 +23,7 @@ struct shaper | |||
| 23 | __u32 shapeclock; | 23 | __u32 shapeclock; |
| 24 | unsigned long recovery; /* Time we can next clock a packet out on | 24 | unsigned long recovery; /* Time we can next clock a packet out on |
| 25 | an empty queue */ | 25 | an empty queue */ |
| 26 | struct semaphore sem; | 26 | spinlock_t lock; |
| 27 | struct net_device_stats stats; | 27 | struct net_device_stats stats; |
| 28 | struct net_device *dev; | 28 | struct net_device *dev; |
| 29 | int (*hard_start_xmit) (struct sk_buff *skb, | 29 | int (*hard_start_xmit) (struct sk_buff *skb, |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index b7a194c4362a..e050fc2d4c26 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
| @@ -155,7 +155,7 @@ extern void arch_copy_kprobe(struct kprobe *p); | |||
| 155 | extern void arch_arm_kprobe(struct kprobe *p); | 155 | extern void arch_arm_kprobe(struct kprobe *p); |
| 156 | extern void arch_disarm_kprobe(struct kprobe *p); | 156 | extern void arch_disarm_kprobe(struct kprobe *p); |
| 157 | extern void arch_remove_kprobe(struct kprobe *p); | 157 | extern void arch_remove_kprobe(struct kprobe *p); |
| 158 | extern int arch_init(void); | 158 | extern int arch_init_kprobes(void); |
| 159 | extern void show_registers(struct pt_regs *regs); | 159 | extern void show_registers(struct pt_regs *regs); |
| 160 | extern kprobe_opcode_t *get_insn_slot(void); | 160 | extern kprobe_opcode_t *get_insn_slot(void); |
| 161 | extern void free_insn_slot(kprobe_opcode_t *slot); | 161 | extern void free_insn_slot(kprobe_opcode_t *slot); |
diff --git a/include/linux/pci-dynids.h b/include/linux/pci-dynids.h deleted file mode 100644 index 183b6b0de81c..000000000000 --- a/include/linux/pci-dynids.h +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * PCI defines and function prototypes | ||
| 3 | * Copyright 2003 Dell Inc. | ||
| 4 | * by Matt Domsch <Matt_Domsch@dell.com> | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef LINUX_PCI_DYNIDS_H | ||
| 8 | #define LINUX_PCI_DYNIDS_H | ||
| 9 | |||
| 10 | #include <linux/list.h> | ||
| 11 | #include <linux/mod_devicetable.h> | ||
| 12 | |||
| 13 | struct dynid { | ||
| 14 | struct list_head node; | ||
| 15 | struct pci_device_id id; | ||
| 16 | }; | ||
| 17 | |||
| 18 | #endif | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 66798b46f308..7ac14961ba22 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -586,7 +586,7 @@ struct pci_dev { | |||
| 586 | #define PCI_NUM_RESOURCES 11 | 586 | #define PCI_NUM_RESOURCES 11 |
| 587 | 587 | ||
| 588 | #ifndef PCI_BUS_NUM_RESOURCES | 588 | #ifndef PCI_BUS_NUM_RESOURCES |
| 589 | #define PCI_BUS_NUM_RESOURCES 4 | 589 | #define PCI_BUS_NUM_RESOURCES 8 |
| 590 | #endif | 590 | #endif |
| 591 | 591 | ||
| 592 | #define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ | 592 | #define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ |
| @@ -860,7 +860,8 @@ int pci_register_driver(struct pci_driver *); | |||
| 860 | void pci_unregister_driver(struct pci_driver *); | 860 | void pci_unregister_driver(struct pci_driver *); |
| 861 | void pci_remove_behind_bridge(struct pci_dev *); | 861 | void pci_remove_behind_bridge(struct pci_dev *); |
| 862 | struct pci_driver *pci_dev_driver(const struct pci_dev *); | 862 | struct pci_driver *pci_dev_driver(const struct pci_dev *); |
| 863 | const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev); | 863 | const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev); |
| 864 | const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev); | ||
| 864 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); | 865 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass); |
| 865 | 866 | ||
| 866 | /* kmem_cache style wrapper around pci_alloc_consistent() */ | 867 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c3ee1ae4545a..27348c22dacb 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -1238,6 +1238,7 @@ | |||
| 1238 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 | 1238 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 |
| 1239 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 | 1239 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 |
| 1240 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 | 1240 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 |
| 1241 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E | ||
| 1241 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 | 1242 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 |
| 1242 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 | 1243 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 |
| 1243 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B | 1244 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 416a2e4024b2..14b950413495 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -183,7 +183,6 @@ struct skb_shared_info { | |||
| 183 | * @priority: Packet queueing priority | 183 | * @priority: Packet queueing priority |
| 184 | * @users: User count - see {datagram,tcp}.c | 184 | * @users: User count - see {datagram,tcp}.c |
| 185 | * @protocol: Packet protocol from driver | 185 | * @protocol: Packet protocol from driver |
| 186 | * @security: Security level of packet | ||
| 187 | * @truesize: Buffer size | 186 | * @truesize: Buffer size |
| 188 | * @head: Head of buffer | 187 | * @head: Head of buffer |
| 189 | * @data: Data head pointer | 188 | * @data: Data head pointer |
| @@ -249,18 +248,18 @@ struct sk_buff { | |||
| 249 | data_len, | 248 | data_len, |
| 250 | mac_len, | 249 | mac_len, |
| 251 | csum; | 250 | csum; |
| 252 | unsigned char local_df, | ||
| 253 | cloned:1, | ||
| 254 | nohdr:1, | ||
| 255 | pkt_type, | ||
| 256 | ip_summed; | ||
| 257 | __u32 priority; | 251 | __u32 priority; |
| 258 | unsigned short protocol, | 252 | __u8 local_df:1, |
| 259 | security; | 253 | cloned:1, |
| 254 | ip_summed:2, | ||
| 255 | nohdr:1; | ||
| 256 | /* 3 bits spare */ | ||
| 257 | __u8 pkt_type; | ||
| 258 | __u16 protocol; | ||
| 260 | 259 | ||
| 261 | void (*destructor)(struct sk_buff *skb); | 260 | void (*destructor)(struct sk_buff *skb); |
| 262 | #ifdef CONFIG_NETFILTER | 261 | #ifdef CONFIG_NETFILTER |
| 263 | unsigned long nfmark; | 262 | unsigned long nfmark; |
| 264 | __u32 nfcache; | 263 | __u32 nfcache; |
| 265 | __u32 nfctinfo; | 264 | __u32 nfctinfo; |
| 266 | struct nf_conntrack *nfct; | 265 | struct nf_conntrack *nfct; |
| @@ -1211,7 +1210,7 @@ static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | |||
| 1211 | { | 1210 | { |
| 1212 | int hlen = skb_headlen(skb); | 1211 | int hlen = skb_headlen(skb); |
| 1213 | 1212 | ||
| 1214 | if (offset + len <= hlen) | 1213 | if (hlen - offset >= len) |
| 1215 | return skb->data + offset; | 1214 | return skb->data + offset; |
| 1216 | 1215 | ||
| 1217 | if (skb_copy_bits(skb, offset, buffer, len) < 0) | 1216 | if (skb_copy_bits(skb, offset, buffer, len) < 0) |
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h index a6b2cc530af5..bcb762d93123 100644 --- a/include/linux/tc_ematch/tc_em_meta.h +++ b/include/linux/tc_ematch/tc_em_meta.h | |||
| @@ -45,7 +45,7 @@ enum | |||
| 45 | TCF_META_ID_REALDEV, | 45 | TCF_META_ID_REALDEV, |
| 46 | TCF_META_ID_PRIORITY, | 46 | TCF_META_ID_PRIORITY, |
| 47 | TCF_META_ID_PROTOCOL, | 47 | TCF_META_ID_PROTOCOL, |
| 48 | TCF_META_ID_SECURITY, | 48 | TCF_META_ID_SECURITY, /* obsolete */ |
| 49 | TCF_META_ID_PKTTYPE, | 49 | TCF_META_ID_PKTTYPE, |
| 50 | TCF_META_ID_PKTLEN, | 50 | TCF_META_ID_PKTLEN, |
| 51 | TCF_META_ID_DATALEN, | 51 | TCF_META_ID_DATALEN, |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index dfd93d03f5d2..e4fd82e42104 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -286,7 +286,7 @@ struct tcp_sock { | |||
| 286 | __u32 max_window; /* Maximal window ever seen from peer */ | 286 | __u32 max_window; /* Maximal window ever seen from peer */ |
| 287 | __u32 pmtu_cookie; /* Last pmtu seen by socket */ | 287 | __u32 pmtu_cookie; /* Last pmtu seen by socket */ |
| 288 | __u32 mss_cache; /* Cached effective mss, not including SACKS */ | 288 | __u32 mss_cache; /* Cached effective mss, not including SACKS */ |
| 289 | __u16 mss_cache_std; /* Like mss_cache, but without TSO */ | 289 | __u16 xmit_size_goal; /* Goal for segmenting output packets */ |
| 290 | __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ | 290 | __u16 ext_header_len; /* Network protocol overhead (IP/IPv6 options) */ |
| 291 | __u8 ca_state; /* State of fast-retransmit machine */ | 291 | __u8 ca_state; /* State of fast-retransmit machine */ |
| 292 | __u8 retransmits; /* Number of unrecovered RTO timeouts. */ | 292 | __u8 retransmits; /* Number of unrecovered RTO timeouts. */ |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index fcb05a387dbe..6492e7363d84 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
| @@ -13,13 +13,12 @@ struct qdisc_walker | |||
| 13 | 13 | ||
| 14 | extern rwlock_t qdisc_tree_lock; | 14 | extern rwlock_t qdisc_tree_lock; |
| 15 | 15 | ||
| 16 | #define QDISC_ALIGN 32 | 16 | #define QDISC_ALIGNTO 32 |
| 17 | #define QDISC_ALIGN_CONST (QDISC_ALIGN - 1) | 17 | #define QDISC_ALIGN(len) (((len) + QDISC_ALIGNTO-1) & ~(QDISC_ALIGNTO-1)) |
| 18 | 18 | ||
| 19 | static inline void *qdisc_priv(struct Qdisc *q) | 19 | static inline void *qdisc_priv(struct Qdisc *q) |
| 20 | { | 20 | { |
| 21 | return (char *)q + ((sizeof(struct Qdisc) + QDISC_ALIGN_CONST) | 21 | return (char *) q + QDISC_ALIGN(sizeof(struct Qdisc)); |
| 22 | & ~QDISC_ALIGN_CONST); | ||
| 23 | } | 22 | } |
| 24 | 23 | ||
| 25 | /* | 24 | /* |
| @@ -207,8 +206,6 @@ psched_tod_diff(int delta_sec, int bound) | |||
| 207 | 206 | ||
| 208 | #endif /* !CONFIG_NET_SCH_CLK_GETTIMEOFDAY */ | 207 | #endif /* !CONFIG_NET_SCH_CLK_GETTIMEOFDAY */ |
| 209 | 208 | ||
| 210 | extern struct Qdisc noop_qdisc; | ||
| 211 | extern struct Qdisc_ops noop_qdisc_ops; | ||
| 212 | extern struct Qdisc_ops pfifo_qdisc_ops; | 209 | extern struct Qdisc_ops pfifo_qdisc_ops; |
| 213 | extern struct Qdisc_ops bfifo_qdisc_ops; | 210 | extern struct Qdisc_ops bfifo_qdisc_ops; |
| 214 | 211 | ||
| @@ -216,14 +213,6 @@ extern int register_qdisc(struct Qdisc_ops *qops); | |||
| 216 | extern int unregister_qdisc(struct Qdisc_ops *qops); | 213 | extern int unregister_qdisc(struct Qdisc_ops *qops); |
| 217 | extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); | 214 | extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); |
| 218 | extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); | 215 | extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); |
| 219 | extern void dev_init_scheduler(struct net_device *dev); | ||
| 220 | extern void dev_shutdown(struct net_device *dev); | ||
| 221 | extern void dev_activate(struct net_device *dev); | ||
| 222 | extern void dev_deactivate(struct net_device *dev); | ||
| 223 | extern void qdisc_reset(struct Qdisc *qdisc); | ||
| 224 | extern void qdisc_destroy(struct Qdisc *qdisc); | ||
| 225 | extern struct Qdisc * qdisc_create_dflt(struct net_device *dev, | ||
| 226 | struct Qdisc_ops *ops); | ||
| 227 | extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, | 216 | extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, |
| 228 | struct rtattr *tab); | 217 | struct rtattr *tab); |
| 229 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); | 218 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 7b97405e2dbf..7b6ec9986715 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
| @@ -164,6 +164,19 @@ extern void qdisc_unlock_tree(struct net_device *dev); | |||
| 164 | #define tcf_tree_lock(tp) qdisc_lock_tree((tp)->q->dev) | 164 | #define tcf_tree_lock(tp) qdisc_lock_tree((tp)->q->dev) |
| 165 | #define tcf_tree_unlock(tp) qdisc_unlock_tree((tp)->q->dev) | 165 | #define tcf_tree_unlock(tp) qdisc_unlock_tree((tp)->q->dev) |
| 166 | 166 | ||
| 167 | extern struct Qdisc noop_qdisc; | ||
| 168 | extern struct Qdisc_ops noop_qdisc_ops; | ||
| 169 | |||
| 170 | extern void dev_init_scheduler(struct net_device *dev); | ||
| 171 | extern void dev_shutdown(struct net_device *dev); | ||
| 172 | extern void dev_activate(struct net_device *dev); | ||
| 173 | extern void dev_deactivate(struct net_device *dev); | ||
| 174 | extern void qdisc_reset(struct Qdisc *qdisc); | ||
| 175 | extern void qdisc_destroy(struct Qdisc *qdisc); | ||
| 176 | extern struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops); | ||
| 177 | extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, | ||
| 178 | struct Qdisc_ops *ops); | ||
| 179 | |||
| 167 | static inline void | 180 | static inline void |
| 168 | tcf_destroy(struct tcf_proto *tp) | 181 | tcf_destroy(struct tcf_proto *tp) |
| 169 | { | 182 | { |
diff --git a/include/net/slhc_vj.h b/include/net/slhc_vj.h index 0b2c2784f333..8716d5942b65 100644 --- a/include/net/slhc_vj.h +++ b/include/net/slhc_vj.h | |||
| @@ -170,19 +170,14 @@ struct slcompress { | |||
| 170 | }; | 170 | }; |
| 171 | #define NULLSLCOMPR (struct slcompress *)0 | 171 | #define NULLSLCOMPR (struct slcompress *)0 |
| 172 | 172 | ||
| 173 | #define __ARGS(x) x | ||
| 174 | |||
| 175 | /* In slhc.c: */ | 173 | /* In slhc.c: */ |
| 176 | struct slcompress *slhc_init __ARGS((int rslots, int tslots)); | 174 | struct slcompress *slhc_init(int rslots, int tslots); |
| 177 | void slhc_free __ARGS((struct slcompress *comp)); | 175 | void slhc_free(struct slcompress *comp); |
| 178 | 176 | ||
| 179 | int slhc_compress __ARGS((struct slcompress *comp, unsigned char *icp, | 177 | int slhc_compress(struct slcompress *comp, unsigned char *icp, int isize, |
| 180 | int isize, unsigned char *ocp, unsigned char **cpp, | 178 | unsigned char *ocp, unsigned char **cpp, int compress_cid); |
| 181 | int compress_cid)); | 179 | int slhc_uncompress(struct slcompress *comp, unsigned char *icp, int isize); |
| 182 | int slhc_uncompress __ARGS((struct slcompress *comp, unsigned char *icp, | 180 | int slhc_remember(struct slcompress *comp, unsigned char *icp, int isize); |
| 183 | int isize)); | 181 | int slhc_toss(struct slcompress *comp); |
| 184 | int slhc_remember __ARGS((struct slcompress *comp, unsigned char *icp, | ||
| 185 | int isize)); | ||
| 186 | int slhc_toss __ARGS((struct slcompress *comp)); | ||
| 187 | 182 | ||
| 188 | #endif /* _SLHC_H */ | 183 | #endif /* _SLHC_H */ |
diff --git a/include/net/sock.h b/include/net/sock.h index e593af5b1ecc..7b76f891ae2d 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -1134,13 +1134,16 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) | |||
| 1134 | static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | 1134 | static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, |
| 1135 | int size, int mem, int gfp) | 1135 | int size, int mem, int gfp) |
| 1136 | { | 1136 | { |
| 1137 | struct sk_buff *skb = alloc_skb(size + sk->sk_prot->max_header, gfp); | 1137 | struct sk_buff *skb; |
| 1138 | int hdr_len; | ||
| 1138 | 1139 | ||
| 1140 | hdr_len = SKB_DATA_ALIGN(sk->sk_prot->max_header); | ||
| 1141 | skb = alloc_skb(size + hdr_len, gfp); | ||
| 1139 | if (skb) { | 1142 | if (skb) { |
| 1140 | skb->truesize += mem; | 1143 | skb->truesize += mem; |
| 1141 | if (sk->sk_forward_alloc >= (int)skb->truesize || | 1144 | if (sk->sk_forward_alloc >= (int)skb->truesize || |
| 1142 | sk_stream_mem_schedule(sk, skb->truesize, 0)) { | 1145 | sk_stream_mem_schedule(sk, skb->truesize, 0)) { |
| 1143 | skb_reserve(skb, sk->sk_prot->max_header); | 1146 | skb_reserve(skb, hdr_len); |
| 1144 | return skb; | 1147 | return skb; |
| 1145 | } | 1148 | } |
| 1146 | __kfree_skb(skb); | 1149 | __kfree_skb(skb); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index ec9e20c27179..a166918ca56d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -721,11 +721,16 @@ static inline int tcp_ack_scheduled(struct tcp_sock *tp) | |||
| 721 | return tp->ack.pending&TCP_ACK_SCHED; | 721 | return tp->ack.pending&TCP_ACK_SCHED; |
| 722 | } | 722 | } |
| 723 | 723 | ||
| 724 | static __inline__ void tcp_dec_quickack_mode(struct tcp_sock *tp) | 724 | static __inline__ void tcp_dec_quickack_mode(struct tcp_sock *tp, unsigned int pkts) |
| 725 | { | 725 | { |
| 726 | if (tp->ack.quick && --tp->ack.quick == 0) { | 726 | if (tp->ack.quick) { |
| 727 | /* Leaving quickack mode we deflate ATO. */ | 727 | if (pkts >= tp->ack.quick) { |
| 728 | tp->ack.ato = TCP_ATO_MIN; | 728 | tp->ack.quick = 0; |
| 729 | |||
| 730 | /* Leaving quickack mode we deflate ATO. */ | ||
| 731 | tp->ack.ato = TCP_ATO_MIN; | ||
| 732 | } else | ||
| 733 | tp->ack.quick -= pkts; | ||
| 729 | } | 734 | } |
| 730 | } | 735 | } |
| 731 | 736 | ||
| @@ -843,7 +848,9 @@ extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, | |||
| 843 | 848 | ||
| 844 | /* tcp_output.c */ | 849 | /* tcp_output.c */ |
| 845 | 850 | ||
| 846 | extern int tcp_write_xmit(struct sock *, int nonagle); | 851 | extern void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp, |
| 852 | unsigned int cur_mss, int nonagle); | ||
| 853 | extern int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp); | ||
| 847 | extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); | 854 | extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); |
| 848 | extern void tcp_xmit_retransmit_queue(struct sock *); | 855 | extern void tcp_xmit_retransmit_queue(struct sock *); |
| 849 | extern void tcp_simple_retransmit(struct sock *); | 856 | extern void tcp_simple_retransmit(struct sock *); |
| @@ -855,10 +862,13 @@ extern int tcp_write_wakeup(struct sock *); | |||
| 855 | extern void tcp_send_fin(struct sock *sk); | 862 | extern void tcp_send_fin(struct sock *sk); |
| 856 | extern void tcp_send_active_reset(struct sock *sk, int priority); | 863 | extern void tcp_send_active_reset(struct sock *sk, int priority); |
| 857 | extern int tcp_send_synack(struct sock *); | 864 | extern int tcp_send_synack(struct sock *); |
| 858 | extern void tcp_push_one(struct sock *, unsigned mss_now); | 865 | extern void tcp_push_one(struct sock *, unsigned int mss_now); |
| 859 | extern void tcp_send_ack(struct sock *sk); | 866 | extern void tcp_send_ack(struct sock *sk); |
| 860 | extern void tcp_send_delayed_ack(struct sock *sk); | 867 | extern void tcp_send_delayed_ack(struct sock *sk); |
| 861 | 868 | ||
| 869 | /* tcp_input.c */ | ||
| 870 | extern void tcp_cwnd_application_limited(struct sock *sk); | ||
| 871 | |||
| 862 | /* tcp_timer.c */ | 872 | /* tcp_timer.c */ |
| 863 | extern void tcp_init_xmit_timers(struct sock *); | 873 | extern void tcp_init_xmit_timers(struct sock *); |
| 864 | extern void tcp_clear_xmit_timers(struct sock *); | 874 | extern void tcp_clear_xmit_timers(struct sock *); |
| @@ -958,7 +968,7 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long | |||
| 958 | static inline void tcp_initialize_rcv_mss(struct sock *sk) | 968 | static inline void tcp_initialize_rcv_mss(struct sock *sk) |
| 959 | { | 969 | { |
| 960 | struct tcp_sock *tp = tcp_sk(sk); | 970 | struct tcp_sock *tp = tcp_sk(sk); |
| 961 | unsigned int hint = min(tp->advmss, tp->mss_cache_std); | 971 | unsigned int hint = min_t(unsigned int, tp->advmss, tp->mss_cache); |
| 962 | 972 | ||
| 963 | hint = min(hint, tp->rcv_wnd/2); | 973 | hint = min(hint, tp->rcv_wnd/2); |
| 964 | hint = min(hint, TCP_MIN_RCVMSS); | 974 | hint = min(hint, TCP_MIN_RCVMSS); |
| @@ -1225,28 +1235,6 @@ static inline void tcp_sync_left_out(struct tcp_sock *tp) | |||
| 1225 | tp->left_out = tp->sacked_out + tp->lost_out; | 1235 | tp->left_out = tp->sacked_out + tp->lost_out; |
| 1226 | } | 1236 | } |
| 1227 | 1237 | ||
| 1228 | extern void tcp_cwnd_application_limited(struct sock *sk); | ||
| 1229 | |||
| 1230 | /* Congestion window validation. (RFC2861) */ | ||
| 1231 | |||
| 1232 | static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp) | ||
| 1233 | { | ||
| 1234 | __u32 packets_out = tp->packets_out; | ||
| 1235 | |||
| 1236 | if (packets_out >= tp->snd_cwnd) { | ||
| 1237 | /* Network is feed fully. */ | ||
| 1238 | tp->snd_cwnd_used = 0; | ||
| 1239 | tp->snd_cwnd_stamp = tcp_time_stamp; | ||
| 1240 | } else { | ||
| 1241 | /* Network starves. */ | ||
| 1242 | if (tp->packets_out > tp->snd_cwnd_used) | ||
| 1243 | tp->snd_cwnd_used = tp->packets_out; | ||
| 1244 | |||
| 1245 | if ((s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= tp->rto) | ||
| 1246 | tcp_cwnd_application_limited(sk); | ||
| 1247 | } | ||
| 1248 | } | ||
| 1249 | |||
| 1250 | /* Set slow start threshould and cwnd not falling to slow start */ | 1238 | /* Set slow start threshould and cwnd not falling to slow start */ |
| 1251 | static inline void __tcp_enter_cwr(struct tcp_sock *tp) | 1239 | static inline void __tcp_enter_cwr(struct tcp_sock *tp) |
| 1252 | { | 1240 | { |
| @@ -1279,12 +1267,6 @@ static __inline__ __u32 tcp_max_burst(const struct tcp_sock *tp) | |||
| 1279 | return 3; | 1267 | return 3; |
| 1280 | } | 1268 | } |
| 1281 | 1269 | ||
| 1282 | static __inline__ int tcp_minshall_check(const struct tcp_sock *tp) | ||
| 1283 | { | ||
| 1284 | return after(tp->snd_sml,tp->snd_una) && | ||
| 1285 | !after(tp->snd_sml, tp->snd_nxt); | ||
| 1286 | } | ||
| 1287 | |||
| 1288 | static __inline__ void tcp_minshall_update(struct tcp_sock *tp, int mss, | 1270 | static __inline__ void tcp_minshall_update(struct tcp_sock *tp, int mss, |
| 1289 | const struct sk_buff *skb) | 1271 | const struct sk_buff *skb) |
| 1290 | { | 1272 | { |
| @@ -1292,122 +1274,18 @@ static __inline__ void tcp_minshall_update(struct tcp_sock *tp, int mss, | |||
| 1292 | tp->snd_sml = TCP_SKB_CB(skb)->end_seq; | 1274 | tp->snd_sml = TCP_SKB_CB(skb)->end_seq; |
| 1293 | } | 1275 | } |
| 1294 | 1276 | ||
| 1295 | /* Return 0, if packet can be sent now without violation Nagle's rules: | ||
| 1296 | 1. It is full sized. | ||
| 1297 | 2. Or it contains FIN. | ||
| 1298 | 3. Or TCP_NODELAY was set. | ||
| 1299 | 4. Or TCP_CORK is not set, and all sent packets are ACKed. | ||
| 1300 | With Minshall's modification: all sent small packets are ACKed. | ||
| 1301 | */ | ||
| 1302 | |||
| 1303 | static __inline__ int | ||
| 1304 | tcp_nagle_check(const struct tcp_sock *tp, const struct sk_buff *skb, | ||
| 1305 | unsigned mss_now, int nonagle) | ||
| 1306 | { | ||
| 1307 | return (skb->len < mss_now && | ||
| 1308 | !(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) && | ||
| 1309 | ((nonagle&TCP_NAGLE_CORK) || | ||
| 1310 | (!nonagle && | ||
| 1311 | tp->packets_out && | ||
| 1312 | tcp_minshall_check(tp)))); | ||
| 1313 | } | ||
| 1314 | |||
| 1315 | extern void tcp_set_skb_tso_segs(struct sock *, struct sk_buff *); | ||
| 1316 | |||
| 1317 | /* This checks if the data bearing packet SKB (usually sk->sk_send_head) | ||
| 1318 | * should be put on the wire right now. | ||
| 1319 | */ | ||
| 1320 | static __inline__ int tcp_snd_test(struct sock *sk, | ||
| 1321 | struct sk_buff *skb, | ||
| 1322 | unsigned cur_mss, int nonagle) | ||
| 1323 | { | ||
| 1324 | struct tcp_sock *tp = tcp_sk(sk); | ||
| 1325 | int pkts = tcp_skb_pcount(skb); | ||
| 1326 | |||
| 1327 | if (!pkts) { | ||
| 1328 | tcp_set_skb_tso_segs(sk, skb); | ||
| 1329 | pkts = tcp_skb_pcount(skb); | ||
| 1330 | } | ||
| 1331 | |||
| 1332 | /* RFC 1122 - section 4.2.3.4 | ||
| 1333 | * | ||
| 1334 | * We must queue if | ||
| 1335 | * | ||
| 1336 | * a) The right edge of this frame exceeds the window | ||
| 1337 | * b) There are packets in flight and we have a small segment | ||
| 1338 | * [SWS avoidance and Nagle algorithm] | ||
| 1339 | * (part of SWS is done on packetization) | ||
| 1340 | * Minshall version sounds: there are no _small_ | ||
| 1341 | * segments in flight. (tcp_nagle_check) | ||
| 1342 | * c) We have too many packets 'in flight' | ||
| 1343 | * | ||
| 1344 | * Don't use the nagle rule for urgent data (or | ||
| 1345 | * for the final FIN -DaveM). | ||
| 1346 | * | ||
| 1347 | * Also, Nagle rule does not apply to frames, which | ||
| 1348 | * sit in the middle of queue (they have no chances | ||
| 1349 | * to get new data) and if room at tail of skb is | ||
| 1350 | * not enough to save something seriously (<32 for now). | ||
| 1351 | */ | ||
| 1352 | |||
| 1353 | /* Don't be strict about the congestion window for the | ||
| 1354 | * final FIN frame. -DaveM | ||
| 1355 | */ | ||
| 1356 | return (((nonagle&TCP_NAGLE_PUSH) || tp->urg_mode | ||
| 1357 | || !tcp_nagle_check(tp, skb, cur_mss, nonagle)) && | ||
| 1358 | (((tcp_packets_in_flight(tp) + (pkts-1)) < tp->snd_cwnd) || | ||
| 1359 | (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN)) && | ||
| 1360 | !after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd)); | ||
| 1361 | } | ||
| 1362 | |||
| 1363 | static __inline__ void tcp_check_probe_timer(struct sock *sk, struct tcp_sock *tp) | 1277 | static __inline__ void tcp_check_probe_timer(struct sock *sk, struct tcp_sock *tp) |
| 1364 | { | 1278 | { |
| 1365 | if (!tp->packets_out && !tp->pending) | 1279 | if (!tp->packets_out && !tp->pending) |
| 1366 | tcp_reset_xmit_timer(sk, TCP_TIME_PROBE0, tp->rto); | 1280 | tcp_reset_xmit_timer(sk, TCP_TIME_PROBE0, tp->rto); |
| 1367 | } | 1281 | } |
| 1368 | 1282 | ||
| 1369 | static __inline__ int tcp_skb_is_last(const struct sock *sk, | ||
| 1370 | const struct sk_buff *skb) | ||
| 1371 | { | ||
| 1372 | return skb->next == (struct sk_buff *)&sk->sk_write_queue; | ||
| 1373 | } | ||
| 1374 | |||
| 1375 | /* Push out any pending frames which were held back due to | ||
| 1376 | * TCP_CORK or attempt at coalescing tiny packets. | ||
| 1377 | * The socket must be locked by the caller. | ||
| 1378 | */ | ||
| 1379 | static __inline__ void __tcp_push_pending_frames(struct sock *sk, | ||
| 1380 | struct tcp_sock *tp, | ||
| 1381 | unsigned cur_mss, | ||
| 1382 | int nonagle) | ||
| 1383 | { | ||
| 1384 | struct sk_buff *skb = sk->sk_send_head; | ||
| 1385 | |||
| 1386 | if (skb) { | ||
| 1387 | if (!tcp_skb_is_last(sk, skb)) | ||
| 1388 | nonagle = TCP_NAGLE_PUSH; | ||
| 1389 | if (!tcp_snd_test(sk, skb, cur_mss, nonagle) || | ||
| 1390 | tcp_write_xmit(sk, nonagle)) | ||
| 1391 | tcp_check_probe_timer(sk, tp); | ||
| 1392 | } | ||
| 1393 | tcp_cwnd_validate(sk, tp); | ||
| 1394 | } | ||
| 1395 | |||
| 1396 | static __inline__ void tcp_push_pending_frames(struct sock *sk, | 1283 | static __inline__ void tcp_push_pending_frames(struct sock *sk, |
| 1397 | struct tcp_sock *tp) | 1284 | struct tcp_sock *tp) |
| 1398 | { | 1285 | { |
| 1399 | __tcp_push_pending_frames(sk, tp, tcp_current_mss(sk, 1), tp->nonagle); | 1286 | __tcp_push_pending_frames(sk, tp, tcp_current_mss(sk, 1), tp->nonagle); |
| 1400 | } | 1287 | } |
| 1401 | 1288 | ||
| 1402 | static __inline__ int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp) | ||
| 1403 | { | ||
| 1404 | struct sk_buff *skb = sk->sk_send_head; | ||
| 1405 | |||
| 1406 | return (skb && | ||
| 1407 | tcp_snd_test(sk, skb, tcp_current_mss(sk, 1), | ||
| 1408 | tcp_skb_is_last(sk, skb) ? TCP_NAGLE_PUSH : tp->nonagle)); | ||
| 1409 | } | ||
| 1410 | |||
| 1411 | static __inline__ void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq) | 1289 | static __inline__ void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq) |
| 1412 | { | 1290 | { |
| 1413 | tp->snd_wl1 = seq; | 1291 | tp->snd_wl1 = seq; |
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 90c0e82b650c..b0237122b24e 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
| @@ -574,7 +574,7 @@ static int __init init_kprobes(void) | |||
| 574 | INIT_HLIST_HEAD(&kretprobe_inst_table[i]); | 574 | INIT_HLIST_HEAD(&kretprobe_inst_table[i]); |
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | err = arch_init(); | 577 | err = arch_init_kprobes(); |
| 578 | if (!err) | 578 | if (!err) |
| 579 | err = register_die_notifier(&kprobe_exceptions_nb); | 579 | err = register_die_notifier(&kprobe_exceptions_nb); |
| 580 | 580 | ||
| @@ -2372,6 +2372,9 @@ void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid) | |||
| 2372 | struct slab *slabp; | 2372 | struct slab *slabp; |
| 2373 | kmem_bufctl_t next; | 2373 | kmem_bufctl_t next; |
| 2374 | 2374 | ||
| 2375 | if (nodeid == -1) | ||
| 2376 | return kmem_cache_alloc(cachep, flags); | ||
| 2377 | |||
| 2375 | for (loop = 0;;loop++) { | 2378 | for (loop = 0;;loop++) { |
| 2376 | struct list_head *q; | 2379 | struct list_head *q; |
| 2377 | 2380 | ||
diff --git a/net/core/dev.c b/net/core/dev.c index 7016e0c36b3d..7f5f62c65115 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
| @@ -2089,10 +2089,11 @@ void dev_set_promiscuity(struct net_device *dev, int inc) | |||
| 2089 | { | 2089 | { |
| 2090 | unsigned short old_flags = dev->flags; | 2090 | unsigned short old_flags = dev->flags; |
| 2091 | 2091 | ||
| 2092 | dev->flags |= IFF_PROMISC; | ||
| 2093 | if ((dev->promiscuity += inc) == 0) | 2092 | if ((dev->promiscuity += inc) == 0) |
| 2094 | dev->flags &= ~IFF_PROMISC; | 2093 | dev->flags &= ~IFF_PROMISC; |
| 2095 | if (dev->flags ^ old_flags) { | 2094 | else |
| 2095 | dev->flags |= IFF_PROMISC; | ||
| 2096 | if (dev->flags != old_flags) { | ||
| 2096 | dev_mc_upload(dev); | 2097 | dev_mc_upload(dev); |
| 2097 | printk(KERN_INFO "device %s %s promiscuous mode\n", | 2098 | printk(KERN_INFO "device %s %s promiscuous mode\n", |
| 2098 | dev->name, (dev->flags & IFF_PROMISC) ? "entered" : | 2099 | dev->name, (dev->flags & IFF_PROMISC) ? "entered" : |
diff --git a/net/core/filter.c b/net/core/filter.c index f3b88205ace2..cd91a24f9720 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #include <linux/filter.h> | 36 | #include <linux/filter.h> |
| 37 | 37 | ||
| 38 | /* No hurry in this branch */ | 38 | /* No hurry in this branch */ |
| 39 | static u8 *load_pointer(struct sk_buff *skb, int k) | 39 | static void *__load_pointer(struct sk_buff *skb, int k) |
| 40 | { | 40 | { |
| 41 | u8 *ptr = NULL; | 41 | u8 *ptr = NULL; |
| 42 | 42 | ||
| @@ -50,6 +50,18 @@ static u8 *load_pointer(struct sk_buff *skb, int k) | |||
| 50 | return NULL; | 50 | return NULL; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | static inline void *load_pointer(struct sk_buff *skb, int k, | ||
| 54 | unsigned int size, void *buffer) | ||
| 55 | { | ||
| 56 | if (k >= 0) | ||
| 57 | return skb_header_pointer(skb, k, size, buffer); | ||
| 58 | else { | ||
| 59 | if (k >= SKF_AD_OFF) | ||
| 60 | return NULL; | ||
| 61 | return __load_pointer(skb, k); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | |||
| 53 | /** | 65 | /** |
| 54 | * sk_run_filter - run a filter on a socket | 66 | * sk_run_filter - run a filter on a socket |
| 55 | * @skb: buffer to run the filter on | 67 | * @skb: buffer to run the filter on |
| @@ -64,15 +76,12 @@ static u8 *load_pointer(struct sk_buff *skb, int k) | |||
| 64 | 76 | ||
| 65 | int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen) | 77 | int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen) |
| 66 | { | 78 | { |
| 67 | unsigned char *data = skb->data; | ||
| 68 | /* len is UNSIGNED. Byte wide insns relies only on implicit | ||
| 69 | type casts to prevent reading arbitrary memory locations. | ||
| 70 | */ | ||
| 71 | unsigned int len = skb->len-skb->data_len; | ||
| 72 | struct sock_filter *fentry; /* We walk down these */ | 79 | struct sock_filter *fentry; /* We walk down these */ |
| 80 | void *ptr; | ||
| 73 | u32 A = 0; /* Accumulator */ | 81 | u32 A = 0; /* Accumulator */ |
| 74 | u32 X = 0; /* Index Register */ | 82 | u32 X = 0; /* Index Register */ |
| 75 | u32 mem[BPF_MEMWORDS]; /* Scratch Memory Store */ | 83 | u32 mem[BPF_MEMWORDS]; /* Scratch Memory Store */ |
| 84 | u32 tmp; | ||
| 76 | int k; | 85 | int k; |
| 77 | int pc; | 86 | int pc; |
| 78 | 87 | ||
| @@ -168,86 +177,35 @@ int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen) | |||
| 168 | case BPF_LD|BPF_W|BPF_ABS: | 177 | case BPF_LD|BPF_W|BPF_ABS: |
| 169 | k = fentry->k; | 178 | k = fentry->k; |
| 170 | load_w: | 179 | load_w: |
| 171 | if (k >= 0 && (unsigned int)(k+sizeof(u32)) <= len) { | 180 | ptr = load_pointer(skb, k, 4, &tmp); |
| 172 | A = ntohl(*(u32*)&data[k]); | 181 | if (ptr != NULL) { |
| 182 | A = ntohl(*(u32 *)ptr); | ||
| 173 | continue; | 183 | continue; |
| 174 | } | 184 | } |
| 175 | if (k < 0) { | ||
| 176 | u8 *ptr; | ||
| 177 | |||
| 178 | if (k >= SKF_AD_OFF) | ||
| 179 | break; | ||
| 180 | ptr = load_pointer(skb, k); | ||
| 181 | if (ptr) { | ||
| 182 | A = ntohl(*(u32*)ptr); | ||
| 183 | continue; | ||
| 184 | } | ||
| 185 | } else { | ||
| 186 | u32 _tmp, *p; | ||
| 187 | p = skb_header_pointer(skb, k, 4, &_tmp); | ||
| 188 | if (p != NULL) { | ||
| 189 | A = ntohl(*p); | ||
| 190 | continue; | ||
| 191 | } | ||
| 192 | } | ||
| 193 | return 0; | 185 | return 0; |
| 194 | case BPF_LD|BPF_H|BPF_ABS: | 186 | case BPF_LD|BPF_H|BPF_ABS: |
| 195 | k = fentry->k; | 187 | k = fentry->k; |
| 196 | load_h: | 188 | load_h: |
| 197 | if (k >= 0 && (unsigned int)(k + sizeof(u16)) <= len) { | 189 | ptr = load_pointer(skb, k, 2, &tmp); |
| 198 | A = ntohs(*(u16*)&data[k]); | 190 | if (ptr != NULL) { |
| 191 | A = ntohs(*(u16 *)ptr); | ||
| 199 | continue; | 192 | continue; |
| 200 | } | 193 | } |
| 201 | if (k < 0) { | ||
| 202 | u8 *ptr; | ||
| 203 | |||
| 204 | if (k >= SKF_AD_OFF) | ||
| 205 | break; | ||
| 206 | ptr = load_pointer(skb, k); | ||
| 207 | if (ptr) { | ||
| 208 | A = ntohs(*(u16*)ptr); | ||
| 209 | continue; | ||
| 210 | } | ||
| 211 | } else { | ||
| 212 | u16 _tmp, *p; | ||
| 213 | p = skb_header_pointer(skb, k, 2, &_tmp); | ||
| 214 | if (p != NULL) { | ||
| 215 | A = ntohs(*p); | ||
| 216 | continue; | ||
| 217 | } | ||
| 218 | } | ||
| 219 | return 0; | 194 | return 0; |
| 220 | case BPF_LD|BPF_B|BPF_ABS: | 195 | case BPF_LD|BPF_B|BPF_ABS: |
| 221 | k = fentry->k; | 196 | k = fentry->k; |
| 222 | load_b: | 197 | load_b: |
| 223 | if (k >= 0 && (unsigned int)k < len) { | 198 | ptr = load_pointer(skb, k, 1, &tmp); |
| 224 | A = data[k]; | 199 | if (ptr != NULL) { |
| 200 | A = *(u8 *)ptr; | ||
| 225 | continue; | 201 | continue; |
| 226 | } | 202 | } |
| 227 | if (k < 0) { | ||
| 228 | u8 *ptr; | ||
| 229 | |||
| 230 | if (k >= SKF_AD_OFF) | ||
| 231 | break; | ||
| 232 | ptr = load_pointer(skb, k); | ||
| 233 | if (ptr) { | ||
| 234 | A = *ptr; | ||
| 235 | continue; | ||
| 236 | } | ||
| 237 | } else { | ||
| 238 | u8 _tmp, *p; | ||
| 239 | p = skb_header_pointer(skb, k, 1, &_tmp); | ||
| 240 | if (p != NULL) { | ||
| 241 | A = *p; | ||
| 242 | continue; | ||
| 243 | } | ||
| 244 | } | ||
| 245 | return 0; | 203 | return 0; |
| 246 | case BPF_LD|BPF_W|BPF_LEN: | 204 | case BPF_LD|BPF_W|BPF_LEN: |
| 247 | A = len; | 205 | A = skb->len; |
| 248 | continue; | 206 | continue; |
| 249 | case BPF_LDX|BPF_W|BPF_LEN: | 207 | case BPF_LDX|BPF_W|BPF_LEN: |
| 250 | X = len; | 208 | X = skb->len; |
| 251 | continue; | 209 | continue; |
| 252 | case BPF_LD|BPF_W|BPF_IND: | 210 | case BPF_LD|BPF_W|BPF_IND: |
| 253 | k = X + fentry->k; | 211 | k = X + fentry->k; |
| @@ -259,10 +217,12 @@ load_b: | |||
| 259 | k = X + fentry->k; | 217 | k = X + fentry->k; |
| 260 | goto load_b; | 218 | goto load_b; |
| 261 | case BPF_LDX|BPF_B|BPF_MSH: | 219 | case BPF_LDX|BPF_B|BPF_MSH: |
| 262 | if (fentry->k >= len) | 220 | ptr = load_pointer(skb, fentry->k, 1, &tmp); |
| 263 | return 0; | 221 | if (ptr != NULL) { |
| 264 | X = (data[fentry->k] & 0xf) << 2; | 222 | X = (*(u8 *)ptr & 0xf) << 2; |
| 265 | continue; | 223 | continue; |
| 224 | } | ||
| 225 | return 0; | ||
| 266 | case BPF_LD|BPF_IMM: | 226 | case BPF_LD|BPF_IMM: |
| 267 | A = fentry->k; | 227 | A = fentry->k; |
| 268 | continue; | 228 | continue; |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index bb73b2190ec7..733deee24b9f 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
| @@ -357,7 +357,6 @@ struct sk_buff *skb_clone(struct sk_buff *skb, int gfp_mask) | |||
| 357 | C(ip_summed); | 357 | C(ip_summed); |
| 358 | C(priority); | 358 | C(priority); |
| 359 | C(protocol); | 359 | C(protocol); |
| 360 | C(security); | ||
| 361 | n->destructor = NULL; | 360 | n->destructor = NULL; |
| 362 | #ifdef CONFIG_NETFILTER | 361 | #ifdef CONFIG_NETFILTER |
| 363 | C(nfmark); | 362 | C(nfmark); |
| @@ -422,7 +421,6 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) | |||
| 422 | new->pkt_type = old->pkt_type; | 421 | new->pkt_type = old->pkt_type; |
| 423 | new->stamp = old->stamp; | 422 | new->stamp = old->stamp; |
| 424 | new->destructor = NULL; | 423 | new->destructor = NULL; |
| 425 | new->security = old->security; | ||
| 426 | #ifdef CONFIG_NETFILTER | 424 | #ifdef CONFIG_NETFILTER |
| 427 | new->nfmark = old->nfmark; | 425 | new->nfmark = old->nfmark; |
| 428 | new->nfcache = old->nfcache; | 426 | new->nfcache = old->nfcache; |
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index 9934b25720e4..99bc061759c3 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c | |||
| @@ -551,7 +551,8 @@ int dn_fib_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
| 551 | if (t < s_t) | 551 | if (t < s_t) |
| 552 | continue; | 552 | continue; |
| 553 | if (t > s_t) | 553 | if (t > s_t) |
| 554 | memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(int)); | 554 | memset(&cb->args[1], 0, |
| 555 | sizeof(cb->args) - sizeof(cb->args[0])); | ||
| 555 | tb = dn_fib_get_table(t, 0); | 556 | tb = dn_fib_get_table(t, 0); |
| 556 | if (tb == NULL) | 557 | if (tb == NULL) |
| 557 | continue; | 558 | continue; |
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 658e7977924d..ef7468376ae6 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
| @@ -1009,6 +1009,15 @@ static int __init init_ipv4_mibs(void) | |||
| 1009 | static int ipv4_proc_init(void); | 1009 | static int ipv4_proc_init(void); |
| 1010 | extern void ipfrag_init(void); | 1010 | extern void ipfrag_init(void); |
| 1011 | 1011 | ||
| 1012 | /* | ||
| 1013 | * IP protocol layer initialiser | ||
| 1014 | */ | ||
| 1015 | |||
| 1016 | static struct packet_type ip_packet_type = { | ||
| 1017 | .type = __constant_htons(ETH_P_IP), | ||
| 1018 | .func = ip_rcv, | ||
| 1019 | }; | ||
| 1020 | |||
| 1012 | static int __init inet_init(void) | 1021 | static int __init inet_init(void) |
| 1013 | { | 1022 | { |
| 1014 | struct sk_buff *dummy_skb; | 1023 | struct sk_buff *dummy_skb; |
| @@ -1102,6 +1111,8 @@ static int __init inet_init(void) | |||
| 1102 | 1111 | ||
| 1103 | ipfrag_init(); | 1112 | ipfrag_init(); |
| 1104 | 1113 | ||
| 1114 | dev_add_pack(&ip_packet_type); | ||
| 1115 | |||
| 1105 | rc = 0; | 1116 | rc = 0; |
| 1106 | out: | 1117 | out: |
| 1107 | return rc; | 1118 | return rc; |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index b56e88edf1b3..4be234c7d8c3 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | * 2 of the License, or (at your option) any later version. | 43 | * 2 of the License, or (at your option) any later version. |
| 44 | */ | 44 | */ |
| 45 | 45 | ||
| 46 | #define VERSION "0.324" | 46 | #define VERSION "0.325" |
| 47 | 47 | ||
| 48 | #include <linux/config.h> | 48 | #include <linux/config.h> |
| 49 | #include <asm/uaccess.h> | 49 | #include <asm/uaccess.h> |
| @@ -136,6 +136,7 @@ struct trie_use_stats { | |||
| 136 | unsigned int semantic_match_passed; | 136 | unsigned int semantic_match_passed; |
| 137 | unsigned int semantic_match_miss; | 137 | unsigned int semantic_match_miss; |
| 138 | unsigned int null_node_hit; | 138 | unsigned int null_node_hit; |
| 139 | unsigned int resize_node_skipped; | ||
| 139 | }; | 140 | }; |
| 140 | #endif | 141 | #endif |
| 141 | 142 | ||
| @@ -164,8 +165,8 @@ static void put_child(struct trie *t, struct tnode *tn, int i, struct node *n); | |||
| 164 | static void tnode_put_child_reorg(struct tnode *tn, int i, struct node *n, int wasfull); | 165 | static void tnode_put_child_reorg(struct tnode *tn, int i, struct node *n, int wasfull); |
| 165 | static int tnode_child_length(struct tnode *tn); | 166 | static int tnode_child_length(struct tnode *tn); |
| 166 | static struct node *resize(struct trie *t, struct tnode *tn); | 167 | static struct node *resize(struct trie *t, struct tnode *tn); |
| 167 | static struct tnode *inflate(struct trie *t, struct tnode *tn); | 168 | static struct tnode *inflate(struct trie *t, struct tnode *tn, int *err); |
| 168 | static struct tnode *halve(struct trie *t, struct tnode *tn); | 169 | static struct tnode *halve(struct trie *t, struct tnode *tn, int *err); |
| 169 | static void tnode_free(struct tnode *tn); | 170 | static void tnode_free(struct tnode *tn); |
| 170 | static void trie_dump_seq(struct seq_file *seq, struct trie *t); | 171 | static void trie_dump_seq(struct seq_file *seq, struct trie *t); |
| 171 | extern struct fib_alias *fib_find_alias(struct list_head *fah, u8 tos, u32 prio); | 172 | extern struct fib_alias *fib_find_alias(struct list_head *fah, u8 tos, u32 prio); |
| @@ -358,11 +359,32 @@ static inline void free_leaf_info(struct leaf_info *li) | |||
| 358 | kfree(li); | 359 | kfree(li); |
| 359 | } | 360 | } |
| 360 | 361 | ||
| 362 | static struct tnode *tnode_alloc(unsigned int size) | ||
| 363 | { | ||
| 364 | if (size <= PAGE_SIZE) { | ||
| 365 | return kmalloc(size, GFP_KERNEL); | ||
| 366 | } else { | ||
| 367 | return (struct tnode *) | ||
| 368 | __get_free_pages(GFP_KERNEL, get_order(size)); | ||
| 369 | } | ||
| 370 | } | ||
| 371 | |||
| 372 | static void __tnode_free(struct tnode *tn) | ||
| 373 | { | ||
| 374 | unsigned int size = sizeof(struct tnode) + | ||
| 375 | (1<<tn->bits) * sizeof(struct node *); | ||
| 376 | |||
| 377 | if (size <= PAGE_SIZE) | ||
| 378 | kfree(tn); | ||
| 379 | else | ||
| 380 | free_pages((unsigned long)tn, get_order(size)); | ||
| 381 | } | ||
| 382 | |||
| 361 | static struct tnode* tnode_new(t_key key, int pos, int bits) | 383 | static struct tnode* tnode_new(t_key key, int pos, int bits) |
| 362 | { | 384 | { |
| 363 | int nchildren = 1<<bits; | 385 | int nchildren = 1<<bits; |
| 364 | int sz = sizeof(struct tnode) + nchildren * sizeof(struct node *); | 386 | int sz = sizeof(struct tnode) + nchildren * sizeof(struct node *); |
| 365 | struct tnode *tn = kmalloc(sz, GFP_KERNEL); | 387 | struct tnode *tn = tnode_alloc(sz); |
| 366 | 388 | ||
| 367 | if(tn) { | 389 | if(tn) { |
| 368 | memset(tn, 0, sz); | 390 | memset(tn, 0, sz); |
| @@ -390,7 +412,7 @@ static void tnode_free(struct tnode *tn) | |||
| 390 | printk("FL %p \n", tn); | 412 | printk("FL %p \n", tn); |
| 391 | } | 413 | } |
| 392 | else if(IS_TNODE(tn)) { | 414 | else if(IS_TNODE(tn)) { |
| 393 | kfree(tn); | 415 | __tnode_free(tn); |
| 394 | if(trie_debug > 0 ) | 416 | if(trie_debug > 0 ) |
| 395 | printk("FT %p \n", tn); | 417 | printk("FT %p \n", tn); |
| 396 | } | 418 | } |
| @@ -460,6 +482,7 @@ static void tnode_put_child_reorg(struct tnode *tn, int i, struct node *n, int w | |||
| 460 | static struct node *resize(struct trie *t, struct tnode *tn) | 482 | static struct node *resize(struct trie *t, struct tnode *tn) |
| 461 | { | 483 | { |
| 462 | int i; | 484 | int i; |
| 485 | int err = 0; | ||
| 463 | 486 | ||
| 464 | if (!tn) | 487 | if (!tn) |
| 465 | return NULL; | 488 | return NULL; |
| @@ -556,12 +579,20 @@ static struct node *resize(struct trie *t, struct tnode *tn) | |||
| 556 | */ | 579 | */ |
| 557 | 580 | ||
| 558 | check_tnode(tn); | 581 | check_tnode(tn); |
| 559 | 582 | ||
| 583 | err = 0; | ||
| 560 | while ((tn->full_children > 0 && | 584 | while ((tn->full_children > 0 && |
| 561 | 50 * (tn->full_children + tnode_child_length(tn) - tn->empty_children) >= | 585 | 50 * (tn->full_children + tnode_child_length(tn) - tn->empty_children) >= |
| 562 | inflate_threshold * tnode_child_length(tn))) { | 586 | inflate_threshold * tnode_child_length(tn))) { |
| 563 | 587 | ||
| 564 | tn = inflate(t, tn); | 588 | tn = inflate(t, tn, &err); |
| 589 | |||
| 590 | if(err) { | ||
| 591 | #ifdef CONFIG_IP_FIB_TRIE_STATS | ||
| 592 | t->stats.resize_node_skipped++; | ||
| 593 | #endif | ||
| 594 | break; | ||
| 595 | } | ||
| 565 | } | 596 | } |
| 566 | 597 | ||
| 567 | check_tnode(tn); | 598 | check_tnode(tn); |
| @@ -570,11 +601,22 @@ static struct node *resize(struct trie *t, struct tnode *tn) | |||
| 570 | * Halve as long as the number of empty children in this | 601 | * Halve as long as the number of empty children in this |
| 571 | * node is above threshold. | 602 | * node is above threshold. |
| 572 | */ | 603 | */ |
| 604 | |||
| 605 | err = 0; | ||
| 573 | while (tn->bits > 1 && | 606 | while (tn->bits > 1 && |
| 574 | 100 * (tnode_child_length(tn) - tn->empty_children) < | 607 | 100 * (tnode_child_length(tn) - tn->empty_children) < |
| 575 | halve_threshold * tnode_child_length(tn)) | 608 | halve_threshold * tnode_child_length(tn)) { |
| 609 | |||
| 610 | tn = halve(t, tn, &err); | ||
| 611 | |||
| 612 | if(err) { | ||
| 613 | #ifdef CONFIG_IP_FIB_TRIE_STATS | ||
| 614 | t->stats.resize_node_skipped++; | ||
| 615 | #endif | ||
| 616 | break; | ||
| 617 | } | ||
| 618 | } | ||
| 576 | 619 | ||
| 577 | tn = halve(t, tn); | ||
| 578 | 620 | ||
| 579 | /* Only one child remains */ | 621 | /* Only one child remains */ |
| 580 | 622 | ||
| @@ -599,7 +641,7 @@ static struct node *resize(struct trie *t, struct tnode *tn) | |||
| 599 | return (struct node *) tn; | 641 | return (struct node *) tn; |
| 600 | } | 642 | } |
| 601 | 643 | ||
| 602 | static struct tnode *inflate(struct trie *t, struct tnode *tn) | 644 | static struct tnode *inflate(struct trie *t, struct tnode *tn, int *err) |
| 603 | { | 645 | { |
| 604 | struct tnode *inode; | 646 | struct tnode *inode; |
| 605 | struct tnode *oldtnode = tn; | 647 | struct tnode *oldtnode = tn; |
| @@ -611,8 +653,63 @@ static struct tnode *inflate(struct trie *t, struct tnode *tn) | |||
| 611 | 653 | ||
| 612 | tn = tnode_new(oldtnode->key, oldtnode->pos, oldtnode->bits + 1); | 654 | tn = tnode_new(oldtnode->key, oldtnode->pos, oldtnode->bits + 1); |
| 613 | 655 | ||
| 614 | if (!tn) | 656 | if (!tn) { |
| 615 | trie_bug("tnode_new failed"); | 657 | *err = -ENOMEM; |
| 658 | return oldtnode; | ||
| 659 | } | ||
| 660 | |||
| 661 | /* | ||
| 662 | * Preallocate and store tnodes before the actual work so we | ||
| 663 | * don't get into an inconsistent state if memory allocation | ||
| 664 | * fails. In case of failure we return the oldnode and inflate | ||
| 665 | * of tnode is ignored. | ||
| 666 | */ | ||
| 667 | |||
| 668 | for(i = 0; i < olen; i++) { | ||
| 669 | struct tnode *inode = (struct tnode *) tnode_get_child(oldtnode, i); | ||
| 670 | |||
| 671 | if (inode && | ||
| 672 | IS_TNODE(inode) && | ||
| 673 | inode->pos == oldtnode->pos + oldtnode->bits && | ||
| 674 | inode->bits > 1) { | ||
| 675 | struct tnode *left, *right; | ||
| 676 | |||
| 677 | t_key m = TKEY_GET_MASK(inode->pos, 1); | ||
| 678 | |||
| 679 | left = tnode_new(inode->key&(~m), inode->pos + 1, | ||
| 680 | inode->bits - 1); | ||
| 681 | |||
| 682 | if(!left) { | ||
| 683 | *err = -ENOMEM; | ||
| 684 | break; | ||
| 685 | } | ||
| 686 | |||
| 687 | right = tnode_new(inode->key|m, inode->pos + 1, | ||
| 688 | inode->bits - 1); | ||
| 689 | |||
| 690 | if(!right) { | ||
| 691 | *err = -ENOMEM; | ||
| 692 | break; | ||
| 693 | } | ||
| 694 | |||
| 695 | put_child(t, tn, 2*i, (struct node *) left); | ||
| 696 | put_child(t, tn, 2*i+1, (struct node *) right); | ||
| 697 | } | ||
| 698 | } | ||
| 699 | |||
| 700 | if(*err) { | ||
| 701 | int size = tnode_child_length(tn); | ||
| 702 | int j; | ||
| 703 | |||
| 704 | for(j = 0; j < size; j++) | ||
| 705 | if( tn->child[j]) | ||
| 706 | tnode_free((struct tnode *)tn->child[j]); | ||
| 707 | |||
| 708 | tnode_free(tn); | ||
| 709 | |||
| 710 | *err = -ENOMEM; | ||
| 711 | return oldtnode; | ||
| 712 | } | ||
| 616 | 713 | ||
| 617 | for(i = 0; i < olen; i++) { | 714 | for(i = 0; i < olen; i++) { |
| 618 | struct node *node = tnode_get_child(oldtnode, i); | 715 | struct node *node = tnode_get_child(oldtnode, i); |
| @@ -625,7 +722,7 @@ static struct tnode *inflate(struct trie *t, struct tnode *tn) | |||
| 625 | 722 | ||
| 626 | if(IS_LEAF(node) || ((struct tnode *) node)->pos > | 723 | if(IS_LEAF(node) || ((struct tnode *) node)->pos > |
| 627 | tn->pos + tn->bits - 1) { | 724 | tn->pos + tn->bits - 1) { |
| 628 | if(tkey_extract_bits(node->key, tn->pos + tn->bits - 1, | 725 | if(tkey_extract_bits(node->key, oldtnode->pos + oldtnode->bits, |
| 629 | 1) == 0) | 726 | 1) == 0) |
| 630 | put_child(t, tn, 2*i, node); | 727 | put_child(t, tn, 2*i, node); |
| 631 | else | 728 | else |
| @@ -665,27 +762,22 @@ static struct tnode *inflate(struct trie *t, struct tnode *tn) | |||
| 665 | * the position (inode->pos) | 762 | * the position (inode->pos) |
| 666 | */ | 763 | */ |
| 667 | 764 | ||
| 668 | t_key m = TKEY_GET_MASK(inode->pos, 1); | ||
| 669 | |||
| 670 | /* Use the old key, but set the new significant | 765 | /* Use the old key, but set the new significant |
| 671 | * bit to zero. | 766 | * bit to zero. |
| 672 | */ | 767 | */ |
| 673 | left = tnode_new(inode->key&(~m), inode->pos + 1, | ||
| 674 | inode->bits - 1); | ||
| 675 | 768 | ||
| 676 | if(!left) | 769 | left = (struct tnode *) tnode_get_child(tn, 2*i); |
| 677 | trie_bug("tnode_new failed"); | 770 | put_child(t, tn, 2*i, NULL); |
| 678 | 771 | ||
| 679 | 772 | if(!left) | |
| 680 | /* Use the old key, but set the new significant | 773 | BUG(); |
| 681 | * bit to one. | 774 | |
| 682 | */ | 775 | right = (struct tnode *) tnode_get_child(tn, 2*i+1); |
| 683 | right = tnode_new(inode->key|m, inode->pos + 1, | 776 | put_child(t, tn, 2*i+1, NULL); |
| 684 | inode->bits - 1); | 777 | |
| 778 | if(!right) | ||
| 779 | BUG(); | ||
| 685 | 780 | ||
| 686 | if(!right) | ||
| 687 | trie_bug("tnode_new failed"); | ||
| 688 | |||
| 689 | size = tnode_child_length(left); | 781 | size = tnode_child_length(left); |
| 690 | for(j = 0; j < size; j++) { | 782 | for(j = 0; j < size; j++) { |
| 691 | put_child(t, left, j, inode->child[j]); | 783 | put_child(t, left, j, inode->child[j]); |
| @@ -701,7 +793,7 @@ static struct tnode *inflate(struct trie *t, struct tnode *tn) | |||
| 701 | return tn; | 793 | return tn; |
| 702 | } | 794 | } |
| 703 | 795 | ||
| 704 | static struct tnode *halve(struct trie *t, struct tnode *tn) | 796 | static struct tnode *halve(struct trie *t, struct tnode *tn, int *err) |
| 705 | { | 797 | { |
| 706 | struct tnode *oldtnode = tn; | 798 | struct tnode *oldtnode = tn; |
| 707 | struct node *left, *right; | 799 | struct node *left, *right; |
| @@ -712,8 +804,48 @@ static struct tnode *halve(struct trie *t, struct tnode *tn) | |||
| 712 | 804 | ||
| 713 | tn=tnode_new(oldtnode->key, oldtnode->pos, oldtnode->bits - 1); | 805 | tn=tnode_new(oldtnode->key, oldtnode->pos, oldtnode->bits - 1); |
| 714 | 806 | ||
| 715 | if(!tn) | 807 | if (!tn) { |
| 716 | trie_bug("tnode_new failed"); | 808 | *err = -ENOMEM; |
| 809 | return oldtnode; | ||
| 810 | } | ||
| 811 | |||
| 812 | /* | ||
| 813 | * Preallocate and store tnodes before the actual work so we | ||
| 814 | * don't get into an inconsistent state if memory allocation | ||
| 815 | * fails. In case of failure we return the oldnode and halve | ||
| 816 | * of tnode is ignored. | ||
| 817 | */ | ||
| 818 | |||
| 819 | for(i = 0; i < olen; i += 2) { | ||
| 820 | left = tnode_get_child(oldtnode, i); | ||
| 821 | right = tnode_get_child(oldtnode, i+1); | ||
| 822 | |||
| 823 | /* Two nonempty children */ | ||
| 824 | if( left && right) { | ||
| 825 | struct tnode *newBinNode = | ||
| 826 | tnode_new(left->key, tn->pos + tn->bits, 1); | ||
| 827 | |||
| 828 | if(!newBinNode) { | ||
| 829 | *err = -ENOMEM; | ||
| 830 | break; | ||
| 831 | } | ||
| 832 | put_child(t, tn, i/2, (struct node *)newBinNode); | ||
| 833 | } | ||
| 834 | } | ||
| 835 | |||
| 836 | if(*err) { | ||
| 837 | int size = tnode_child_length(tn); | ||
| 838 | int j; | ||
| 839 | |||
| 840 | for(j = 0; j < size; j++) | ||
| 841 | if( tn->child[j]) | ||
| 842 | tnode_free((struct tnode *)tn->child[j]); | ||
| 843 | |||
| 844 | tnode_free(tn); | ||
| 845 | |||
| 846 | *err = -ENOMEM; | ||
| 847 | return oldtnode; | ||
| 848 | } | ||
| 717 | 849 | ||
| 718 | for(i = 0; i < olen; i += 2) { | 850 | for(i = 0; i < olen; i += 2) { |
| 719 | left = tnode_get_child(oldtnode, i); | 851 | left = tnode_get_child(oldtnode, i); |
| @@ -730,10 +862,11 @@ static struct tnode *halve(struct trie *t, struct tnode *tn) | |||
| 730 | /* Two nonempty children */ | 862 | /* Two nonempty children */ |
| 731 | else { | 863 | else { |
| 732 | struct tnode *newBinNode = | 864 | struct tnode *newBinNode = |
| 733 | tnode_new(left->key, tn->pos + tn->bits, 1); | 865 | (struct tnode *) tnode_get_child(tn, i/2); |
| 866 | put_child(t, tn, i/2, NULL); | ||
| 734 | 867 | ||
| 735 | if(!newBinNode) | 868 | if(!newBinNode) |
| 736 | trie_bug("tnode_new failed"); | 869 | BUG(); |
| 737 | 870 | ||
| 738 | put_child(t, newBinNode, 0, left); | 871 | put_child(t, newBinNode, 0, left); |
| 739 | put_child(t, newBinNode, 1, right); | 872 | put_child(t, newBinNode, 1, right); |
| @@ -2301,6 +2434,7 @@ static void collect_and_show(struct trie *t, struct seq_file *seq) | |||
| 2301 | seq_printf(seq,"semantic match passed = %d\n", t->stats.semantic_match_passed); | 2434 | seq_printf(seq,"semantic match passed = %d\n", t->stats.semantic_match_passed); |
| 2302 | seq_printf(seq,"semantic match miss = %d\n", t->stats.semantic_match_miss); | 2435 | seq_printf(seq,"semantic match miss = %d\n", t->stats.semantic_match_miss); |
| 2303 | seq_printf(seq,"null node hit= %d\n", t->stats.null_node_hit); | 2436 | seq_printf(seq,"null node hit= %d\n", t->stats.null_node_hit); |
| 2437 | seq_printf(seq,"skipped node resize = %d\n", t->stats.resize_node_skipped); | ||
| 2304 | #ifdef CLEAR_STATS | 2438 | #ifdef CLEAR_STATS |
| 2305 | memset(&(t->stats), 0, sizeof(t->stats)); | 2439 | memset(&(t->stats), 0, sizeof(t->stats)); |
| 2306 | #endif | 2440 | #endif |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 6ce5c3292f9f..9de83e6e0f1d 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
| @@ -389,7 +389,6 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from) | |||
| 389 | to->pkt_type = from->pkt_type; | 389 | to->pkt_type = from->pkt_type; |
| 390 | to->priority = from->priority; | 390 | to->priority = from->priority; |
| 391 | to->protocol = from->protocol; | 391 | to->protocol = from->protocol; |
| 392 | to->security = from->security; | ||
| 393 | dst_release(to->dst); | 392 | dst_release(to->dst); |
| 394 | to->dst = dst_clone(from->dst); | 393 | to->dst = dst_clone(from->dst); |
| 395 | to->dev = from->dev; | 394 | to->dev = from->dev; |
| @@ -1329,23 +1328,8 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar | |||
| 1329 | ip_rt_put(rt); | 1328 | ip_rt_put(rt); |
| 1330 | } | 1329 | } |
| 1331 | 1330 | ||
| 1332 | /* | ||
| 1333 | * IP protocol layer initialiser | ||
| 1334 | */ | ||
| 1335 | |||
| 1336 | static struct packet_type ip_packet_type = { | ||
| 1337 | .type = __constant_htons(ETH_P_IP), | ||
| 1338 | .func = ip_rcv, | ||
| 1339 | }; | ||
| 1340 | |||
| 1341 | /* | ||
| 1342 | * IP registers the packet type and then calls the subprotocol initialisers | ||
| 1343 | */ | ||
| 1344 | |||
| 1345 | void __init ip_init(void) | 1331 | void __init ip_init(void) |
| 1346 | { | 1332 | { |
| 1347 | dev_add_pack(&ip_packet_type); | ||
| 1348 | |||
| 1349 | ip_rt_init(); | 1333 | ip_rt_init(); |
| 1350 | inet_initpeers(); | 1334 | inet_initpeers(); |
| 1351 | 1335 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 12a1cf306f67..726ea5e8180a 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
| @@ -54,6 +54,7 @@ | |||
| 54 | * Marc Boucher : routing by fwmark | 54 | * Marc Boucher : routing by fwmark |
| 55 | * Robert Olsson : Added rt_cache statistics | 55 | * Robert Olsson : Added rt_cache statistics |
| 56 | * Arnaldo C. Melo : Convert proc stuff to seq_file | 56 | * Arnaldo C. Melo : Convert proc stuff to seq_file |
| 57 | * Eric Dumazet : hashed spinlocks and rt_check_expire() fixes. | ||
| 57 | * | 58 | * |
| 58 | * This program is free software; you can redistribute it and/or | 59 | * This program is free software; you can redistribute it and/or |
| 59 | * modify it under the terms of the GNU General Public License | 60 | * modify it under the terms of the GNU General Public License |
| @@ -70,6 +71,7 @@ | |||
| 70 | #include <linux/kernel.h> | 71 | #include <linux/kernel.h> |
| 71 | #include <linux/sched.h> | 72 | #include <linux/sched.h> |
| 72 | #include <linux/mm.h> | 73 | #include <linux/mm.h> |
| 74 | #include <linux/bootmem.h> | ||
| 73 | #include <linux/string.h> | 75 | #include <linux/string.h> |
| 74 | #include <linux/socket.h> | 76 | #include <linux/socket.h> |
| 75 | #include <linux/sockios.h> | 77 | #include <linux/sockios.h> |
| @@ -201,8 +203,37 @@ __u8 ip_tos2prio[16] = { | |||
| 201 | 203 | ||
| 202 | struct rt_hash_bucket { | 204 | struct rt_hash_bucket { |
| 203 | struct rtable *chain; | 205 | struct rtable *chain; |
| 204 | spinlock_t lock; | 206 | }; |
| 205 | } __attribute__((__aligned__(8))); | 207 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
| 208 | /* | ||
| 209 | * Instead of using one spinlock for each rt_hash_bucket, we use a table of spinlocks | ||
| 210 | * The size of this table is a power of two and depends on the number of CPUS. | ||
| 211 | */ | ||
| 212 | #if NR_CPUS >= 32 | ||
| 213 | #define RT_HASH_LOCK_SZ 4096 | ||
| 214 | #elif NR_CPUS >= 16 | ||
| 215 | #define RT_HASH_LOCK_SZ 2048 | ||
| 216 | #elif NR_CPUS >= 8 | ||
| 217 | #define RT_HASH_LOCK_SZ 1024 | ||
| 218 | #elif NR_CPUS >= 4 | ||
| 219 | #define RT_HASH_LOCK_SZ 512 | ||
| 220 | #else | ||
| 221 | #define RT_HASH_LOCK_SZ 256 | ||
| 222 | #endif | ||
| 223 | |||
| 224 | static spinlock_t *rt_hash_locks; | ||
| 225 | # define rt_hash_lock_addr(slot) &rt_hash_locks[(slot) & (RT_HASH_LOCK_SZ - 1)] | ||
| 226 | # define rt_hash_lock_init() { \ | ||
| 227 | int i; \ | ||
| 228 | rt_hash_locks = kmalloc(sizeof(spinlock_t) * RT_HASH_LOCK_SZ, GFP_KERNEL); \ | ||
| 229 | if (!rt_hash_locks) panic("IP: failed to allocate rt_hash_locks\n"); \ | ||
| 230 | for (i = 0; i < RT_HASH_LOCK_SZ; i++) \ | ||
| 231 | spin_lock_init(&rt_hash_locks[i]); \ | ||
| 232 | } | ||
| 233 | #else | ||
| 234 | # define rt_hash_lock_addr(slot) NULL | ||
| 235 | # define rt_hash_lock_init() | ||
| 236 | #endif | ||
| 206 | 237 | ||
| 207 | static struct rt_hash_bucket *rt_hash_table; | 238 | static struct rt_hash_bucket *rt_hash_table; |
| 208 | static unsigned rt_hash_mask; | 239 | static unsigned rt_hash_mask; |
| @@ -575,19 +606,26 @@ static struct rtable **rt_remove_balanced_route(struct rtable **chain_head, | |||
| 575 | /* This runs via a timer and thus is always in BH context. */ | 606 | /* This runs via a timer and thus is always in BH context. */ |
| 576 | static void rt_check_expire(unsigned long dummy) | 607 | static void rt_check_expire(unsigned long dummy) |
| 577 | { | 608 | { |
| 578 | static int rover; | 609 | static unsigned int rover; |
| 579 | int i = rover, t; | 610 | unsigned int i = rover, goal; |
| 580 | struct rtable *rth, **rthp; | 611 | struct rtable *rth, **rthp; |
| 581 | unsigned long now = jiffies; | 612 | unsigned long now = jiffies; |
| 582 | 613 | u64 mult; | |
| 583 | for (t = ip_rt_gc_interval << rt_hash_log; t >= 0; | 614 | |
| 584 | t -= ip_rt_gc_timeout) { | 615 | mult = ((u64)ip_rt_gc_interval) << rt_hash_log; |
| 616 | if (ip_rt_gc_timeout > 1) | ||
| 617 | do_div(mult, ip_rt_gc_timeout); | ||
| 618 | goal = (unsigned int)mult; | ||
| 619 | if (goal > rt_hash_mask) goal = rt_hash_mask + 1; | ||
| 620 | for (; goal > 0; goal--) { | ||
| 585 | unsigned long tmo = ip_rt_gc_timeout; | 621 | unsigned long tmo = ip_rt_gc_timeout; |
| 586 | 622 | ||
| 587 | i = (i + 1) & rt_hash_mask; | 623 | i = (i + 1) & rt_hash_mask; |
| 588 | rthp = &rt_hash_table[i].chain; | 624 | rthp = &rt_hash_table[i].chain; |
| 589 | 625 | ||
| 590 | spin_lock(&rt_hash_table[i].lock); | 626 | if (*rthp == 0) |
| 627 | continue; | ||
| 628 | spin_lock(rt_hash_lock_addr(i)); | ||
| 591 | while ((rth = *rthp) != NULL) { | 629 | while ((rth = *rthp) != NULL) { |
| 592 | if (rth->u.dst.expires) { | 630 | if (rth->u.dst.expires) { |
| 593 | /* Entry is expired even if it is in use */ | 631 | /* Entry is expired even if it is in use */ |
| @@ -620,14 +658,14 @@ static void rt_check_expire(unsigned long dummy) | |||
| 620 | rt_free(rth); | 658 | rt_free(rth); |
| 621 | #endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ | 659 | #endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ |
| 622 | } | 660 | } |
| 623 | spin_unlock(&rt_hash_table[i].lock); | 661 | spin_unlock(rt_hash_lock_addr(i)); |
| 624 | 662 | ||
| 625 | /* Fallback loop breaker. */ | 663 | /* Fallback loop breaker. */ |
| 626 | if (time_after(jiffies, now)) | 664 | if (time_after(jiffies, now)) |
| 627 | break; | 665 | break; |
| 628 | } | 666 | } |
| 629 | rover = i; | 667 | rover = i; |
| 630 | mod_timer(&rt_periodic_timer, now + ip_rt_gc_interval); | 668 | mod_timer(&rt_periodic_timer, jiffies + ip_rt_gc_interval); |
| 631 | } | 669 | } |
| 632 | 670 | ||
| 633 | /* This can run from both BH and non-BH contexts, the latter | 671 | /* This can run from both BH and non-BH contexts, the latter |
| @@ -643,11 +681,11 @@ static void rt_run_flush(unsigned long dummy) | |||
| 643 | get_random_bytes(&rt_hash_rnd, 4); | 681 | get_random_bytes(&rt_hash_rnd, 4); |
| 644 | 682 | ||
| 645 | for (i = rt_hash_mask; i >= 0; i--) { | 683 | for (i = rt_hash_mask; i >= 0; i--) { |
| 646 | spin_lock_bh(&rt_hash_table[i].lock); | 684 | spin_lock_bh(rt_hash_lock_addr(i)); |
| 647 | rth = rt_hash_table[i].chain; | 685 | rth = rt_hash_table[i].chain; |
| 648 | if (rth) | 686 | if (rth) |
| 649 | rt_hash_table[i].chain = NULL; | 687 | rt_hash_table[i].chain = NULL; |
| 650 | spin_unlock_bh(&rt_hash_table[i].lock); | 688 | spin_unlock_bh(rt_hash_lock_addr(i)); |
| 651 | 689 | ||
| 652 | for (; rth; rth = next) { | 690 | for (; rth; rth = next) { |
| 653 | next = rth->u.rt_next; | 691 | next = rth->u.rt_next; |
| @@ -780,7 +818,7 @@ static int rt_garbage_collect(void) | |||
| 780 | 818 | ||
| 781 | k = (k + 1) & rt_hash_mask; | 819 | k = (k + 1) & rt_hash_mask; |
| 782 | rthp = &rt_hash_table[k].chain; | 820 | rthp = &rt_hash_table[k].chain; |
| 783 | spin_lock_bh(&rt_hash_table[k].lock); | 821 | spin_lock_bh(rt_hash_lock_addr(k)); |
| 784 | while ((rth = *rthp) != NULL) { | 822 | while ((rth = *rthp) != NULL) { |
| 785 | if (!rt_may_expire(rth, tmo, expire)) { | 823 | if (!rt_may_expire(rth, tmo, expire)) { |
| 786 | tmo >>= 1; | 824 | tmo >>= 1; |
| @@ -812,7 +850,7 @@ static int rt_garbage_collect(void) | |||
| 812 | goal--; | 850 | goal--; |
| 813 | #endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ | 851 | #endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */ |
| 814 | } | 852 | } |
| 815 | spin_unlock_bh(&rt_hash_table[k].lock); | 853 | spin_unlock_bh(rt_hash_lock_addr(k)); |
| 816 | if (goal <= 0) | 854 | if (goal <= 0) |
| 817 | break; | 855 | break; |
| 818 | } | 856 | } |
| @@ -882,7 +920,7 @@ restart: | |||
| 882 | 920 | ||
| 883 | rthp = &rt_hash_table[hash].chain; | 921 | rthp = &rt_hash_table[hash].chain; |
| 884 | 922 | ||
| 885 | spin_lock_bh(&rt_hash_table[hash].lock); | 923 | spin_lock_bh(rt_hash_lock_addr(hash)); |
| 886 | while ((rth = *rthp) != NULL) { | 924 | while ((rth = *rthp) != NULL) { |
| 887 | #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED | 925 | #ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED |
| 888 | if (!(rth->u.dst.flags & DST_BALANCED) && | 926 | if (!(rth->u.dst.flags & DST_BALANCED) && |
| @@ -908,7 +946,7 @@ restart: | |||
| 908 | rth->u.dst.__use++; | 946 | rth->u.dst.__use++; |
| 909 | dst_hold(&rth->u.dst); | 947 | dst_hold(&rth->u.dst); |
| 910 | rth->u.dst.lastuse = now; | 948 | rth->u.dst.lastuse = now; |
| 911 | spin_unlock_bh(&rt_hash_table[hash].lock); | 949 | spin_unlock_bh(rt_hash_lock_addr(hash)); |
| 912 | 950 | ||
| 913 | rt_drop(rt); | 951 | rt_drop(rt); |
| 914 | *rp = rth; | 952 | *rp = rth; |
| @@ -949,7 +987,7 @@ restart: | |||
| 949 | if (rt->rt_type == RTN_UNICAST || rt->fl.iif == 0) { | 987 | if (rt->rt_type == RTN_UNICAST || rt->fl.iif == 0) { |
| 950 | int err = arp_bind_neighbour(&rt->u.dst); | 988 | int err = arp_bind_neighbour(&rt->u.dst); |
| 951 | if (err) { | 989 | if (err) { |
| 952 | spin_unlock_bh(&rt_hash_table[hash].lock); | 990 | spin_unlock_bh(rt_hash_lock_addr(hash)); |
| 953 | 991 | ||
| 954 | if (err != -ENOBUFS) { | 992 | if (err != -ENOBUFS) { |
| 955 | rt_drop(rt); | 993 | rt_drop(rt); |
| @@ -990,7 +1028,7 @@ restart: | |||
| 990 | } | 1028 | } |
| 991 | #endif | 1029 | #endif |
| 992 | rt_hash_table[hash].chain = rt; | 1030 | rt_hash_table[hash].chain = rt; |
| 993 | spin_unlock_bh(&rt_hash_table[hash].lock); | 1031 | spin_unlock_bh(rt_hash_lock_addr(hash)); |
| 994 | *rp = rt; | 1032 | *rp = rt; |
| 995 | return 0; | 1033 | return 0; |
| 996 | } | 1034 | } |
| @@ -1058,7 +1096,7 @@ static void rt_del(unsigned hash, struct rtable *rt) | |||
| 1058 | { | 1096 | { |
| 1059 | struct rtable **rthp; | 1097 | struct rtable **rthp; |
| 1060 | 1098 | ||
| 1061 | spin_lock_bh(&rt_hash_table[hash].lock); | 1099 | spin_lock_bh(rt_hash_lock_addr(hash)); |
| 1062 | ip_rt_put(rt); | 1100 | ip_rt_put(rt); |
| 1063 | for (rthp = &rt_hash_table[hash].chain; *rthp; | 1101 | for (rthp = &rt_hash_table[hash].chain; *rthp; |
| 1064 | rthp = &(*rthp)->u.rt_next) | 1102 | rthp = &(*rthp)->u.rt_next) |
| @@ -1067,7 +1105,7 @@ static void rt_del(unsigned hash, struct rtable *rt) | |||
| 1067 | rt_free(rt); | 1105 | rt_free(rt); |
| 1068 | break; | 1106 | break; |
| 1069 | } | 1107 | } |
| 1070 | spin_unlock_bh(&rt_hash_table[hash].lock); | 1108 | spin_unlock_bh(rt_hash_lock_addr(hash)); |
| 1071 | } | 1109 | } |
| 1072 | 1110 | ||
| 1073 | void ip_rt_redirect(u32 old_gw, u32 daddr, u32 new_gw, | 1111 | void ip_rt_redirect(u32 old_gw, u32 daddr, u32 new_gw, |
| @@ -3073,12 +3111,14 @@ __setup("rhash_entries=", set_rhash_entries); | |||
| 3073 | 3111 | ||
| 3074 | int __init ip_rt_init(void) | 3112 | int __init ip_rt_init(void) |
| 3075 | { | 3113 | { |
| 3076 | int i, order, goal, rc = 0; | 3114 | int rc = 0; |
| 3077 | 3115 | ||
| 3078 | rt_hash_rnd = (int) ((num_physpages ^ (num_physpages>>8)) ^ | 3116 | rt_hash_rnd = (int) ((num_physpages ^ (num_physpages>>8)) ^ |
| 3079 | (jiffies ^ (jiffies >> 7))); | 3117 | (jiffies ^ (jiffies >> 7))); |
| 3080 | 3118 | ||
| 3081 | #ifdef CONFIG_NET_CLS_ROUTE | 3119 | #ifdef CONFIG_NET_CLS_ROUTE |
| 3120 | { | ||
| 3121 | int order; | ||
| 3082 | for (order = 0; | 3122 | for (order = 0; |
| 3083 | (PAGE_SIZE << order) < 256 * sizeof(struct ip_rt_acct) * NR_CPUS; order++) | 3123 | (PAGE_SIZE << order) < 256 * sizeof(struct ip_rt_acct) * NR_CPUS; order++) |
| 3084 | /* NOTHING */; | 3124 | /* NOTHING */; |
| @@ -3086,6 +3126,7 @@ int __init ip_rt_init(void) | |||
| 3086 | if (!ip_rt_acct) | 3126 | if (!ip_rt_acct) |
| 3087 | panic("IP: failed to allocate ip_rt_acct\n"); | 3127 | panic("IP: failed to allocate ip_rt_acct\n"); |
| 3088 | memset(ip_rt_acct, 0, PAGE_SIZE << order); | 3128 | memset(ip_rt_acct, 0, PAGE_SIZE << order); |
| 3129 | } | ||
| 3089 | #endif | 3130 | #endif |
| 3090 | 3131 | ||
| 3091 | ipv4_dst_ops.kmem_cachep = kmem_cache_create("ip_dst_cache", | 3132 | ipv4_dst_ops.kmem_cachep = kmem_cache_create("ip_dst_cache", |
| @@ -3096,36 +3137,19 @@ int __init ip_rt_init(void) | |||
| 3096 | if (!ipv4_dst_ops.kmem_cachep) | 3137 | if (!ipv4_dst_ops.kmem_cachep) |
| 3097 | panic("IP: failed to allocate ip_dst_cache\n"); | 3138 | panic("IP: failed to allocate ip_dst_cache\n"); |
| 3098 | 3139 | ||
| 3099 | goal = num_physpages >> (26 - PAGE_SHIFT); | 3140 | rt_hash_table = (struct rt_hash_bucket *) |
| 3100 | if (rhash_entries) | 3141 | alloc_large_system_hash("IP route cache", |
| 3101 | goal = (rhash_entries * sizeof(struct rt_hash_bucket)) >> PAGE_SHIFT; | 3142 | sizeof(struct rt_hash_bucket), |
| 3102 | for (order = 0; (1UL << order) < goal; order++) | 3143 | rhash_entries, |
| 3103 | /* NOTHING */; | 3144 | (num_physpages >= 128 * 1024) ? |
| 3104 | 3145 | (27 - PAGE_SHIFT) : | |
| 3105 | do { | 3146 | (29 - PAGE_SHIFT), |
| 3106 | rt_hash_mask = (1UL << order) * PAGE_SIZE / | 3147 | HASH_HIGHMEM, |
| 3107 | sizeof(struct rt_hash_bucket); | 3148 | &rt_hash_log, |
| 3108 | while (rt_hash_mask & (rt_hash_mask - 1)) | 3149 | &rt_hash_mask, |
| 3109 | rt_hash_mask--; | 3150 | 0); |
| 3110 | rt_hash_table = (struct rt_hash_bucket *) | 3151 | memset(rt_hash_table, 0, (rt_hash_mask + 1) * sizeof(struct rt_hash_bucket)); |
| 3111 | __get_free_pages(GFP_ATOMIC, order); | 3152 | rt_hash_lock_init(); |
| 3112 | } while (rt_hash_table == NULL && --order > 0); | ||
| 3113 | |||
| 3114 | if (!rt_hash_table) | ||
| 3115 | panic("Failed to allocate IP route cache hash table\n"); | ||
| 3116 | |||
| 3117 | printk(KERN_INFO "IP: routing cache hash table of %u buckets, %ldKbytes\n", | ||
| 3118 | rt_hash_mask, | ||
| 3119 | (long) (rt_hash_mask * sizeof(struct rt_hash_bucket)) / 1024); | ||
| 3120 | |||
| 3121 | for (rt_hash_log = 0; (1 << rt_hash_log) != rt_hash_mask; rt_hash_log++) | ||
| 3122 | /* NOTHING */; | ||
| 3123 | |||
| 3124 | rt_hash_mask--; | ||
| 3125 | for (i = 0; i <= rt_hash_mask; i++) { | ||
| 3126 | spin_lock_init(&rt_hash_table[i].lock); | ||
| 3127 | rt_hash_table[i].chain = NULL; | ||
| 3128 | } | ||
| 3129 | 3153 | ||
| 3130 | ipv4_dst_ops.gc_thresh = (rt_hash_mask + 1); | 3154 | ipv4_dst_ops.gc_thresh = (rt_hash_mask + 1); |
| 3131 | ip_rt_max_size = (rt_hash_mask + 1) * 16; | 3155 | ip_rt_max_size = (rt_hash_mask + 1) * 16; |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 882436da9a3a..29894c749163 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
| @@ -615,7 +615,7 @@ static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffse | |||
| 615 | size_t psize, int flags) | 615 | size_t psize, int flags) |
| 616 | { | 616 | { |
| 617 | struct tcp_sock *tp = tcp_sk(sk); | 617 | struct tcp_sock *tp = tcp_sk(sk); |
| 618 | int mss_now; | 618 | int mss_now, size_goal; |
| 619 | int err; | 619 | int err; |
| 620 | ssize_t copied; | 620 | ssize_t copied; |
| 621 | long timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); | 621 | long timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); |
| @@ -628,6 +628,7 @@ static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffse | |||
| 628 | clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); | 628 | clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); |
| 629 | 629 | ||
| 630 | mss_now = tcp_current_mss(sk, !(flags&MSG_OOB)); | 630 | mss_now = tcp_current_mss(sk, !(flags&MSG_OOB)); |
| 631 | size_goal = tp->xmit_size_goal; | ||
| 631 | copied = 0; | 632 | copied = 0; |
| 632 | 633 | ||
| 633 | err = -EPIPE; | 634 | err = -EPIPE; |
| @@ -641,7 +642,7 @@ static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffse | |||
| 641 | int offset = poffset % PAGE_SIZE; | 642 | int offset = poffset % PAGE_SIZE; |
| 642 | int size = min_t(size_t, psize, PAGE_SIZE - offset); | 643 | int size = min_t(size_t, psize, PAGE_SIZE - offset); |
| 643 | 644 | ||
| 644 | if (!sk->sk_send_head || (copy = mss_now - skb->len) <= 0) { | 645 | if (!sk->sk_send_head || (copy = size_goal - skb->len) <= 0) { |
| 645 | new_segment: | 646 | new_segment: |
| 646 | if (!sk_stream_memory_free(sk)) | 647 | if (!sk_stream_memory_free(sk)) |
| 647 | goto wait_for_sndbuf; | 648 | goto wait_for_sndbuf; |
| @@ -652,7 +653,7 @@ new_segment: | |||
| 652 | goto wait_for_memory; | 653 | goto wait_for_memory; |
| 653 | 654 | ||
| 654 | skb_entail(sk, tp, skb); | 655 | skb_entail(sk, tp, skb); |
| 655 | copy = mss_now; | 656 | copy = size_goal; |
| 656 | } | 657 | } |
| 657 | 658 | ||
| 658 | if (copy > size) | 659 | if (copy > size) |
| @@ -693,7 +694,7 @@ new_segment: | |||
| 693 | if (!(psize -= copy)) | 694 | if (!(psize -= copy)) |
| 694 | goto out; | 695 | goto out; |
| 695 | 696 | ||
| 696 | if (skb->len != mss_now || (flags & MSG_OOB)) | 697 | if (skb->len < mss_now || (flags & MSG_OOB)) |
| 697 | continue; | 698 | continue; |
| 698 | 699 | ||
| 699 | if (forced_push(tp)) { | 700 | if (forced_push(tp)) { |
| @@ -713,6 +714,7 @@ wait_for_memory: | |||
| 713 | goto do_error; | 714 | goto do_error; |
| 714 | 715 | ||
| 715 | mss_now = tcp_current_mss(sk, !(flags&MSG_OOB)); | 716 | mss_now = tcp_current_mss(sk, !(flags&MSG_OOB)); |
| 717 | size_goal = tp->xmit_size_goal; | ||
| 716 | } | 718 | } |
| 717 | 719 | ||
| 718 | out: | 720 | out: |
| @@ -754,15 +756,20 @@ ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset, | |||
| 754 | 756 | ||
| 755 | static inline int select_size(struct sock *sk, struct tcp_sock *tp) | 757 | static inline int select_size(struct sock *sk, struct tcp_sock *tp) |
| 756 | { | 758 | { |
| 757 | int tmp = tp->mss_cache_std; | 759 | int tmp = tp->mss_cache; |
| 758 | 760 | ||
| 759 | if (sk->sk_route_caps & NETIF_F_SG) { | 761 | if (sk->sk_route_caps & NETIF_F_SG) { |
| 760 | int pgbreak = SKB_MAX_HEAD(MAX_TCP_HEADER); | 762 | if (sk->sk_route_caps & NETIF_F_TSO) |
| 763 | tmp = 0; | ||
| 764 | else { | ||
| 765 | int pgbreak = SKB_MAX_HEAD(MAX_TCP_HEADER); | ||
| 761 | 766 | ||
| 762 | if (tmp >= pgbreak && | 767 | if (tmp >= pgbreak && |
| 763 | tmp <= pgbreak + (MAX_SKB_FRAGS - 1) * PAGE_SIZE) | 768 | tmp <= pgbreak + (MAX_SKB_FRAGS - 1) * PAGE_SIZE) |
| 764 | tmp = pgbreak; | 769 | tmp = pgbreak; |
| 770 | } | ||
| 765 | } | 771 | } |
| 772 | |||
| 766 | return tmp; | 773 | return tmp; |
| 767 | } | 774 | } |
| 768 | 775 | ||
| @@ -773,7 +780,7 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
| 773 | struct tcp_sock *tp = tcp_sk(sk); | 780 | struct tcp_sock *tp = tcp_sk(sk); |
| 774 | struct sk_buff *skb; | 781 | struct sk_buff *skb; |
| 775 | int iovlen, flags; | 782 | int iovlen, flags; |
| 776 | int mss_now; | 783 | int mss_now, size_goal; |
| 777 | int err, copied; | 784 | int err, copied; |
| 778 | long timeo; | 785 | long timeo; |
| 779 | 786 | ||
| @@ -792,6 +799,7 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
| 792 | clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); | 799 | clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); |
| 793 | 800 | ||
| 794 | mss_now = tcp_current_mss(sk, !(flags&MSG_OOB)); | 801 | mss_now = tcp_current_mss(sk, !(flags&MSG_OOB)); |
| 802 | size_goal = tp->xmit_size_goal; | ||
| 795 | 803 | ||
| 796 | /* Ok commence sending. */ | 804 | /* Ok commence sending. */ |
| 797 | iovlen = msg->msg_iovlen; | 805 | iovlen = msg->msg_iovlen; |
| @@ -814,7 +822,7 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
| 814 | skb = sk->sk_write_queue.prev; | 822 | skb = sk->sk_write_queue.prev; |
| 815 | 823 | ||
| 816 | if (!sk->sk_send_head || | 824 | if (!sk->sk_send_head || |
| 817 | (copy = mss_now - skb->len) <= 0) { | 825 | (copy = size_goal - skb->len) <= 0) { |
| 818 | 826 | ||
| 819 | new_segment: | 827 | new_segment: |
| 820 | /* Allocate new segment. If the interface is SG, | 828 | /* Allocate new segment. If the interface is SG, |
| @@ -837,7 +845,7 @@ new_segment: | |||
| 837 | skb->ip_summed = CHECKSUM_HW; | 845 | skb->ip_summed = CHECKSUM_HW; |
| 838 | 846 | ||
| 839 | skb_entail(sk, tp, skb); | 847 | skb_entail(sk, tp, skb); |
| 840 | copy = mss_now; | 848 | copy = size_goal; |
| 841 | } | 849 | } |
| 842 | 850 | ||
| 843 | /* Try to append data to the end of skb. */ | 851 | /* Try to append data to the end of skb. */ |
| @@ -872,11 +880,6 @@ new_segment: | |||
| 872 | tcp_mark_push(tp, skb); | 880 | tcp_mark_push(tp, skb); |
| 873 | goto new_segment; | 881 | goto new_segment; |
| 874 | } else if (page) { | 882 | } else if (page) { |
| 875 | /* If page is cached, align | ||
| 876 | * offset to L1 cache boundary | ||
| 877 | */ | ||
| 878 | off = (off + L1_CACHE_BYTES - 1) & | ||
| 879 | ~(L1_CACHE_BYTES - 1); | ||
| 880 | if (off == PAGE_SIZE) { | 883 | if (off == PAGE_SIZE) { |
| 881 | put_page(page); | 884 | put_page(page); |
| 882 | TCP_PAGE(sk) = page = NULL; | 885 | TCP_PAGE(sk) = page = NULL; |
| @@ -937,7 +940,7 @@ new_segment: | |||
| 937 | if ((seglen -= copy) == 0 && iovlen == 0) | 940 | if ((seglen -= copy) == 0 && iovlen == 0) |
| 938 | goto out; | 941 | goto out; |
| 939 | 942 | ||
| 940 | if (skb->len != mss_now || (flags & MSG_OOB)) | 943 | if (skb->len < mss_now || (flags & MSG_OOB)) |
| 941 | continue; | 944 | continue; |
| 942 | 945 | ||
| 943 | if (forced_push(tp)) { | 946 | if (forced_push(tp)) { |
| @@ -957,6 +960,7 @@ wait_for_memory: | |||
| 957 | goto do_error; | 960 | goto do_error; |
| 958 | 961 | ||
| 959 | mss_now = tcp_current_mss(sk, !(flags&MSG_OOB)); | 962 | mss_now = tcp_current_mss(sk, !(flags&MSG_OOB)); |
| 963 | size_goal = tp->xmit_size_goal; | ||
| 960 | } | 964 | } |
| 961 | } | 965 | } |
| 962 | 966 | ||
| @@ -2128,7 +2132,7 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info) | |||
| 2128 | 2132 | ||
| 2129 | info->tcpi_rto = jiffies_to_usecs(tp->rto); | 2133 | info->tcpi_rto = jiffies_to_usecs(tp->rto); |
| 2130 | info->tcpi_ato = jiffies_to_usecs(tp->ack.ato); | 2134 | info->tcpi_ato = jiffies_to_usecs(tp->ack.ato); |
| 2131 | info->tcpi_snd_mss = tp->mss_cache_std; | 2135 | info->tcpi_snd_mss = tp->mss_cache; |
| 2132 | info->tcpi_rcv_mss = tp->ack.rcv_mss; | 2136 | info->tcpi_rcv_mss = tp->ack.rcv_mss; |
| 2133 | 2137 | ||
| 2134 | info->tcpi_unacked = tp->packets_out; | 2138 | info->tcpi_unacked = tp->packets_out; |
| @@ -2178,7 +2182,7 @@ int tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, | |||
| 2178 | 2182 | ||
| 2179 | switch (optname) { | 2183 | switch (optname) { |
| 2180 | case TCP_MAXSEG: | 2184 | case TCP_MAXSEG: |
| 2181 | val = tp->mss_cache_std; | 2185 | val = tp->mss_cache; |
| 2182 | if (!val && ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN))) | 2186 | if (!val && ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_LISTEN))) |
| 2183 | val = tp->rx_opt.user_mss; | 2187 | val = tp->rx_opt.user_mss; |
| 2184 | break; | 2188 | break; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7bbbbc33eb4b..8de2f1071c2b 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
| @@ -740,10 +740,10 @@ __u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst) | |||
| 740 | __u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0); | 740 | __u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0); |
| 741 | 741 | ||
| 742 | if (!cwnd) { | 742 | if (!cwnd) { |
| 743 | if (tp->mss_cache_std > 1460) | 743 | if (tp->mss_cache > 1460) |
| 744 | cwnd = 2; | 744 | cwnd = 2; |
| 745 | else | 745 | else |
| 746 | cwnd = (tp->mss_cache_std > 1095) ? 3 : 4; | 746 | cwnd = (tp->mss_cache > 1095) ? 3 : 4; |
| 747 | } | 747 | } |
| 748 | return min_t(__u32, cwnd, tp->snd_cwnd_clamp); | 748 | return min_t(__u32, cwnd, tp->snd_cwnd_clamp); |
| 749 | } | 749 | } |
| @@ -914,7 +914,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
| 914 | if (sk->sk_route_caps & NETIF_F_TSO) { | 914 | if (sk->sk_route_caps & NETIF_F_TSO) { |
| 915 | sk->sk_route_caps &= ~NETIF_F_TSO; | 915 | sk->sk_route_caps &= ~NETIF_F_TSO; |
| 916 | sock_set_flag(sk, SOCK_NO_LARGESEND); | 916 | sock_set_flag(sk, SOCK_NO_LARGESEND); |
| 917 | tp->mss_cache = tp->mss_cache_std; | 917 | tp->mss_cache = tp->mss_cache; |
| 918 | } | 918 | } |
| 919 | 919 | ||
| 920 | if (!tp->sacked_out) | 920 | if (!tp->sacked_out) |
| @@ -1077,7 +1077,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
| 1077 | (IsFack(tp) || | 1077 | (IsFack(tp) || |
| 1078 | !before(lost_retrans, | 1078 | !before(lost_retrans, |
| 1079 | TCP_SKB_CB(skb)->ack_seq + tp->reordering * | 1079 | TCP_SKB_CB(skb)->ack_seq + tp->reordering * |
| 1080 | tp->mss_cache_std))) { | 1080 | tp->mss_cache))) { |
| 1081 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_RETRANS; | 1081 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_RETRANS; |
| 1082 | tp->retrans_out -= tcp_skb_pcount(skb); | 1082 | tp->retrans_out -= tcp_skb_pcount(skb); |
| 1083 | 1083 | ||
| @@ -1957,15 +1957,6 @@ static inline void tcp_ack_packets_out(struct sock *sk, struct tcp_sock *tp) | |||
| 1957 | } | 1957 | } |
| 1958 | } | 1958 | } |
| 1959 | 1959 | ||
| 1960 | /* There is one downside to this scheme. Although we keep the | ||
| 1961 | * ACK clock ticking, adjusting packet counters and advancing | ||
| 1962 | * congestion window, we do not liberate socket send buffer | ||
| 1963 | * space. | ||
| 1964 | * | ||
| 1965 | * Mucking with skb->truesize and sk->sk_wmem_alloc et al. | ||
| 1966 | * then making a write space wakeup callback is a possible | ||
| 1967 | * future enhancement. WARNING: it is not trivial to make. | ||
| 1968 | */ | ||
| 1969 | static int tcp_tso_acked(struct sock *sk, struct sk_buff *skb, | 1960 | static int tcp_tso_acked(struct sock *sk, struct sk_buff *skb, |
| 1970 | __u32 now, __s32 *seq_rtt) | 1961 | __u32 now, __s32 *seq_rtt) |
| 1971 | { | 1962 | { |
| @@ -2047,7 +2038,8 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p, s32 *seq_usrtt | |||
| 2047 | * the other end. | 2038 | * the other end. |
| 2048 | */ | 2039 | */ |
| 2049 | if (after(scb->end_seq, tp->snd_una)) { | 2040 | if (after(scb->end_seq, tp->snd_una)) { |
| 2050 | if (tcp_skb_pcount(skb) > 1) | 2041 | if (tcp_skb_pcount(skb) > 1 && |
| 2042 | after(tp->snd_una, scb->seq)) | ||
| 2051 | acked |= tcp_tso_acked(sk, skb, | 2043 | acked |= tcp_tso_acked(sk, skb, |
| 2052 | now, &seq_rtt); | 2044 | now, &seq_rtt); |
| 2053 | break; | 2045 | break; |
| @@ -3308,6 +3300,28 @@ void tcp_cwnd_application_limited(struct sock *sk) | |||
| 3308 | tp->snd_cwnd_stamp = tcp_time_stamp; | 3300 | tp->snd_cwnd_stamp = tcp_time_stamp; |
| 3309 | } | 3301 | } |
| 3310 | 3302 | ||
| 3303 | static inline int tcp_should_expand_sndbuf(struct sock *sk, struct tcp_sock *tp) | ||
| 3304 | { | ||
| 3305 | /* If the user specified a specific send buffer setting, do | ||
| 3306 | * not modify it. | ||
| 3307 | */ | ||
| 3308 | if (sk->sk_userlocks & SOCK_SNDBUF_LOCK) | ||
| 3309 | return 0; | ||
| 3310 | |||
| 3311 | /* If we are under global TCP memory pressure, do not expand. */ | ||
| 3312 | if (tcp_memory_pressure) | ||
| 3313 | return 0; | ||
| 3314 | |||
| 3315 | /* If we are under soft global TCP memory pressure, do not expand. */ | ||
| 3316 | if (atomic_read(&tcp_memory_allocated) >= sysctl_tcp_mem[0]) | ||
| 3317 | return 0; | ||
| 3318 | |||
| 3319 | /* If we filled the congestion window, do not expand. */ | ||
| 3320 | if (tp->packets_out >= tp->snd_cwnd) | ||
| 3321 | return 0; | ||
| 3322 | |||
| 3323 | return 1; | ||
| 3324 | } | ||
| 3311 | 3325 | ||
| 3312 | /* When incoming ACK allowed to free some skb from write_queue, | 3326 | /* When incoming ACK allowed to free some skb from write_queue, |
| 3313 | * we remember this event in flag SOCK_QUEUE_SHRUNK and wake up socket | 3327 | * we remember this event in flag SOCK_QUEUE_SHRUNK and wake up socket |
| @@ -3319,11 +3333,8 @@ static void tcp_new_space(struct sock *sk) | |||
| 3319 | { | 3333 | { |
| 3320 | struct tcp_sock *tp = tcp_sk(sk); | 3334 | struct tcp_sock *tp = tcp_sk(sk); |
| 3321 | 3335 | ||
| 3322 | if (tp->packets_out < tp->snd_cwnd && | 3336 | if (tcp_should_expand_sndbuf(sk, tp)) { |
| 3323 | !(sk->sk_userlocks & SOCK_SNDBUF_LOCK) && | 3337 | int sndmem = max_t(u32, tp->rx_opt.mss_clamp, tp->mss_cache) + |
| 3324 | !tcp_memory_pressure && | ||
| 3325 | atomic_read(&tcp_memory_allocated) < sysctl_tcp_mem[0]) { | ||
| 3326 | int sndmem = max_t(u32, tp->rx_opt.mss_clamp, tp->mss_cache_std) + | ||
| 3327 | MAX_TCP_HEADER + 16 + sizeof(struct sk_buff), | 3338 | MAX_TCP_HEADER + 16 + sizeof(struct sk_buff), |
| 3328 | demanded = max_t(unsigned int, tp->snd_cwnd, | 3339 | demanded = max_t(unsigned int, tp->snd_cwnd, |
| 3329 | tp->reordering + 1); | 3340 | tp->reordering + 1); |
| @@ -3346,22 +3357,9 @@ static inline void tcp_check_space(struct sock *sk) | |||
| 3346 | } | 3357 | } |
| 3347 | } | 3358 | } |
| 3348 | 3359 | ||
| 3349 | static void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb) | 3360 | static __inline__ void tcp_data_snd_check(struct sock *sk, struct tcp_sock *tp) |
| 3350 | { | ||
| 3351 | struct tcp_sock *tp = tcp_sk(sk); | ||
| 3352 | |||
| 3353 | if (after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd) || | ||
| 3354 | tcp_packets_in_flight(tp) >= tp->snd_cwnd || | ||
| 3355 | tcp_write_xmit(sk, tp->nonagle)) | ||
| 3356 | tcp_check_probe_timer(sk, tp); | ||
| 3357 | } | ||
| 3358 | |||
| 3359 | static __inline__ void tcp_data_snd_check(struct sock *sk) | ||
| 3360 | { | 3361 | { |
| 3361 | struct sk_buff *skb = sk->sk_send_head; | 3362 | tcp_push_pending_frames(sk, tp); |
| 3362 | |||
| 3363 | if (skb != NULL) | ||
| 3364 | __tcp_data_snd_check(sk, skb); | ||
| 3365 | tcp_check_space(sk); | 3363 | tcp_check_space(sk); |
| 3366 | } | 3364 | } |
| 3367 | 3365 | ||
| @@ -3655,7 +3653,7 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, | |||
| 3655 | */ | 3653 | */ |
| 3656 | tcp_ack(sk, skb, 0); | 3654 | tcp_ack(sk, skb, 0); |
| 3657 | __kfree_skb(skb); | 3655 | __kfree_skb(skb); |
| 3658 | tcp_data_snd_check(sk); | 3656 | tcp_data_snd_check(sk, tp); |
| 3659 | return 0; | 3657 | return 0; |
| 3660 | } else { /* Header too small */ | 3658 | } else { /* Header too small */ |
| 3661 | TCP_INC_STATS_BH(TCP_MIB_INERRS); | 3659 | TCP_INC_STATS_BH(TCP_MIB_INERRS); |
| @@ -3721,7 +3719,7 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, | |||
| 3721 | if (TCP_SKB_CB(skb)->ack_seq != tp->snd_una) { | 3719 | if (TCP_SKB_CB(skb)->ack_seq != tp->snd_una) { |
| 3722 | /* Well, only one small jumplet in fast path... */ | 3720 | /* Well, only one small jumplet in fast path... */ |
| 3723 | tcp_ack(sk, skb, FLAG_DATA); | 3721 | tcp_ack(sk, skb, FLAG_DATA); |
| 3724 | tcp_data_snd_check(sk); | 3722 | tcp_data_snd_check(sk, tp); |
| 3725 | if (!tcp_ack_scheduled(tp)) | 3723 | if (!tcp_ack_scheduled(tp)) |
| 3726 | goto no_ack; | 3724 | goto no_ack; |
| 3727 | } | 3725 | } |
| @@ -3799,7 +3797,7 @@ step5: | |||
| 3799 | /* step 7: process the segment text */ | 3797 | /* step 7: process the segment text */ |
| 3800 | tcp_data_queue(sk, skb); | 3798 | tcp_data_queue(sk, skb); |
| 3801 | 3799 | ||
| 3802 | tcp_data_snd_check(sk); | 3800 | tcp_data_snd_check(sk, tp); |
| 3803 | tcp_ack_snd_check(sk); | 3801 | tcp_ack_snd_check(sk); |
| 3804 | return 0; | 3802 | return 0; |
| 3805 | 3803 | ||
| @@ -4109,7 +4107,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
| 4109 | /* Do step6 onward by hand. */ | 4107 | /* Do step6 onward by hand. */ |
| 4110 | tcp_urg(sk, skb, th); | 4108 | tcp_urg(sk, skb, th); |
| 4111 | __kfree_skb(skb); | 4109 | __kfree_skb(skb); |
| 4112 | tcp_data_snd_check(sk); | 4110 | tcp_data_snd_check(sk, tp); |
| 4113 | return 0; | 4111 | return 0; |
| 4114 | } | 4112 | } |
| 4115 | 4113 | ||
| @@ -4300,7 +4298,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
| 4300 | 4298 | ||
| 4301 | /* tcp_data could move socket to TIME-WAIT */ | 4299 | /* tcp_data could move socket to TIME-WAIT */ |
| 4302 | if (sk->sk_state != TCP_CLOSE) { | 4300 | if (sk->sk_state != TCP_CLOSE) { |
| 4303 | tcp_data_snd_check(sk); | 4301 | tcp_data_snd_check(sk, tp); |
| 4304 | tcp_ack_snd_check(sk); | 4302 | tcp_ack_snd_check(sk); |
| 4305 | } | 4303 | } |
| 4306 | 4304 | ||
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index ebf112347a97..62f62bb05c2a 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
| @@ -2045,7 +2045,7 @@ static int tcp_v4_init_sock(struct sock *sk) | |||
| 2045 | */ | 2045 | */ |
| 2046 | tp->snd_ssthresh = 0x7fffffff; /* Infinity */ | 2046 | tp->snd_ssthresh = 0x7fffffff; /* Infinity */ |
| 2047 | tp->snd_cwnd_clamp = ~0; | 2047 | tp->snd_cwnd_clamp = ~0; |
| 2048 | tp->mss_cache_std = tp->mss_cache = 536; | 2048 | tp->mss_cache = 536; |
| 2049 | 2049 | ||
| 2050 | tp->reordering = sysctl_tcp_reordering; | 2050 | tp->reordering = sysctl_tcp_reordering; |
| 2051 | tp->ca_ops = &tcp_init_congestion_ops; | 2051 | tp->ca_ops = &tcp_init_congestion_ops; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 0e17c244875c..e041d057ec86 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
| @@ -49,7 +49,7 @@ int sysctl_tcp_retrans_collapse = 1; | |||
| 49 | * will allow a single TSO frame to consume. Building TSO frames | 49 | * will allow a single TSO frame to consume. Building TSO frames |
| 50 | * which are too large can cause TCP streams to be bursty. | 50 | * which are too large can cause TCP streams to be bursty. |
| 51 | */ | 51 | */ |
| 52 | int sysctl_tcp_tso_win_divisor = 8; | 52 | int sysctl_tcp_tso_win_divisor = 3; |
| 53 | 53 | ||
| 54 | static inline void update_send_head(struct sock *sk, struct tcp_sock *tp, | 54 | static inline void update_send_head(struct sock *sk, struct tcp_sock *tp, |
| 55 | struct sk_buff *skb) | 55 | struct sk_buff *skb) |
| @@ -140,11 +140,11 @@ static inline void tcp_event_data_sent(struct tcp_sock *tp, | |||
| 140 | tp->ack.pingpong = 1; | 140 | tp->ack.pingpong = 1; |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | static __inline__ void tcp_event_ack_sent(struct sock *sk) | 143 | static __inline__ void tcp_event_ack_sent(struct sock *sk, unsigned int pkts) |
| 144 | { | 144 | { |
| 145 | struct tcp_sock *tp = tcp_sk(sk); | 145 | struct tcp_sock *tp = tcp_sk(sk); |
| 146 | 146 | ||
| 147 | tcp_dec_quickack_mode(tp); | 147 | tcp_dec_quickack_mode(tp, pkts); |
| 148 | tcp_clear_xmit_timer(sk, TCP_TIME_DACK); | 148 | tcp_clear_xmit_timer(sk, TCP_TIME_DACK); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| @@ -355,7 +355,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb) | |||
| 355 | tp->af_specific->send_check(sk, th, skb->len, skb); | 355 | tp->af_specific->send_check(sk, th, skb->len, skb); |
| 356 | 356 | ||
| 357 | if (tcb->flags & TCPCB_FLAG_ACK) | 357 | if (tcb->flags & TCPCB_FLAG_ACK) |
| 358 | tcp_event_ack_sent(sk); | 358 | tcp_event_ack_sent(sk, tcp_skb_pcount(skb)); |
| 359 | 359 | ||
| 360 | if (skb->len != tcp_header_size) | 360 | if (skb->len != tcp_header_size) |
| 361 | tcp_event_data_sent(tp, skb, sk); | 361 | tcp_event_data_sent(tp, skb, sk); |
| @@ -403,42 +403,11 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb) | |||
| 403 | sk->sk_send_head = skb; | 403 | sk->sk_send_head = skb; |
| 404 | } | 404 | } |
| 405 | 405 | ||
| 406 | static inline void tcp_tso_set_push(struct sk_buff *skb) | 406 | static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb) |
| 407 | { | ||
| 408 | /* Force push to be on for any TSO frames to workaround | ||
| 409 | * problems with busted implementations like Mac OS-X that | ||
| 410 | * hold off socket receive wakeups until push is seen. | ||
| 411 | */ | ||
| 412 | if (tcp_skb_pcount(skb) > 1) | ||
| 413 | TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH; | ||
| 414 | } | ||
| 415 | |||
| 416 | /* Send _single_ skb sitting at the send head. This function requires | ||
| 417 | * true push pending frames to setup probe timer etc. | ||
| 418 | */ | ||
| 419 | void tcp_push_one(struct sock *sk, unsigned cur_mss) | ||
| 420 | { | 407 | { |
| 421 | struct tcp_sock *tp = tcp_sk(sk); | 408 | struct tcp_sock *tp = tcp_sk(sk); |
| 422 | struct sk_buff *skb = sk->sk_send_head; | ||
| 423 | 409 | ||
| 424 | if (tcp_snd_test(sk, skb, cur_mss, TCP_NAGLE_PUSH)) { | 410 | if (skb->len <= tp->mss_cache || |
| 425 | /* Send it out now. */ | ||
| 426 | TCP_SKB_CB(skb)->when = tcp_time_stamp; | ||
| 427 | tcp_tso_set_push(skb); | ||
| 428 | if (!tcp_transmit_skb(sk, skb_clone(skb, sk->sk_allocation))) { | ||
| 429 | sk->sk_send_head = NULL; | ||
| 430 | tp->snd_nxt = TCP_SKB_CB(skb)->end_seq; | ||
| 431 | tcp_packets_out_inc(sk, tp, skb); | ||
| 432 | return; | ||
| 433 | } | ||
| 434 | } | ||
| 435 | } | ||
| 436 | |||
| 437 | void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb) | ||
| 438 | { | ||
| 439 | struct tcp_sock *tp = tcp_sk(sk); | ||
| 440 | |||
| 441 | if (skb->len <= tp->mss_cache_std || | ||
| 442 | !(sk->sk_route_caps & NETIF_F_TSO)) { | 411 | !(sk->sk_route_caps & NETIF_F_TSO)) { |
| 443 | /* Avoid the costly divide in the normal | 412 | /* Avoid the costly divide in the normal |
| 444 | * non-TSO case. | 413 | * non-TSO case. |
| @@ -448,10 +417,10 @@ void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb) | |||
| 448 | } else { | 417 | } else { |
| 449 | unsigned int factor; | 418 | unsigned int factor; |
| 450 | 419 | ||
| 451 | factor = skb->len + (tp->mss_cache_std - 1); | 420 | factor = skb->len + (tp->mss_cache - 1); |
| 452 | factor /= tp->mss_cache_std; | 421 | factor /= tp->mss_cache; |
| 453 | skb_shinfo(skb)->tso_segs = factor; | 422 | skb_shinfo(skb)->tso_segs = factor; |
| 454 | skb_shinfo(skb)->tso_size = tp->mss_cache_std; | 423 | skb_shinfo(skb)->tso_size = tp->mss_cache; |
| 455 | } | 424 | } |
| 456 | } | 425 | } |
| 457 | 426 | ||
| @@ -537,6 +506,7 @@ static int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len) | |||
| 537 | } | 506 | } |
| 538 | 507 | ||
| 539 | /* Link BUFF into the send queue. */ | 508 | /* Link BUFF into the send queue. */ |
| 509 | skb_header_release(buff); | ||
| 540 | __skb_append(skb, buff); | 510 | __skb_append(skb, buff); |
| 541 | 511 | ||
| 542 | return 0; | 512 | return 0; |
| @@ -657,7 +627,7 @@ unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu) | |||
| 657 | 627 | ||
| 658 | /* And store cached results */ | 628 | /* And store cached results */ |
| 659 | tp->pmtu_cookie = pmtu; | 629 | tp->pmtu_cookie = pmtu; |
| 660 | tp->mss_cache = tp->mss_cache_std = mss_now; | 630 | tp->mss_cache = mss_now; |
| 661 | 631 | ||
| 662 | return mss_now; | 632 | return mss_now; |
| 663 | } | 633 | } |
| @@ -669,57 +639,316 @@ unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu) | |||
| 669 | * cannot be large. However, taking into account rare use of URG, this | 639 | * cannot be large. However, taking into account rare use of URG, this |
| 670 | * is not a big flaw. | 640 | * is not a big flaw. |
| 671 | */ | 641 | */ |
| 672 | 642 | unsigned int tcp_current_mss(struct sock *sk, int large_allowed) | |
| 673 | unsigned int tcp_current_mss(struct sock *sk, int large) | ||
| 674 | { | 643 | { |
| 675 | struct tcp_sock *tp = tcp_sk(sk); | 644 | struct tcp_sock *tp = tcp_sk(sk); |
| 676 | struct dst_entry *dst = __sk_dst_get(sk); | 645 | struct dst_entry *dst = __sk_dst_get(sk); |
| 677 | unsigned int do_large, mss_now; | 646 | u32 mss_now; |
| 647 | u16 xmit_size_goal; | ||
| 648 | int doing_tso = 0; | ||
| 649 | |||
| 650 | mss_now = tp->mss_cache; | ||
| 651 | |||
| 652 | if (large_allowed && | ||
| 653 | (sk->sk_route_caps & NETIF_F_TSO) && | ||
| 654 | !tp->urg_mode) | ||
| 655 | doing_tso = 1; | ||
| 678 | 656 | ||
| 679 | mss_now = tp->mss_cache_std; | ||
| 680 | if (dst) { | 657 | if (dst) { |
| 681 | u32 mtu = dst_mtu(dst); | 658 | u32 mtu = dst_mtu(dst); |
| 682 | if (mtu != tp->pmtu_cookie) | 659 | if (mtu != tp->pmtu_cookie) |
| 683 | mss_now = tcp_sync_mss(sk, mtu); | 660 | mss_now = tcp_sync_mss(sk, mtu); |
| 684 | } | 661 | } |
| 685 | 662 | ||
| 686 | do_large = (large && | 663 | if (tp->rx_opt.eff_sacks) |
| 687 | (sk->sk_route_caps & NETIF_F_TSO) && | 664 | mss_now -= (TCPOLEN_SACK_BASE_ALIGNED + |
| 688 | !tp->urg_mode); | 665 | (tp->rx_opt.eff_sacks * TCPOLEN_SACK_PERBLOCK)); |
| 689 | 666 | ||
| 690 | if (do_large) { | 667 | xmit_size_goal = mss_now; |
| 691 | unsigned int large_mss, factor, limit; | ||
| 692 | 668 | ||
| 693 | large_mss = 65535 - tp->af_specific->net_header_len - | 669 | if (doing_tso) { |
| 670 | xmit_size_goal = 65535 - | ||
| 671 | tp->af_specific->net_header_len - | ||
| 694 | tp->ext_header_len - tp->tcp_header_len; | 672 | tp->ext_header_len - tp->tcp_header_len; |
| 695 | 673 | ||
| 696 | if (tp->max_window && large_mss > (tp->max_window>>1)) | 674 | if (tp->max_window && |
| 697 | large_mss = max((tp->max_window>>1), | 675 | (xmit_size_goal > (tp->max_window >> 1))) |
| 698 | 68U - tp->tcp_header_len); | 676 | xmit_size_goal = max((tp->max_window >> 1), |
| 677 | 68U - tp->tcp_header_len); | ||
| 678 | |||
| 679 | xmit_size_goal -= (xmit_size_goal % mss_now); | ||
| 680 | } | ||
| 681 | tp->xmit_size_goal = xmit_size_goal; | ||
| 699 | 682 | ||
| 700 | factor = large_mss / mss_now; | 683 | return mss_now; |
| 684 | } | ||
| 701 | 685 | ||
| 702 | /* Always keep large mss multiple of real mss, but | 686 | /* Congestion window validation. (RFC2861) */ |
| 703 | * do not exceed 1/tso_win_divisor of the congestion window | ||
| 704 | * so we can keep the ACK clock ticking and minimize | ||
| 705 | * bursting. | ||
| 706 | */ | ||
| 707 | limit = tp->snd_cwnd; | ||
| 708 | if (sysctl_tcp_tso_win_divisor) | ||
| 709 | limit /= sysctl_tcp_tso_win_divisor; | ||
| 710 | limit = max(1U, limit); | ||
| 711 | if (factor > limit) | ||
| 712 | factor = limit; | ||
| 713 | 687 | ||
| 714 | tp->mss_cache = mss_now * factor; | 688 | static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp) |
| 689 | { | ||
| 690 | __u32 packets_out = tp->packets_out; | ||
| 691 | |||
| 692 | if (packets_out >= tp->snd_cwnd) { | ||
| 693 | /* Network is feed fully. */ | ||
| 694 | tp->snd_cwnd_used = 0; | ||
| 695 | tp->snd_cwnd_stamp = tcp_time_stamp; | ||
| 696 | } else { | ||
| 697 | /* Network starves. */ | ||
| 698 | if (tp->packets_out > tp->snd_cwnd_used) | ||
| 699 | tp->snd_cwnd_used = tp->packets_out; | ||
| 715 | 700 | ||
| 716 | mss_now = tp->mss_cache; | 701 | if ((s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= tp->rto) |
| 702 | tcp_cwnd_application_limited(sk); | ||
| 717 | } | 703 | } |
| 704 | } | ||
| 718 | 705 | ||
| 719 | if (tp->rx_opt.eff_sacks) | 706 | static unsigned int tcp_window_allows(struct tcp_sock *tp, struct sk_buff *skb, unsigned int mss_now, unsigned int cwnd) |
| 720 | mss_now -= (TCPOLEN_SACK_BASE_ALIGNED + | 707 | { |
| 721 | (tp->rx_opt.eff_sacks * TCPOLEN_SACK_PERBLOCK)); | 708 | u32 window, cwnd_len; |
| 722 | return mss_now; | 709 | |
| 710 | window = (tp->snd_una + tp->snd_wnd - TCP_SKB_CB(skb)->seq); | ||
| 711 | cwnd_len = mss_now * cwnd; | ||
| 712 | return min(window, cwnd_len); | ||
| 713 | } | ||
| 714 | |||
| 715 | /* Can at least one segment of SKB be sent right now, according to the | ||
| 716 | * congestion window rules? If so, return how many segments are allowed. | ||
| 717 | */ | ||
| 718 | static inline unsigned int tcp_cwnd_test(struct tcp_sock *tp, struct sk_buff *skb) | ||
| 719 | { | ||
| 720 | u32 in_flight, cwnd; | ||
| 721 | |||
| 722 | /* Don't be strict about the congestion window for the final FIN. */ | ||
| 723 | if (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) | ||
| 724 | return 1; | ||
| 725 | |||
| 726 | in_flight = tcp_packets_in_flight(tp); | ||
| 727 | cwnd = tp->snd_cwnd; | ||
| 728 | if (in_flight < cwnd) | ||
| 729 | return (cwnd - in_flight); | ||
| 730 | |||
| 731 | return 0; | ||
| 732 | } | ||
| 733 | |||
| 734 | /* This must be invoked the first time we consider transmitting | ||
| 735 | * SKB onto the wire. | ||
| 736 | */ | ||
| 737 | static inline int tcp_init_tso_segs(struct sock *sk, struct sk_buff *skb) | ||
| 738 | { | ||
| 739 | int tso_segs = tcp_skb_pcount(skb); | ||
| 740 | |||
| 741 | if (!tso_segs) { | ||
| 742 | tcp_set_skb_tso_segs(sk, skb); | ||
| 743 | tso_segs = tcp_skb_pcount(skb); | ||
| 744 | } | ||
| 745 | return tso_segs; | ||
| 746 | } | ||
| 747 | |||
| 748 | static inline int tcp_minshall_check(const struct tcp_sock *tp) | ||
| 749 | { | ||
| 750 | return after(tp->snd_sml,tp->snd_una) && | ||
| 751 | !after(tp->snd_sml, tp->snd_nxt); | ||
| 752 | } | ||
| 753 | |||
| 754 | /* Return 0, if packet can be sent now without violation Nagle's rules: | ||
| 755 | * 1. It is full sized. | ||
| 756 | * 2. Or it contains FIN. (already checked by caller) | ||
| 757 | * 3. Or TCP_NODELAY was set. | ||
| 758 | * 4. Or TCP_CORK is not set, and all sent packets are ACKed. | ||
| 759 | * With Minshall's modification: all sent small packets are ACKed. | ||
| 760 | */ | ||
| 761 | |||
| 762 | static inline int tcp_nagle_check(const struct tcp_sock *tp, | ||
| 763 | const struct sk_buff *skb, | ||
| 764 | unsigned mss_now, int nonagle) | ||
| 765 | { | ||
| 766 | return (skb->len < mss_now && | ||
| 767 | ((nonagle&TCP_NAGLE_CORK) || | ||
| 768 | (!nonagle && | ||
| 769 | tp->packets_out && | ||
| 770 | tcp_minshall_check(tp)))); | ||
| 771 | } | ||
| 772 | |||
| 773 | /* Return non-zero if the Nagle test allows this packet to be | ||
| 774 | * sent now. | ||
| 775 | */ | ||
| 776 | static inline int tcp_nagle_test(struct tcp_sock *tp, struct sk_buff *skb, | ||
| 777 | unsigned int cur_mss, int nonagle) | ||
| 778 | { | ||
| 779 | /* Nagle rule does not apply to frames, which sit in the middle of the | ||
| 780 | * write_queue (they have no chances to get new data). | ||
| 781 | * | ||
| 782 | * This is implemented in the callers, where they modify the 'nonagle' | ||
| 783 | * argument based upon the location of SKB in the send queue. | ||
| 784 | */ | ||
| 785 | if (nonagle & TCP_NAGLE_PUSH) | ||
| 786 | return 1; | ||
| 787 | |||
| 788 | /* Don't use the nagle rule for urgent data (or for the final FIN). */ | ||
| 789 | if (tp->urg_mode || | ||
| 790 | (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN)) | ||
| 791 | return 1; | ||
| 792 | |||
| 793 | if (!tcp_nagle_check(tp, skb, cur_mss, nonagle)) | ||
| 794 | return 1; | ||
| 795 | |||
| 796 | return 0; | ||
| 797 | } | ||
| 798 | |||
| 799 | /* Does at least the first segment of SKB fit into the send window? */ | ||
| 800 | static inline int tcp_snd_wnd_test(struct tcp_sock *tp, struct sk_buff *skb, unsigned int cur_mss) | ||
| 801 | { | ||
| 802 | u32 end_seq = TCP_SKB_CB(skb)->end_seq; | ||
| 803 | |||
| 804 | if (skb->len > cur_mss) | ||
| 805 | end_seq = TCP_SKB_CB(skb)->seq + cur_mss; | ||
| 806 | |||
| 807 | return !after(end_seq, tp->snd_una + tp->snd_wnd); | ||
| 808 | } | ||
| 809 | |||
| 810 | /* This checks if the data bearing packet SKB (usually sk->sk_send_head) | ||
| 811 | * should be put on the wire right now. If so, it returns the number of | ||
| 812 | * packets allowed by the congestion window. | ||
| 813 | */ | ||
| 814 | static unsigned int tcp_snd_test(struct sock *sk, struct sk_buff *skb, | ||
| 815 | unsigned int cur_mss, int nonagle) | ||
| 816 | { | ||
| 817 | struct tcp_sock *tp = tcp_sk(sk); | ||
| 818 | unsigned int cwnd_quota; | ||
| 819 | |||
| 820 | tcp_init_tso_segs(sk, skb); | ||
| 821 | |||
| 822 | if (!tcp_nagle_test(tp, skb, cur_mss, nonagle)) | ||
| 823 | return 0; | ||
| 824 | |||
| 825 | cwnd_quota = tcp_cwnd_test(tp, skb); | ||
| 826 | if (cwnd_quota && | ||
| 827 | !tcp_snd_wnd_test(tp, skb, cur_mss)) | ||
| 828 | cwnd_quota = 0; | ||
| 829 | |||
| 830 | return cwnd_quota; | ||
| 831 | } | ||
| 832 | |||
| 833 | static inline int tcp_skb_is_last(const struct sock *sk, | ||
| 834 | const struct sk_buff *skb) | ||
| 835 | { | ||
| 836 | return skb->next == (struct sk_buff *)&sk->sk_write_queue; | ||
| 837 | } | ||
| 838 | |||
| 839 | int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp) | ||
| 840 | { | ||
| 841 | struct sk_buff *skb = sk->sk_send_head; | ||
| 842 | |||
| 843 | return (skb && | ||
| 844 | tcp_snd_test(sk, skb, tcp_current_mss(sk, 1), | ||
| 845 | (tcp_skb_is_last(sk, skb) ? | ||
| 846 | TCP_NAGLE_PUSH : | ||
| 847 | tp->nonagle))); | ||
| 848 | } | ||
| 849 | |||
| 850 | /* Trim TSO SKB to LEN bytes, put the remaining data into a new packet | ||
| 851 | * which is put after SKB on the list. It is very much like | ||
| 852 | * tcp_fragment() except that it may make several kinds of assumptions | ||
| 853 | * in order to speed up the splitting operation. In particular, we | ||
| 854 | * know that all the data is in scatter-gather pages, and that the | ||
| 855 | * packet has never been sent out before (and thus is not cloned). | ||
| 856 | */ | ||
| 857 | static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len) | ||
| 858 | { | ||
| 859 | struct sk_buff *buff; | ||
| 860 | int nlen = skb->len - len; | ||
| 861 | u16 flags; | ||
| 862 | |||
| 863 | /* All of a TSO frame must be composed of paged data. */ | ||
| 864 | BUG_ON(skb->len != skb->data_len); | ||
| 865 | |||
| 866 | buff = sk_stream_alloc_pskb(sk, 0, 0, GFP_ATOMIC); | ||
| 867 | if (unlikely(buff == NULL)) | ||
| 868 | return -ENOMEM; | ||
| 869 | |||
| 870 | buff->truesize = nlen; | ||
| 871 | skb->truesize -= nlen; | ||
| 872 | |||
| 873 | /* Correct the sequence numbers. */ | ||
| 874 | TCP_SKB_CB(buff)->seq = TCP_SKB_CB(skb)->seq + len; | ||
| 875 | TCP_SKB_CB(buff)->end_seq = TCP_SKB_CB(skb)->end_seq; | ||
| 876 | TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(buff)->seq; | ||
| 877 | |||
| 878 | /* PSH and FIN should only be set in the second packet. */ | ||
| 879 | flags = TCP_SKB_CB(skb)->flags; | ||
| 880 | TCP_SKB_CB(skb)->flags = flags & ~(TCPCB_FLAG_FIN|TCPCB_FLAG_PSH); | ||
| 881 | TCP_SKB_CB(buff)->flags = flags; | ||
| 882 | |||
| 883 | /* This packet was never sent out yet, so no SACK bits. */ | ||
| 884 | TCP_SKB_CB(buff)->sacked = 0; | ||
| 885 | |||
| 886 | buff->ip_summed = skb->ip_summed = CHECKSUM_HW; | ||
| 887 | skb_split(skb, buff, len); | ||
| 888 | |||
| 889 | /* Fix up tso_factor for both original and new SKB. */ | ||
| 890 | tcp_set_skb_tso_segs(sk, skb); | ||
| 891 | tcp_set_skb_tso_segs(sk, buff); | ||
| 892 | |||
| 893 | /* Link BUFF into the send queue. */ | ||
| 894 | skb_header_release(buff); | ||
| 895 | __skb_append(skb, buff); | ||
| 896 | |||
| 897 | return 0; | ||
| 898 | } | ||
| 899 | |||
| 900 | /* Try to defer sending, if possible, in order to minimize the amount | ||
| 901 | * of TSO splitting we do. View it as a kind of TSO Nagle test. | ||
| 902 | * | ||
| 903 | * This algorithm is from John Heffner. | ||
| 904 | */ | ||
| 905 | static int tcp_tso_should_defer(struct sock *sk, struct tcp_sock *tp, struct sk_buff *skb) | ||
| 906 | { | ||
| 907 | u32 send_win, cong_win, limit, in_flight; | ||
| 908 | |||
| 909 | if (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) | ||
| 910 | return 0; | ||
| 911 | |||
| 912 | if (tp->ca_state != TCP_CA_Open) | ||
| 913 | return 0; | ||
| 914 | |||
| 915 | in_flight = tcp_packets_in_flight(tp); | ||
| 916 | |||
| 917 | BUG_ON(tcp_skb_pcount(skb) <= 1 || | ||
| 918 | (tp->snd_cwnd <= in_flight)); | ||
| 919 | |||
| 920 | send_win = (tp->snd_una + tp->snd_wnd) - TCP_SKB_CB(skb)->seq; | ||
| 921 | |||
| 922 | /* From in_flight test above, we know that cwnd > in_flight. */ | ||
| 923 | cong_win = (tp->snd_cwnd - in_flight) * tp->mss_cache; | ||
| 924 | |||
| 925 | limit = min(send_win, cong_win); | ||
| 926 | |||
| 927 | /* If sk_send_head can be sent fully now, just do it. */ | ||
| 928 | if (skb->len <= limit) | ||
| 929 | return 0; | ||
| 930 | |||
| 931 | if (sysctl_tcp_tso_win_divisor) { | ||
| 932 | u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache); | ||
| 933 | |||
| 934 | /* If at least some fraction of a window is available, | ||
| 935 | * just use it. | ||
| 936 | */ | ||
| 937 | chunk /= sysctl_tcp_tso_win_divisor; | ||
| 938 | if (limit >= chunk) | ||
| 939 | return 0; | ||
| 940 | } else { | ||
| 941 | /* Different approach, try not to defer past a single | ||
| 942 | * ACK. Receiver should ACK every other full sized | ||
| 943 | * frame, so if we have space for more than 3 frames | ||
| 944 | * then send now. | ||
| 945 | */ | ||
| 946 | if (limit > tcp_max_burst(tp) * tp->mss_cache) | ||
| 947 | return 0; | ||
| 948 | } | ||
| 949 | |||
| 950 | /* Ok, it looks like it is advisable to defer. */ | ||
| 951 | return 1; | ||
| 723 | } | 952 | } |
| 724 | 953 | ||
| 725 | /* This routine writes packets to the network. It advances the | 954 | /* This routine writes packets to the network. It advances the |
| @@ -729,57 +958,158 @@ unsigned int tcp_current_mss(struct sock *sk, int large) | |||
| 729 | * Returns 1, if no segments are in flight and we have queued segments, but | 958 | * Returns 1, if no segments are in flight and we have queued segments, but |
| 730 | * cannot send anything now because of SWS or another problem. | 959 | * cannot send anything now because of SWS or another problem. |
| 731 | */ | 960 | */ |
| 732 | int tcp_write_xmit(struct sock *sk, int nonagle) | 961 | static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle) |
| 733 | { | 962 | { |
| 734 | struct tcp_sock *tp = tcp_sk(sk); | 963 | struct tcp_sock *tp = tcp_sk(sk); |
| 735 | unsigned int mss_now; | 964 | struct sk_buff *skb; |
| 965 | unsigned int tso_segs, sent_pkts; | ||
| 966 | int cwnd_quota; | ||
| 736 | 967 | ||
| 737 | /* If we are closed, the bytes will have to remain here. | 968 | /* If we are closed, the bytes will have to remain here. |
| 738 | * In time closedown will finish, we empty the write queue and all | 969 | * In time closedown will finish, we empty the write queue and all |
| 739 | * will be happy. | 970 | * will be happy. |
| 740 | */ | 971 | */ |
| 741 | if (sk->sk_state != TCP_CLOSE) { | 972 | if (unlikely(sk->sk_state == TCP_CLOSE)) |
| 742 | struct sk_buff *skb; | 973 | return 0; |
| 743 | int sent_pkts = 0; | 974 | |
| 975 | skb = sk->sk_send_head; | ||
| 976 | if (unlikely(!skb)) | ||
| 977 | return 0; | ||
| 978 | |||
| 979 | tso_segs = tcp_init_tso_segs(sk, skb); | ||
| 980 | cwnd_quota = tcp_cwnd_test(tp, skb); | ||
| 981 | if (unlikely(!cwnd_quota)) | ||
| 982 | goto out; | ||
| 983 | |||
| 984 | sent_pkts = 0; | ||
| 985 | while (likely(tcp_snd_wnd_test(tp, skb, mss_now))) { | ||
| 986 | BUG_ON(!tso_segs); | ||
| 987 | |||
| 988 | if (tso_segs == 1) { | ||
| 989 | if (unlikely(!tcp_nagle_test(tp, skb, mss_now, | ||
| 990 | (tcp_skb_is_last(sk, skb) ? | ||
| 991 | nonagle : TCP_NAGLE_PUSH)))) | ||
| 992 | break; | ||
| 993 | } else { | ||
| 994 | if (tcp_tso_should_defer(sk, tp, skb)) | ||
| 995 | break; | ||
| 996 | } | ||
| 744 | 997 | ||
| 745 | /* Account for SACKS, we may need to fragment due to this. | 998 | if (tso_segs > 1) { |
| 746 | * It is just like the real MSS changing on us midstream. | 999 | u32 limit = tcp_window_allows(tp, skb, |
| 747 | * We also handle things correctly when the user adds some | 1000 | mss_now, cwnd_quota); |
| 748 | * IP options mid-stream. Silly to do, but cover it. | 1001 | |
| 749 | */ | 1002 | if (skb->len < limit) { |
| 750 | mss_now = tcp_current_mss(sk, 1); | 1003 | unsigned int trim = skb->len % mss_now; |
| 751 | 1004 | ||
| 752 | while ((skb = sk->sk_send_head) && | 1005 | if (trim) |
| 753 | tcp_snd_test(sk, skb, mss_now, | 1006 | limit = skb->len - trim; |
| 754 | tcp_skb_is_last(sk, skb) ? nonagle : | 1007 | } |
| 755 | TCP_NAGLE_PUSH)) { | 1008 | if (skb->len > limit) { |
| 756 | if (skb->len > mss_now) { | 1009 | if (tso_fragment(sk, skb, limit)) |
| 757 | if (tcp_fragment(sk, skb, mss_now)) | ||
| 758 | break; | 1010 | break; |
| 759 | } | 1011 | } |
| 760 | 1012 | } else if (unlikely(skb->len > mss_now)) { | |
| 761 | TCP_SKB_CB(skb)->when = tcp_time_stamp; | 1013 | if (unlikely(tcp_fragment(sk, skb, mss_now))) |
| 762 | tcp_tso_set_push(skb); | ||
| 763 | if (tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC))) | ||
| 764 | break; | 1014 | break; |
| 1015 | } | ||
| 765 | 1016 | ||
| 766 | /* Advance the send_head. This one is sent out. | 1017 | TCP_SKB_CB(skb)->when = tcp_time_stamp; |
| 767 | * This call will increment packets_out. | 1018 | |
| 768 | */ | 1019 | if (unlikely(tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC)))) |
| 769 | update_send_head(sk, tp, skb); | 1020 | break; |
| 1021 | |||
| 1022 | /* Advance the send_head. This one is sent out. | ||
| 1023 | * This call will increment packets_out. | ||
| 1024 | */ | ||
| 1025 | update_send_head(sk, tp, skb); | ||
| 1026 | |||
| 1027 | tcp_minshall_update(tp, mss_now, skb); | ||
| 1028 | sent_pkts++; | ||
| 1029 | |||
| 1030 | /* Do not optimize this to use tso_segs. If we chopped up | ||
| 1031 | * the packet above, tso_segs will no longer be valid. | ||
| 1032 | */ | ||
| 1033 | cwnd_quota -= tcp_skb_pcount(skb); | ||
| 1034 | |||
| 1035 | BUG_ON(cwnd_quota < 0); | ||
| 1036 | if (!cwnd_quota) | ||
| 1037 | break; | ||
| 1038 | |||
| 1039 | skb = sk->sk_send_head; | ||
| 1040 | if (!skb) | ||
| 1041 | break; | ||
| 1042 | tso_segs = tcp_init_tso_segs(sk, skb); | ||
| 1043 | } | ||
| 1044 | |||
| 1045 | if (likely(sent_pkts)) { | ||
| 1046 | tcp_cwnd_validate(sk, tp); | ||
| 1047 | return 0; | ||
| 1048 | } | ||
| 1049 | out: | ||
| 1050 | return !tp->packets_out && sk->sk_send_head; | ||
| 1051 | } | ||
| 1052 | |||
| 1053 | /* Push out any pending frames which were held back due to | ||
| 1054 | * TCP_CORK or attempt at coalescing tiny packets. | ||
| 1055 | * The socket must be locked by the caller. | ||
| 1056 | */ | ||
| 1057 | void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp, | ||
| 1058 | unsigned int cur_mss, int nonagle) | ||
| 1059 | { | ||
| 1060 | struct sk_buff *skb = sk->sk_send_head; | ||
| 770 | 1061 | ||
| 771 | tcp_minshall_update(tp, mss_now, skb); | 1062 | if (skb) { |
| 772 | sent_pkts = 1; | 1063 | if (tcp_write_xmit(sk, cur_mss, nonagle)) |
| 1064 | tcp_check_probe_timer(sk, tp); | ||
| 1065 | } | ||
| 1066 | } | ||
| 1067 | |||
| 1068 | /* Send _single_ skb sitting at the send head. This function requires | ||
| 1069 | * true push pending frames to setup probe timer etc. | ||
| 1070 | */ | ||
| 1071 | void tcp_push_one(struct sock *sk, unsigned int mss_now) | ||
| 1072 | { | ||
| 1073 | struct tcp_sock *tp = tcp_sk(sk); | ||
| 1074 | struct sk_buff *skb = sk->sk_send_head; | ||
| 1075 | unsigned int tso_segs, cwnd_quota; | ||
| 1076 | |||
| 1077 | BUG_ON(!skb || skb->len < mss_now); | ||
| 1078 | |||
| 1079 | tso_segs = tcp_init_tso_segs(sk, skb); | ||
| 1080 | cwnd_quota = tcp_snd_test(sk, skb, mss_now, TCP_NAGLE_PUSH); | ||
| 1081 | |||
| 1082 | if (likely(cwnd_quota)) { | ||
| 1083 | BUG_ON(!tso_segs); | ||
| 1084 | |||
| 1085 | if (tso_segs > 1) { | ||
| 1086 | u32 limit = tcp_window_allows(tp, skb, | ||
| 1087 | mss_now, cwnd_quota); | ||
| 1088 | |||
| 1089 | if (skb->len < limit) { | ||
| 1090 | unsigned int trim = skb->len % mss_now; | ||
| 1091 | |||
| 1092 | if (trim) | ||
| 1093 | limit = skb->len - trim; | ||
| 1094 | } | ||
| 1095 | if (skb->len > limit) { | ||
| 1096 | if (unlikely(tso_fragment(sk, skb, limit))) | ||
| 1097 | return; | ||
| 1098 | } | ||
| 1099 | } else if (unlikely(skb->len > mss_now)) { | ||
| 1100 | if (unlikely(tcp_fragment(sk, skb, mss_now))) | ||
| 1101 | return; | ||
| 773 | } | 1102 | } |
| 774 | 1103 | ||
| 775 | if (sent_pkts) { | 1104 | /* Send it out now. */ |
| 1105 | TCP_SKB_CB(skb)->when = tcp_time_stamp; | ||
| 1106 | |||
| 1107 | if (likely(!tcp_transmit_skb(sk, skb_clone(skb, sk->sk_allocation)))) { | ||
| 1108 | update_send_head(sk, tp, skb); | ||
| 776 | tcp_cwnd_validate(sk, tp); | 1109 | tcp_cwnd_validate(sk, tp); |
| 777 | return 0; | 1110 | return; |
| 778 | } | 1111 | } |
| 779 | |||
| 780 | return !tp->packets_out && sk->sk_send_head; | ||
| 781 | } | 1112 | } |
| 782 | return 0; | ||
| 783 | } | 1113 | } |
| 784 | 1114 | ||
| 785 | /* This function returns the amount that we can raise the | 1115 | /* This function returns the amount that we can raise the |
| @@ -1039,7 +1369,6 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
| 1039 | if (sk->sk_route_caps & NETIF_F_TSO) { | 1369 | if (sk->sk_route_caps & NETIF_F_TSO) { |
| 1040 | sk->sk_route_caps &= ~NETIF_F_TSO; | 1370 | sk->sk_route_caps &= ~NETIF_F_TSO; |
| 1041 | sock_set_flag(sk, SOCK_NO_LARGESEND); | 1371 | sock_set_flag(sk, SOCK_NO_LARGESEND); |
| 1042 | tp->mss_cache = tp->mss_cache_std; | ||
| 1043 | } | 1372 | } |
| 1044 | 1373 | ||
| 1045 | if (tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)) | 1374 | if (tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)) |
| @@ -1101,7 +1430,6 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
| 1101 | * is still in somebody's hands, else make a clone. | 1430 | * is still in somebody's hands, else make a clone. |
| 1102 | */ | 1431 | */ |
| 1103 | TCP_SKB_CB(skb)->when = tcp_time_stamp; | 1432 | TCP_SKB_CB(skb)->when = tcp_time_stamp; |
| 1104 | tcp_tso_set_push(skb); | ||
| 1105 | 1433 | ||
| 1106 | err = tcp_transmit_skb(sk, (skb_cloned(skb) ? | 1434 | err = tcp_transmit_skb(sk, (skb_cloned(skb) ? |
| 1107 | pskb_copy(skb, GFP_ATOMIC): | 1435 | pskb_copy(skb, GFP_ATOMIC): |
| @@ -1670,14 +1998,12 @@ int tcp_write_wakeup(struct sock *sk) | |||
| 1670 | if (sk->sk_route_caps & NETIF_F_TSO) { | 1998 | if (sk->sk_route_caps & NETIF_F_TSO) { |
| 1671 | sock_set_flag(sk, SOCK_NO_LARGESEND); | 1999 | sock_set_flag(sk, SOCK_NO_LARGESEND); |
| 1672 | sk->sk_route_caps &= ~NETIF_F_TSO; | 2000 | sk->sk_route_caps &= ~NETIF_F_TSO; |
| 1673 | tp->mss_cache = tp->mss_cache_std; | ||
| 1674 | } | 2001 | } |
| 1675 | } else if (!tcp_skb_pcount(skb)) | 2002 | } else if (!tcp_skb_pcount(skb)) |
| 1676 | tcp_set_skb_tso_segs(sk, skb); | 2003 | tcp_set_skb_tso_segs(sk, skb); |
| 1677 | 2004 | ||
| 1678 | TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH; | 2005 | TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH; |
| 1679 | TCP_SKB_CB(skb)->when = tcp_time_stamp; | 2006 | TCP_SKB_CB(skb)->when = tcp_time_stamp; |
| 1680 | tcp_tso_set_push(skb); | ||
| 1681 | err = tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC)); | 2007 | err = tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC)); |
| 1682 | if (!err) { | 2008 | if (!err) { |
| 1683 | update_send_head(sk, tp, skb); | 2009 | update_send_head(sk, tp, skb); |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 2b193e3df49a..28d9bcab0970 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
| @@ -774,7 +774,6 @@ static int __init inet6_init(void) | |||
| 774 | if (if6_proc_init()) | 774 | if (if6_proc_init()) |
| 775 | goto proc_if6_fail; | 775 | goto proc_if6_fail; |
| 776 | #endif | 776 | #endif |
| 777 | ipv6_packet_init(); | ||
| 778 | ip6_route_init(); | 777 | ip6_route_init(); |
| 779 | ip6_flowlabel_init(); | 778 | ip6_flowlabel_init(); |
| 780 | err = addrconf_init(); | 779 | err = addrconf_init(); |
| @@ -791,6 +790,8 @@ static int __init inet6_init(void) | |||
| 791 | /* Init v6 transport protocols. */ | 790 | /* Init v6 transport protocols. */ |
| 792 | udpv6_init(); | 791 | udpv6_init(); |
| 793 | tcpv6_init(); | 792 | tcpv6_init(); |
| 793 | |||
| 794 | ipv6_packet_init(); | ||
| 794 | err = 0; | 795 | err = 0; |
| 795 | out: | 796 | out: |
| 796 | return err; | 797 | return err; |
| @@ -798,7 +799,6 @@ out: | |||
| 798 | addrconf_fail: | 799 | addrconf_fail: |
| 799 | ip6_flowlabel_cleanup(); | 800 | ip6_flowlabel_cleanup(); |
| 800 | ip6_route_cleanup(); | 801 | ip6_route_cleanup(); |
| 801 | ipv6_packet_cleanup(); | ||
| 802 | #ifdef CONFIG_PROC_FS | 802 | #ifdef CONFIG_PROC_FS |
| 803 | if6_proc_exit(); | 803 | if6_proc_exit(); |
| 804 | proc_if6_fail: | 804 | proc_if6_fail: |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 06e7cdaeedc5..1f2c2f9e353f 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
| @@ -465,7 +465,6 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from) | |||
| 465 | to->pkt_type = from->pkt_type; | 465 | to->pkt_type = from->pkt_type; |
| 466 | to->priority = from->priority; | 466 | to->priority = from->priority; |
| 467 | to->protocol = from->protocol; | 467 | to->protocol = from->protocol; |
| 468 | to->security = from->security; | ||
| 469 | dst_release(to->dst); | 468 | dst_release(to->dst); |
| 470 | to->dst = dst_clone(from->dst); | 469 | to->dst = dst_clone(from->dst); |
| 471 | to->dev = from->dev; | 470 | to->dev = from->dev; |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 9dac7fdf4726..f6e288dc116e 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
| @@ -2018,7 +2018,7 @@ static int tcp_v6_init_sock(struct sock *sk) | |||
| 2018 | */ | 2018 | */ |
| 2019 | tp->snd_ssthresh = 0x7fffffff; | 2019 | tp->snd_ssthresh = 0x7fffffff; |
| 2020 | tp->snd_cwnd_clamp = ~0; | 2020 | tp->snd_cwnd_clamp = ~0; |
| 2021 | tp->mss_cache_std = tp->mss_cache = 536; | 2021 | tp->mss_cache = 536; |
| 2022 | 2022 | ||
| 2023 | tp->reordering = sysctl_tcp_reordering; | 2023 | tp->reordering = sysctl_tcp_reordering; |
| 2024 | 2024 | ||
diff --git a/net/sched/Makefile b/net/sched/Makefile index 8f58cecd6266..e48d0d456b3e 100644 --- a/net/sched/Makefile +++ b/net/sched/Makefile | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | obj-y := sch_generic.o | 5 | obj-y := sch_generic.o |
| 6 | 6 | ||
| 7 | obj-$(CONFIG_NET_SCHED) += sch_api.o sch_fifo.o | 7 | obj-$(CONFIG_NET_SCHED) += sch_api.o sch_fifo.o sch_blackhole.o |
| 8 | obj-$(CONFIG_NET_CLS) += cls_api.o | 8 | obj-$(CONFIG_NET_CLS) += cls_api.o |
| 9 | obj-$(CONFIG_NET_CLS_ACT) += act_api.o | 9 | obj-$(CONFIG_NET_CLS_ACT) += act_api.o |
| 10 | obj-$(CONFIG_NET_ACT_POLICE) += police.o | 10 | obj-$(CONFIG_NET_ACT_POLICE) += police.o |
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 48bb23c2a35a..53d98f8d3d80 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
| @@ -205,11 +205,6 @@ META_COLLECTOR(int_protocol) | |||
| 205 | dst->value = skb->protocol; | 205 | dst->value = skb->protocol; |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | META_COLLECTOR(int_security) | ||
| 209 | { | ||
| 210 | dst->value = skb->security; | ||
| 211 | } | ||
| 212 | |||
| 213 | META_COLLECTOR(int_pkttype) | 208 | META_COLLECTOR(int_pkttype) |
| 214 | { | 209 | { |
| 215 | dst->value = skb->pkt_type; | 210 | dst->value = skb->pkt_type; |
| @@ -524,7 +519,6 @@ static struct meta_ops __meta_ops[TCF_META_TYPE_MAX+1][TCF_META_ID_MAX+1] = { | |||
| 524 | [META_ID(REALDEV)] = META_FUNC(int_realdev), | 519 | [META_ID(REALDEV)] = META_FUNC(int_realdev), |
| 525 | [META_ID(PRIORITY)] = META_FUNC(int_priority), | 520 | [META_ID(PRIORITY)] = META_FUNC(int_priority), |
| 526 | [META_ID(PROTOCOL)] = META_FUNC(int_protocol), | 521 | [META_ID(PROTOCOL)] = META_FUNC(int_protocol), |
| 527 | [META_ID(SECURITY)] = META_FUNC(int_security), | ||
| 528 | [META_ID(PKTTYPE)] = META_FUNC(int_pkttype), | 522 | [META_ID(PKTTYPE)] = META_FUNC(int_pkttype), |
| 529 | [META_ID(PKTLEN)] = META_FUNC(int_pktlen), | 523 | [META_ID(PKTLEN)] = META_FUNC(int_pktlen), |
| 530 | [META_ID(DATALEN)] = META_FUNC(int_datalen), | 524 | [META_ID(DATALEN)] = META_FUNC(int_datalen), |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 05e6e0a799da..b9a069af4a02 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
| @@ -399,10 +399,8 @@ qdisc_create(struct net_device *dev, u32 handle, struct rtattr **tca, int *errp) | |||
| 399 | { | 399 | { |
| 400 | int err; | 400 | int err; |
| 401 | struct rtattr *kind = tca[TCA_KIND-1]; | 401 | struct rtattr *kind = tca[TCA_KIND-1]; |
| 402 | void *p = NULL; | ||
| 403 | struct Qdisc *sch; | 402 | struct Qdisc *sch; |
| 404 | struct Qdisc_ops *ops; | 403 | struct Qdisc_ops *ops; |
| 405 | int size; | ||
| 406 | 404 | ||
| 407 | ops = qdisc_lookup_ops(kind); | 405 | ops = qdisc_lookup_ops(kind); |
| 408 | #ifdef CONFIG_KMOD | 406 | #ifdef CONFIG_KMOD |
| @@ -437,64 +435,55 @@ qdisc_create(struct net_device *dev, u32 handle, struct rtattr **tca, int *errp) | |||
| 437 | if (ops == NULL) | 435 | if (ops == NULL) |
| 438 | goto err_out; | 436 | goto err_out; |
| 439 | 437 | ||
| 440 | /* ensure that the Qdisc and the private data are 32-byte aligned */ | 438 | sch = qdisc_alloc(dev, ops); |
| 441 | size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST); | 439 | if (IS_ERR(sch)) { |
| 442 | size += ops->priv_size + QDISC_ALIGN_CONST; | 440 | err = PTR_ERR(sch); |
| 443 | |||
| 444 | p = kmalloc(size, GFP_KERNEL); | ||
| 445 | err = -ENOBUFS; | ||
| 446 | if (!p) | ||
| 447 | goto err_out2; | 441 | goto err_out2; |
| 448 | memset(p, 0, size); | 442 | } |
| 449 | sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST) | ||
| 450 | & ~QDISC_ALIGN_CONST); | ||
| 451 | sch->padded = (char *)sch - (char *)p; | ||
| 452 | |||
| 453 | INIT_LIST_HEAD(&sch->list); | ||
| 454 | skb_queue_head_init(&sch->q); | ||
| 455 | 443 | ||
| 456 | if (handle == TC_H_INGRESS) | 444 | if (handle == TC_H_INGRESS) { |
| 457 | sch->flags |= TCQ_F_INGRESS; | 445 | sch->flags |= TCQ_F_INGRESS; |
| 458 | 446 | handle = TC_H_MAKE(TC_H_INGRESS, 0); | |
| 459 | sch->ops = ops; | 447 | } else if (handle == 0) { |
| 460 | sch->enqueue = ops->enqueue; | ||
| 461 | sch->dequeue = ops->dequeue; | ||
| 462 | sch->dev = dev; | ||
| 463 | dev_hold(dev); | ||
| 464 | atomic_set(&sch->refcnt, 1); | ||
| 465 | sch->stats_lock = &dev->queue_lock; | ||
| 466 | if (handle == 0) { | ||
| 467 | handle = qdisc_alloc_handle(dev); | 448 | handle = qdisc_alloc_handle(dev); |
| 468 | err = -ENOMEM; | 449 | err = -ENOMEM; |
| 469 | if (handle == 0) | 450 | if (handle == 0) |
| 470 | goto err_out3; | 451 | goto err_out3; |
| 471 | } | 452 | } |
| 472 | 453 | ||
| 473 | if (handle == TC_H_INGRESS) | 454 | sch->handle = handle; |
| 474 | sch->handle =TC_H_MAKE(TC_H_INGRESS, 0); | ||
| 475 | else | ||
| 476 | sch->handle = handle; | ||
| 477 | 455 | ||
| 478 | if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) { | 456 | if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) { |
| 457 | #ifdef CONFIG_NET_ESTIMATOR | ||
| 458 | if (tca[TCA_RATE-1]) { | ||
| 459 | err = gen_new_estimator(&sch->bstats, &sch->rate_est, | ||
| 460 | sch->stats_lock, | ||
| 461 | tca[TCA_RATE-1]); | ||
| 462 | if (err) { | ||
| 463 | /* | ||
| 464 | * Any broken qdiscs that would require | ||
| 465 | * a ops->reset() here? The qdisc was never | ||
| 466 | * in action so it shouldn't be necessary. | ||
| 467 | */ | ||
| 468 | if (ops->destroy) | ||
| 469 | ops->destroy(sch); | ||
| 470 | goto err_out3; | ||
| 471 | } | ||
| 472 | } | ||
| 473 | #endif | ||
| 479 | qdisc_lock_tree(dev); | 474 | qdisc_lock_tree(dev); |
| 480 | list_add_tail(&sch->list, &dev->qdisc_list); | 475 | list_add_tail(&sch->list, &dev->qdisc_list); |
| 481 | qdisc_unlock_tree(dev); | 476 | qdisc_unlock_tree(dev); |
| 482 | 477 | ||
| 483 | #ifdef CONFIG_NET_ESTIMATOR | ||
| 484 | if (tca[TCA_RATE-1]) | ||
| 485 | gen_new_estimator(&sch->bstats, &sch->rate_est, | ||
| 486 | sch->stats_lock, tca[TCA_RATE-1]); | ||
| 487 | #endif | ||
| 488 | return sch; | 478 | return sch; |
| 489 | } | 479 | } |
| 490 | err_out3: | 480 | err_out3: |
| 491 | dev_put(dev); | 481 | dev_put(dev); |
| 482 | kfree((char *) sch - sch->padded); | ||
| 492 | err_out2: | 483 | err_out2: |
| 493 | module_put(ops->owner); | 484 | module_put(ops->owner); |
| 494 | err_out: | 485 | err_out: |
| 495 | *errp = err; | 486 | *errp = err; |
| 496 | if (p) | ||
| 497 | kfree(p); | ||
| 498 | return NULL; | 487 | return NULL; |
| 499 | } | 488 | } |
| 500 | 489 | ||
diff --git a/net/sched/sch_blackhole.c b/net/sched/sch_blackhole.c new file mode 100644 index 000000000000..81f0b8346d17 --- /dev/null +++ b/net/sched/sch_blackhole.c | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* | ||
| 2 | * net/sched/sch_blackhole.c Black hole queue | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU General Public License | ||
| 6 | * as published by the Free Software Foundation; either version | ||
| 7 | * 2 of the License, or (at your option) any later version. | ||
| 8 | * | ||
| 9 | * Authors: Thomas Graf <tgraf@suug.ch> | ||
| 10 | * | ||
| 11 | * Note: Quantum tunneling is not supported. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/config.h> | ||
| 15 | #include <linux/module.h> | ||
| 16 | #include <linux/types.h> | ||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/netdevice.h> | ||
| 19 | #include <linux/skbuff.h> | ||
| 20 | #include <net/pkt_sched.h> | ||
| 21 | |||
| 22 | static int blackhole_enqueue(struct sk_buff *skb, struct Qdisc *sch) | ||
| 23 | { | ||
| 24 | qdisc_drop(skb, sch); | ||
| 25 | return NET_XMIT_SUCCESS; | ||
| 26 | } | ||
| 27 | |||
| 28 | static struct sk_buff *blackhole_dequeue(struct Qdisc *sch) | ||
| 29 | { | ||
| 30 | return NULL; | ||
| 31 | } | ||
| 32 | |||
| 33 | static struct Qdisc_ops blackhole_qdisc_ops = { | ||
| 34 | .id = "blackhole", | ||
| 35 | .priv_size = 0, | ||
| 36 | .enqueue = blackhole_enqueue, | ||
| 37 | .dequeue = blackhole_dequeue, | ||
| 38 | .owner = THIS_MODULE, | ||
| 39 | }; | ||
| 40 | |||
| 41 | static int __init blackhole_module_init(void) | ||
| 42 | { | ||
| 43 | return register_qdisc(&blackhole_qdisc_ops); | ||
| 44 | } | ||
| 45 | |||
| 46 | static void __exit blackhole_module_exit(void) | ||
| 47 | { | ||
| 48 | unregister_qdisc(&blackhole_qdisc_ops); | ||
| 49 | } | ||
| 50 | |||
| 51 | module_init(blackhole_module_init) | ||
| 52 | module_exit(blackhole_module_exit) | ||
| 53 | |||
| 54 | MODULE_LICENSE("GPL"); | ||
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 7683b34dc6a9..73e218e646ac 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
| @@ -395,24 +395,23 @@ static struct Qdisc_ops pfifo_fast_ops = { | |||
| 395 | .owner = THIS_MODULE, | 395 | .owner = THIS_MODULE, |
| 396 | }; | 396 | }; |
| 397 | 397 | ||
| 398 | struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops) | 398 | struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops) |
| 399 | { | 399 | { |
| 400 | void *p; | 400 | void *p; |
| 401 | struct Qdisc *sch; | 401 | struct Qdisc *sch; |
| 402 | int size; | 402 | unsigned int size; |
| 403 | int err = -ENOBUFS; | ||
| 403 | 404 | ||
| 404 | /* ensure that the Qdisc and the private data are 32-byte aligned */ | 405 | /* ensure that the Qdisc and the private data are 32-byte aligned */ |
| 405 | size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST); | 406 | size = QDISC_ALIGN(sizeof(*sch)); |
| 406 | size += ops->priv_size + QDISC_ALIGN_CONST; | 407 | size += ops->priv_size + (QDISC_ALIGNTO - 1); |
| 407 | 408 | ||
| 408 | p = kmalloc(size, GFP_KERNEL); | 409 | p = kmalloc(size, GFP_KERNEL); |
| 409 | if (!p) | 410 | if (!p) |
| 410 | return NULL; | 411 | goto errout; |
| 411 | memset(p, 0, size); | 412 | memset(p, 0, size); |
| 412 | 413 | sch = (struct Qdisc *) QDISC_ALIGN((unsigned long) p); | |
| 413 | sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST) | 414 | sch->padded = (char *) sch - (char *) p; |
| 414 | & ~QDISC_ALIGN_CONST); | ||
| 415 | sch->padded = (char *)sch - (char *)p; | ||
| 416 | 415 | ||
| 417 | INIT_LIST_HEAD(&sch->list); | 416 | INIT_LIST_HEAD(&sch->list); |
| 418 | skb_queue_head_init(&sch->q); | 417 | skb_queue_head_init(&sch->q); |
| @@ -423,11 +422,24 @@ struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops) | |||
| 423 | dev_hold(dev); | 422 | dev_hold(dev); |
| 424 | sch->stats_lock = &dev->queue_lock; | 423 | sch->stats_lock = &dev->queue_lock; |
| 425 | atomic_set(&sch->refcnt, 1); | 424 | atomic_set(&sch->refcnt, 1); |
| 425 | |||
| 426 | return sch; | ||
| 427 | errout: | ||
| 428 | return ERR_PTR(-err); | ||
| 429 | } | ||
| 430 | |||
| 431 | struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops) | ||
| 432 | { | ||
| 433 | struct Qdisc *sch; | ||
| 434 | |||
| 435 | sch = qdisc_alloc(dev, ops); | ||
| 436 | if (IS_ERR(sch)) | ||
| 437 | goto errout; | ||
| 438 | |||
| 426 | if (!ops->init || ops->init(sch, NULL) == 0) | 439 | if (!ops->init || ops->init(sch, NULL) == 0) |
| 427 | return sch; | 440 | return sch; |
| 428 | 441 | ||
| 429 | dev_put(dev); | 442 | errout: |
| 430 | kfree(p); | ||
| 431 | return NULL; | 443 | return NULL; |
| 432 | } | 444 | } |
| 433 | 445 | ||
| @@ -591,6 +603,7 @@ EXPORT_SYMBOL(__netdev_watchdog_up); | |||
| 591 | EXPORT_SYMBOL(noop_qdisc); | 603 | EXPORT_SYMBOL(noop_qdisc); |
| 592 | EXPORT_SYMBOL(noop_qdisc_ops); | 604 | EXPORT_SYMBOL(noop_qdisc_ops); |
| 593 | EXPORT_SYMBOL(qdisc_create_dflt); | 605 | EXPORT_SYMBOL(qdisc_create_dflt); |
| 606 | EXPORT_SYMBOL(qdisc_alloc); | ||
| 594 | EXPORT_SYMBOL(qdisc_destroy); | 607 | EXPORT_SYMBOL(qdisc_destroy); |
| 595 | EXPORT_SYMBOL(qdisc_reset); | 608 | EXPORT_SYMBOL(qdisc_reset); |
| 596 | EXPORT_SYMBOL(qdisc_restart); | 609 | EXPORT_SYMBOL(qdisc_restart); |
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index defdc5a459f0..c5557eaf3e2e 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
| @@ -798,13 +798,15 @@ static struct { | |||
| 798 | {0x270f, 0xfc00}, /* Chaintech Digitop DST-1000 DVB-S */ | 798 | {0x270f, 0xfc00}, /* Chaintech Digitop DST-1000 DVB-S */ |
| 799 | }; | 799 | }; |
| 800 | 800 | ||
| 801 | static struct pci_driver driver; | ||
| 802 | |||
| 801 | /* return the rate of the card, or a negative value if it's blacklisted */ | 803 | /* return the rate of the card, or a negative value if it's blacklisted */ |
| 802 | static int __devinit snd_bt87x_detect_card(struct pci_dev *pci) | 804 | static int __devinit snd_bt87x_detect_card(struct pci_dev *pci) |
| 803 | { | 805 | { |
| 804 | int i; | 806 | int i; |
| 805 | const struct pci_device_id *supported; | 807 | const struct pci_device_id *supported; |
| 806 | 808 | ||
| 807 | supported = pci_match_device(snd_bt87x_ids, pci); | 809 | supported = pci_match_device(&driver, pci); |
| 808 | if (supported) | 810 | if (supported) |
| 809 | return supported->driver_data; | 811 | return supported->driver_data; |
| 810 | 812 | ||
