Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Automatic merge with /usr/src/ntfs-2.6.git.

+1409 -5039
+1 -1
Documentation/Changes
··· 57 57 o jfsutils 1.1.3 # fsck.jfs -V 58 58 o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs 59 59 o xfsprogs 2.6.0 # xfs_db -V 60 - o pcmciautils 001 60 + o pcmciautils 004 61 61 o pcmcia-cs 3.1.21 # cardmgr -V 62 62 o quota-tools 3.09 # quota -V 63 63 o PPP 2.4.0 # pppd --version
+2 -3
Documentation/pcmcia/devicetable.txt
··· 19 19 If the hash is incorrect, the kernel will inform you about this in "dmesg" 20 20 upon module initialization, and tell you of the correct hash. 21 21 22 - You can determine the hash of the product ID strings by running 23 - "pcmcia-modalias %n.%m" [%n being replaced with the socket number and %m being 24 - replaced with the device function] from pcmciautils. It generates a string 22 + You can determine the hash of the product ID strings by catting the file 23 + "modalias" in the sysfs directory of the PCMCIA device. It generates a string 25 24 in the following form: 26 25 pcmcia:m0149cC1ABf06pfn00fn00pa725B842DpbF1EFEE84pc0877B627pd00000000 27 26
+2
arch/alpha/kernel/irq_alpha.c
··· 55 55 #ifdef CONFIG_SMP 56 56 { 57 57 long cpu; 58 + 59 + local_irq_disable(); 58 60 smp_percpu_timer_interrupt(regs); 59 61 cpu = smp_processor_id(); 60 62 if (cpu != boot_cpuid) {
+1 -1
arch/alpha/kernel/traps.c
··· 240 240 siginfo_t info; 241 241 int signo, code; 242 242 243 - if (regs->ps == 0) { 243 + if ((regs->ps & ~IPL_MAX) == 0) { 244 244 if (type == 1) { 245 245 const unsigned int *data 246 246 = (const unsigned int *) regs->pc;
+1 -1
arch/arm/Makefile
··· 56 56 tune-$(CONFIG_CPU_V6) :=-mtune=strongarm 57 57 58 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 60 CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 61 61 AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 62 62
-803
arch/arm/configs/omnimeter_defconfig
··· 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
+8 -12
arch/arm/kernel/head.S
··· 344 344 str r6, [r0] 345 345 #endif 346 346 347 + #ifdef CONFIG_DEBUG_LL 347 348 bic r7, r7, #0x0c @ turn off cacheable 348 349 @ and bufferable bits 349 - #ifdef CONFIG_DEBUG_LL 350 350 /* 351 351 * Map in IO space for serial debugging. 352 352 * This allows debug messages to be output ··· 372 372 teq r1, #MACH_TYPE_NETWINDER 373 373 teqne r1, #MACH_TYPE_CATS 374 374 bne 1f 375 - add r0, r4, #0x3fc0 @ ff000000 376 - mov r3, #0x7c000000 377 - orr r3, r3, r7 378 - str r3, [r0], #4 379 - add r3, r3, #1 << 20 380 - str r3, [r0], #4 375 + add r0, r4, #0xff000000 >> 18 376 + orr r3, r7, #0x7c000000 377 + str r3, [r0] 381 378 1: 382 - #endif 383 379 #endif 384 380 #ifdef CONFIG_ARCH_RPC 385 381 /* ··· 383 387 * Similar reasons here - for debug. This is 384 388 * only for Acorn RiscPC architectures. 385 389 */ 386 - add r0, r4, #0x80 @ 02000000 387 - mov r3, #0x02000000 388 - orr r3, r3, r7 390 + add r0, r4, #0x02000000 >> 18 391 + orr r3, r7, #0x02000000 389 392 str r3, [r0] 390 - add r0, r4, #0x3600 @ d8000000 393 + add r0, r4, #0xd8000000 >> 18 391 394 str r3, [r0] 395 + #endif 392 396 #endif 393 397 mov pc, lr 394 398 .ltorg
+2 -10
arch/arm/kernel/traps.c
··· 230 230 do_exit(SIGSEGV); 231 231 } 232 232 233 - void die_if_kernel(const char *str, struct pt_regs *regs, int err) 234 - { 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) 233 + void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, 234 + unsigned long err, unsigned long trap) 243 235 { 244 236 if (user_mode(regs)) { 245 237 current->thread.error_code = err;
+6 -4
arch/arm/mach-aaec2000/aaed2000.c
··· 40 40 } 41 41 42 42 MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform") 43 - MAINTAINER("Nicolas Bellido Y Ortega") 44 - BOOT_MEM(0xf0000000, PIO_BASE, VIO_BASE) 45 - MAPIO(aaed2000_map_io) 46 - INITIRQ(aaed2000_init_irq) 43 + /* Maintainer: Nicolas Bellido Y Ortega */ 44 + .phys_ram = 0xf0000000, 45 + .phys_io = PIO_BASE, 46 + .io_pg_offst = ((VIO_BASE) >> 18) & 0xfffc, 47 + .map_io = aaed2000_map_io, 48 + .init_irq = aaed2000_init_irq, 47 49 .timer = &aaec2000_timer, 48 50 MACHINE_END
+7 -5
arch/arm/mach-clps711x/autcpu12.c
··· 59 59 } 60 60 61 61 MACHINE_START(AUTCPU12, "autronix autcpu12") 62 - MAINTAINER("Thomas Gleixner") 63 - BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 64 - BOOT_PARAMS(0xc0020000) 65 - MAPIO(autcpu12_map_io) 66 - INITIRQ(clps711x_init_irq) 62 + /* Maintainer: Thomas Gleixner */ 63 + .phys_ram = 0xc0000000, 64 + .phys_io = 0x80000000, 65 + .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, 66 + .boot_params = 0xc0020000, 67 + .map_io = autcpu12_map_io, 68 + .init_irq = clps711x_init_irq, 67 69 .timer = &clps711x_timer, 68 70 MACHINE_END 69 71
+7 -5
arch/arm/mach-clps711x/cdb89712.c
··· 49 49 } 50 50 51 51 MACHINE_START(CDB89712, "Cirrus-CDB89712") 52 - MAINTAINER("Ray Lehtiniemi") 53 - BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 54 - BOOT_PARAMS(0xc0000100) 55 - MAPIO(cdb89712_map_io) 56 - INITIRQ(clps711x_init_irq) 52 + /* Maintainer: Ray Lehtiniemi */ 53 + .phys_ram = 0xc0000000, 54 + .phys_io = 0x80000000, 55 + .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, 56 + .boot_params = 0xc0000100, 57 + .map_io = cdb89712_map_io, 58 + .init_irq = clps711x_init_irq, 57 59 .timer = &clps711x_timer, 58 60 MACHINE_END
+7 -5
arch/arm/mach-clps711x/ceiva.c
··· 53 53 54 54 55 55 MACHINE_START(CEIVA, "CEIVA/Polaroid Photo MAX Digital Picture Frame") 56 - MAINTAINER("Rob Scott") 57 - BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 58 - BOOT_PARAMS(0xc0000100) 59 - MAPIO(ceiva_map_io) 60 - INITIRQ(clps711x_init_irq) 56 + /* Maintainer: Rob Scott */ 57 + .phys_ram = 0xc0000000, 58 + .phys_io = 0x80000000, 59 + .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, 60 + .boot_params = 0xc0000100, 61 + .map_io = ceiva_map_io, 62 + .init_irq = clps711x_init_irq, 61 63 .timer = &clps711x_timer, 62 64 MACHINE_END
+8 -6
arch/arm/mach-clps711x/clep7312.c
··· 37 37 38 38 39 39 MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") 40 - MAINTAINER("Nobody") 41 - BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 42 - BOOT_PARAMS(0xc0000100) 43 - FIXUP(fixup_clep7312) 44 - MAPIO(clps711x_map_io) 45 - INITIRQ(clps711x_init_irq) 40 + /* Maintainer: Nobody */ 41 + .phys_ram = 0xc0000000, 42 + .phys_io = 0x80000000, 43 + .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, 44 + .boot_params = 0xc0000100, 45 + .fixup = fixup_clep7312, 46 + .map_io = clps711x_map_io, 47 + .init_irq = clps711x_init_irq, 46 48 .timer = &clps711x_timer, 47 49 MACHINE_END 48 50
+8 -6
arch/arm/mach-clps711x/edb7211-arch.c
··· 51 51 } 52 52 53 53 MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") 54 - MAINTAINER("Jon McClintock") 55 - BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 56 - BOOT_PARAMS(0xc0020100) /* 0xc0000000 - 0xc001ffff can be video RAM */ 57 - FIXUP(fixup_edb7211) 58 - MAPIO(edb7211_map_io) 59 - INITIRQ(clps711x_init_irq) 54 + /* Maintainer: Jon McClintock */ 55 + .phys_ram = 0xc0000000, 56 + .phys_io = 0x80000000, 57 + .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, 58 + .boot_params = 0xc0020100, /* 0xc0000000 - 0xc001ffff can be video RAM */ 59 + .fixup = fixup_edb7211, 60 + .map_io = edb7211_map_io, 61 + .init_irq = clps711x_init_irq, 60 62 .timer = &clps711x_timer, 61 63 MACHINE_END
+8 -6
arch/arm/mach-clps711x/fortunet.c
··· 75 75 } 76 76 77 77 MACHINE_START(FORTUNET, "ARM-FortuNet") 78 - MAINTAINER("FortuNet Inc.") 79 - BOOT_MEM(0xc0000000, 0x80000000, 0xf0000000) 80 - BOOT_PARAMS(0x00000000) 81 - FIXUP(fortunet_fixup) 82 - MAPIO(clps711x_map_io) 83 - INITIRQ(clps711x_init_irq) 78 + /* Maintainer: FortuNet Inc. */ 79 + .phys_ram = 0xc0000000, 80 + .phys_io = 0x80000000, 81 + .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc, 82 + .boot_params = 0x00000000, 83 + .fixup = fortunet_fixup, 84 + .map_io = clps711x_map_io, 85 + .init_irq = clps711x_init_irq, 84 86 .timer = &clps711x_timer, 85 87 MACHINE_END
+8 -6
arch/arm/mach-clps711x/p720t.c
··· 79 79 } 80 80 81 81 MACHINE_START(P720T, "ARM-Prospector720T") 82 - MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") 83 - BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 84 - BOOT_PARAMS(0xc0000100) 85 - FIXUP(fixup_p720t) 86 - MAPIO(p720t_map_io) 87 - INITIRQ(clps711x_init_irq) 82 + /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 83 + .phys_ram = 0xc0000000, 84 + .phys_io = 0x80000000, 85 + .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, 86 + .boot_params = 0xc0000100, 87 + .fixup = fixup_p720t, 88 + .map_io = p720t_map_io, 89 + .init_irq = clps711x_init_irq, 88 90 .timer = &clps711x_timer, 89 91 MACHINE_END 90 92
+8 -6
arch/arm/mach-clps7500/core.c
··· 366 366 } 367 367 368 368 MACHINE_START(CLPS7500, "CL-PS7500") 369 - MAINTAINER("Philip Blundell") 370 - BOOT_MEM(0x10000000, 0x03000000, 0xe0000000) 371 - MAPIO(clps7500_map_io) 372 - INITIRQ(clps7500_init_irq) 373 - .init_machine = clps7500_init, 374 - .timer = &clps7500_timer, 369 + /* Maintainer: Philip Blundell */ 370 + .phys_ram = 0x10000000, 371 + .phys_io = 0x03000000, 372 + .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, 373 + .map_io = clps7500_map_io, 374 + .init_irq = clps7500_init_irq, 375 + .init_machine = clps7500_init, 376 + .timer = &clps7500_timer, 375 377 MACHINE_END 376 378
+10 -8
arch/arm/mach-ebsa110/core.c
··· 233 233 arch_initcall(ebsa110_init); 234 234 235 235 MACHINE_START(EBSA110, "EBSA110") 236 - MAINTAINER("Russell King") 237 - BOOT_MEM(0x00000000, 0xe0000000, 0xe0000000) 238 - BOOT_PARAMS(0x00000400) 239 - DISABLE_PARPORT(0) 240 - DISABLE_PARPORT(2) 241 - SOFT_REBOOT 242 - MAPIO(ebsa110_map_io) 243 - INITIRQ(ebsa110_init_irq) 236 + /* Maintainer: Russell King */ 237 + .phys_ram = 0x00000000, 238 + .phys_io = 0xe0000000, 239 + .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, 240 + .boot_params = 0x00000400, 241 + .reserve_lp0 = 1, 242 + .reserve_lp2 = 1, 243 + .soft_reboot = 1, 244 + .map_io = ebsa110_map_io, 245 + .init_irq = ebsa110_init_irq, 244 246 .timer = &ebsa110_timer, 245 247 MACHINE_END
+6 -4
arch/arm/mach-epxa10db/arch.c
··· 63 63 extern struct sys_timer epxa10db_timer; 64 64 65 65 MACHINE_START(CAMELOT, "Altera Epxa10db") 66 - MAINTAINER("Altera Corporation") 67 - BOOT_MEM(0x00000000, 0x7fffc000, 0xffffc000) 68 - MAPIO(epxa10db_map_io) 69 - INITIRQ(epxa10db_init_irq) 66 + /* Maintainer: Altera Corporation */ 67 + .phys_ram = 0x00000000, 68 + .phys_io = 0x7fffc000, 69 + .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc, 70 + .map_io = epxa10db_map_io, 71 + .init_irq = epxa10db_init_irq, 70 72 .timer = &epxa10db_timer, 71 73 MACHINE_END 72 74
+9 -7
arch/arm/mach-footbridge/cats-hw.c
··· 84 84 } 85 85 86 86 MACHINE_START(CATS, "Chalice-CATS") 87 - MAINTAINER("Philip Blundell") 88 - BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) 89 - BOOT_PARAMS(0x00000100) 90 - SOFT_REBOOT 91 - FIXUP(fixup_cats) 92 - MAPIO(footbridge_map_io) 93 - INITIRQ(footbridge_init_irq) 87 + /* Maintainer: Philip Blundell */ 88 + .phys_ram = 0x00000000, 89 + .phys_io = DC21285_ARMCSR_BASE, 90 + .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc, 91 + .boot_params = 0x00000100, 92 + .soft_reboot = 1, 93 + .fixup = fixup_cats, 94 + .map_io = footbridge_map_io, 95 + .init_irq = footbridge_init_irq, 94 96 .timer = &isa_timer, 95 97 MACHINE_END
+7 -5
arch/arm/mach-footbridge/co285.c
··· 28 28 } 29 29 30 30 MACHINE_START(CO285, "co-EBSA285") 31 - MAINTAINER("Mark van Doesburg") 32 - BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0x7cf00000) 33 - FIXUP(fixup_coebsa285) 34 - MAPIO(footbridge_map_io) 35 - INITIRQ(footbridge_init_irq) 31 + /* Maintainer: Mark van Doesburg */ 32 + .phys_ram = 0x00000000, 33 + .phys_io = DC21285_ARMCSR_BASE, 34 + .io_pg_offst = ((0x7cf00000) >> 18) & 0xfffc, 35 + .fixup = fixup_coebsa285, 36 + .map_io = footbridge_map_io, 37 + .init_irq = footbridge_init_irq, 36 38 .timer = &footbridge_timer, 37 39 MACHINE_END 38 40
+9 -6
arch/arm/mach-footbridge/ebsa285.c
··· 13 13 #include "common.h" 14 14 15 15 MACHINE_START(EBSA285, "EBSA285") 16 - MAINTAINER("Russell King") 17 - BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) 18 - BOOT_PARAMS(0x00000100) 19 - VIDEO(0x000a0000, 0x000bffff) 20 - MAPIO(footbridge_map_io) 21 - INITIRQ(footbridge_init_irq) 16 + /* Maintainer: Russell King */ 17 + .phys_ram = 0x00000000, 18 + .phys_io = DC21285_ARMCSR_BASE, 19 + .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc, 20 + .boot_params = 0x00000100, 21 + .video_start = 0x000a0000, 22 + .video_end = 0x000bffff, 23 + .map_io = footbridge_map_io, 24 + .init_irq = footbridge_init_irq, 22 25 .timer = &footbridge_timer, 23 26 MACHINE_END 24 27
+12 -9
arch/arm/mach-footbridge/netwinder-hw.c
··· 647 647 } 648 648 649 649 MACHINE_START(NETWINDER, "Rebel-NetWinder") 650 - MAINTAINER("Russell King/Rebel.com") 651 - BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) 652 - BOOT_PARAMS(0x00000100) 653 - VIDEO(0x000a0000, 0x000bffff) 654 - DISABLE_PARPORT(0) 655 - DISABLE_PARPORT(2) 656 - FIXUP(fixup_netwinder) 657 - MAPIO(footbridge_map_io) 658 - INITIRQ(footbridge_init_irq) 650 + /* Maintainer: Russell King/Rebel.com */ 651 + .phys_ram = 0x00000000, 652 + .phys_io = DC21285_ARMCSR_BASE, 653 + .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc, 654 + .boot_params = 0x00000100, 655 + .video_start = 0x000a0000, 656 + .video_end = 0x000bffff, 657 + .reserve_lp0 = 1, 658 + .reserve_lp2 = 1, 659 + .fixup = fixup_netwinder, 660 + .map_io = footbridge_map_io, 661 + .init_irq = footbridge_init_irq, 659 662 .timer = &isa_timer, 660 663 MACHINE_END
+7 -5
arch/arm/mach-footbridge/personal.c
··· 13 13 #include "common.h" 14 14 15 15 MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer") 16 - MAINTAINER("Jamey Hicks / George France") 17 - BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) 18 - BOOT_PARAMS(0x00000100) 19 - MAPIO(footbridge_map_io) 20 - INITIRQ(footbridge_init_irq) 16 + /* Maintainer: Jamey Hicks / George France */ 17 + .phys_ram = 0x00000000, 18 + .phys_io = DC21285_ARMCSR_BASE, 19 + .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc, 20 + .boot_params = 0x00000100, 21 + .map_io = footbridge_map_io, 22 + .init_irq = footbridge_init_irq, 21 23 .timer = &footbridge_timer, 22 24 MACHINE_END 23 25
+8 -6
arch/arm/mach-h720x/h7201-eval.c
··· 30 30 #include "common.h" 31 31 32 32 MACHINE_START(H7201, "Hynix GMS30C7201") 33 - MAINTAINER("Robert Schwebel, Pengutronix") 34 - BOOT_MEM(0x40000000, 0x80000000, 0xf0000000) 35 - BOOT_PARAMS(0xc0001000) 36 - MAPIO(h720x_map_io) 37 - INITIRQ(h720x_init_irq) 38 - .timer = &h7201_timer, 33 + /* Maintainer: Robert Schwebel, Pengutronix */ 34 + .phys_ram = 0x40000000, 35 + .phys_io = 0x80000000, 36 + .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc, 37 + .boot_params = 0xc0001000, 38 + .map_io = h720x_map_io, 39 + .init_irq = h720x_init_irq, 40 + .timer = &h7201_timer, 39 41 MACHINE_END
+9 -7
arch/arm/mach-h720x/h7202-eval.c
··· 71 71 } 72 72 73 73 MACHINE_START(H7202, "Hynix HMS30C7202") 74 - MAINTAINER("Robert Schwebel, Pengutronix") 75 - BOOT_MEM(0x40000000, 0x80000000, 0xf0000000) 76 - BOOT_PARAMS(0x40000100) 77 - MAPIO(h720x_map_io) 78 - INITIRQ(h7202_init_irq) 79 - .timer = &h7202_timer, 80 - INIT_MACHINE(init_eval_h7202) 74 + /* Maintainer: Robert Schwebel, Pengutronix */ 75 + .phys_ram = 0x40000000, 76 + .phys_io = 0x80000000, 77 + .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc, 78 + .boot_params = 0x40000100, 79 + .map_io = h720x_map_io, 80 + .init_irq = h7202_init_irq, 81 + .timer = &h7202_timer, 82 + .init_machine = init_eval_h7202, 81 83 MACHINE_END
+8 -6
arch/arm/mach-imx/mx1ads.c
··· 78 78 } 79 79 80 80 MACHINE_START(MX1ADS, "Motorola MX1ADS") 81 - MAINTAINER("Sascha Hauer, Pengutronix") 82 - BOOT_MEM(0x08000000, 0x00200000, 0xe0200000) 83 - BOOT_PARAMS(0x08000100) 84 - MAPIO(mx1ads_map_io) 85 - INITIRQ(imx_init_irq) 81 + /* Maintainer: Sascha Hauer, Pengutronix */ 82 + .phys_ram = 0x08000000, 83 + .phys_io = 0x00200000, 84 + .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc, 85 + .boot_params = 0x08000100, 86 + .map_io = mx1ads_map_io, 87 + .init_irq = imx_init_irq, 86 88 .timer = &imx_timer, 87 - INIT_MACHINE(mx1ads_init) 89 + .init_machine = mx1ads_init, 88 90 MACHINE_END
+8 -6
arch/arm/mach-integrator/integrator_ap.c
··· 292 292 }; 293 293 294 294 MACHINE_START(INTEGRATOR, "ARM-Integrator") 295 - MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") 296 - BOOT_MEM(0x00000000, 0x16000000, 0xf1600000) 297 - BOOT_PARAMS(0x00000100) 298 - MAPIO(ap_map_io) 299 - INITIRQ(ap_init_irq) 295 + /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 296 + .phys_ram = 0x00000000, 297 + .phys_io = 0x16000000, 298 + .io_pg_offst = ((0xf1600000) >> 18) & 0xfffc, 299 + .boot_params = 0x00000100, 300 + .map_io = ap_map_io, 301 + .init_irq = ap_init_irq, 300 302 .timer = &ap_timer, 301 - INIT_MACHINE(ap_init) 303 + .init_machine = ap_init, 302 304 MACHINE_END
+8 -6
arch/arm/mach-integrator/integrator_cp.c
··· 532 532 }; 533 533 534 534 MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") 535 - MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") 536 - BOOT_MEM(0x00000000, 0x16000000, 0xf1600000) 537 - BOOT_PARAMS(0x00000100) 538 - MAPIO(intcp_map_io) 539 - INITIRQ(intcp_init_irq) 535 + /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 536 + .phys_ram = 0x00000000, 537 + .phys_io = 0x16000000, 538 + .io_pg_offst = ((0xf1600000) >> 18) & 0xfffc, 539 + .boot_params = 0x00000100, 540 + .map_io = intcp_map_io, 541 + .init_irq = intcp_init_irq, 540 542 .timer = &cp_timer, 541 - INIT_MACHINE(intcp_init) 543 + .init_machine = intcp_init, 542 544 MACHINE_END
+16 -12
arch/arm/mach-iop3xx/iop321-setup.c
··· 146 146 147 147 #if defined(CONFIG_ARCH_IQ80321) 148 148 MACHINE_START(IQ80321, "Intel IQ80321") 149 - MAINTAINER("Intel Corporation") 150 - BOOT_MEM(PHYS_OFFSET, IQ80321_UART, IQ80321_UART) 151 - MAPIO(iq80321_map_io) 152 - INITIRQ(iop321_init_irq) 149 + /* Maintainer: Intel Corporation */ 150 + .phys_ram = PHYS_OFFSET, 151 + .phys_io = IQ80321_UART, 152 + .io_pg_offst = ((IQ80321_UART) >> 18) & 0xfffc, 153 + .map_io = iq80321_map_io, 154 + .init_irq = iop321_init_irq, 153 155 .timer = &iop321_timer, 154 - BOOT_PARAMS(0xa0000100) 155 - INIT_MACHINE(iop32x_init) 156 + .boot_params = 0xa0000100, 157 + .init_machine = iop32x_init, 156 158 MACHINE_END 157 159 #elif defined(CONFIG_ARCH_IQ31244) 158 160 MACHINE_START(IQ31244, "Intel IQ31244") 159 - MAINTAINER("Intel Corp.") 160 - BOOT_MEM(PHYS_OFFSET, IQ31244_UART, IQ31244_UART) 161 - MAPIO(iq31244_map_io) 162 - INITIRQ(iop321_init_irq) 161 + /* Maintainer: Intel Corp. */ 162 + .phys_ram = PHYS_OFFSET, 163 + .phys_io = IQ31244_UART, 164 + .io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc, 165 + .map_io = iq31244_map_io, 166 + .init_irq = iop321_init_irq, 163 167 .timer = &iop321_timer, 164 - BOOT_PARAMS(0xa0000100) 165 - INIT_MACHINE(iop32x_init) 168 + .boot_params = 0xa0000100, 169 + .init_machine = iop32x_init, 166 170 MACHINE_END 167 171 #else 168 172 #error No machine descriptor defined for this IOP3XX implementation
+16 -14
arch/arm/mach-iop3xx/iop331-setup.c
··· 148 148 149 149 #if defined(CONFIG_ARCH_IQ80331) 150 150 MACHINE_START(IQ80331, "Intel IQ80331") 151 - MAINTAINER("Intel Corp.") 152 - BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical 153 - //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS) 154 - MAPIO(iq80331_map_io) 155 - INITIRQ(iop331_init_irq) 151 + /* Maintainer: Intel Corp. */ 152 + .phys_ram = PHYS_OFFSET, 153 + .phys_io = 0xfefff000, 154 + .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical 155 + .map_io = iq80331_map_io, 156 + .init_irq = iop331_init_irq, 156 157 .timer = &iop331_timer, 157 - BOOT_PARAMS(0x0100) 158 - INIT_MACHINE(iop33x_init) 158 + .boot_params = 0x0100, 159 + .init_machine = iop33x_init, 159 160 MACHINE_END 160 161 161 162 #elif defined(CONFIG_MACH_IQ80332) 162 163 MACHINE_START(IQ80332, "Intel IQ80332") 163 - MAINTAINER("Intel Corp.") 164 - BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical 165 - //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS) 166 - MAPIO(iq80332_map_io) 167 - INITIRQ(iop331_init_irq) 164 + /* Maintainer: Intel Corp. */ 165 + .phys_ram = PHYS_OFFSET, 166 + .phys_io = 0xfefff000, 167 + .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical 168 + .map_io = iq80332_map_io, 169 + .init_irq = iop331_init_irq, 168 170 .timer = &iop331_timer, 169 - BOOT_PARAMS(0x0100) 170 - INIT_MACHINE(iop33x_init) 171 + .boot_params = 0x0100, 172 + .init_machine = iop33x_init, 171 173 MACHINE_END 172 174 173 175 #else
+8 -6
arch/arm/mach-ixp2000/enp2611.c
··· 223 223 224 224 225 225 MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board") 226 - MAINTAINER("Lennert Buytenhek <buytenh@wantstofly.org>") 227 - BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) 228 - BOOT_PARAMS(0x00000100) 229 - MAPIO(ixp2000_map_io) 230 - INITIRQ(ixp2000_init_irq) 226 + /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ 227 + .phys_ram = 0x00000000, 228 + .phys_io = IXP2000_UART_PHYS_BASE, 229 + .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, 230 + .boot_params = 0x00000100, 231 + .map_io = ixp2000_map_io, 232 + .init_irq = ixp2000_init_irq, 231 233 .timer = &enp2611_timer, 232 - INIT_MACHINE(enp2611_init_machine) 234 + .init_machine = enp2611_init_machine, 233 235 MACHINE_END 234 236 235 237
+8 -6
arch/arm/mach-ixp2000/ixdp2400.c
··· 168 168 } 169 169 170 170 MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform") 171 - MAINTAINER("MontaVista Software, Inc.") 172 - BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) 173 - BOOT_PARAMS(0x00000100) 174 - MAPIO(ixdp2x00_map_io) 175 - INITIRQ(ixdp2400_init_irq) 171 + /* Maintainer: MontaVista Software, Inc. */ 172 + .phys_ram = 0x00000000, 173 + .phys_io = IXP2000_UART_PHYS_BASE, 174 + .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, 175 + .boot_params = 0x00000100, 176 + .map_io = ixdp2x00_map_io, 177 + .init_irq = ixdp2400_init_irq, 176 178 .timer = &ixdp2400_timer, 177 - INIT_MACHINE(ixdp2x00_init_machine) 179 + .init_machine = ixdp2x00_init_machine, 178 180 MACHINE_END 179 181
+8 -6
arch/arm/mach-ixp2000/ixdp2800.c
··· 284 284 } 285 285 286 286 MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform") 287 - MAINTAINER("MontaVista Software, Inc.") 288 - BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) 289 - BOOT_PARAMS(0x00000100) 290 - MAPIO(ixdp2x00_map_io) 291 - INITIRQ(ixdp2800_init_irq) 287 + /* Maintainer: MontaVista Software, Inc. */ 288 + .phys_ram = 0x00000000, 289 + .phys_io = IXP2000_UART_PHYS_BASE, 290 + .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, 291 + .boot_params = 0x00000100, 292 + .map_io = ixdp2x00_map_io, 293 + .init_irq = ixdp2800_init_irq, 292 294 .timer = &ixdp2800_timer, 293 - INIT_MACHINE(ixdp2x00_init_machine) 295 + .init_machine = ixdp2x00_init_machine, 294 296 MACHINE_END 295 297
+16 -12
arch/arm/mach-ixp2000/ixdp2x01.c
··· 375 375 376 376 #ifdef CONFIG_ARCH_IXDP2401 377 377 MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform") 378 - MAINTAINER("MontaVista Software, Inc.") 379 - BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) 380 - BOOT_PARAMS(0x00000100) 381 - MAPIO(ixdp2x01_map_io) 382 - INITIRQ(ixdp2x01_init_irq) 378 + /* Maintainer: MontaVista Software, Inc. */ 379 + .phys_ram = 0x00000000, 380 + .phys_io = IXP2000_UART_PHYS_BASE, 381 + .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, 382 + .boot_params = 0x00000100, 383 + .map_io = ixdp2x01_map_io, 384 + .init_irq = ixdp2x01_init_irq, 383 385 .timer = &ixdp2x01_timer, 384 - INIT_MACHINE(ixdp2x01_init_machine) 386 + .init_machine = ixdp2x01_init_machine, 385 387 MACHINE_END 386 388 #endif 387 389 388 390 #ifdef CONFIG_ARCH_IXDP2801 389 391 MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform") 390 - MAINTAINER("MontaVista Software, Inc.") 391 - BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) 392 - BOOT_PARAMS(0x00000100) 393 - MAPIO(ixdp2x01_map_io) 394 - INITIRQ(ixdp2x01_init_irq) 392 + /* Maintainer: MontaVista Software, Inc. */ 393 + .phys_ram = 0x00000000, 394 + .phys_io = IXP2000_UART_PHYS_BASE, 395 + .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc, 396 + .boot_params = 0x00000100, 397 + .map_io = ixdp2x01_map_io, 398 + .init_irq = ixdp2x01_init_irq, 395 399 .timer = &ixdp2x01_timer, 396 - INIT_MACHINE(ixdp2x01_init_machine) 400 + .init_machine = ixdp2x01_init_machine, 397 401 MACHINE_END 398 402 #endif 399 403
+16 -14
arch/arm/mach-ixp4xx/coyote-setup.c
··· 100 100 101 101 #ifdef CONFIG_ARCH_ADI_COYOTE 102 102 MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote") 103 - MAINTAINER("MontaVista Software, Inc.") 104 - BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 105 - IXP4XX_PERIPHERAL_BASE_VIRT) 106 - MAPIO(coyote_map_io) 107 - INITIRQ(ixp4xx_init_irq) 103 + /* Maintainer: MontaVista Software, Inc. */ 104 + .phys_ram = PHYS_OFFSET, 105 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 106 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 107 + .map_io = coyote_map_io, 108 + .init_irq = ixp4xx_init_irq, 108 109 .timer = &ixp4xx_timer, 109 - BOOT_PARAMS(0x0100) 110 - INIT_MACHINE(coyote_init) 110 + .boot_params = 0x0100, 111 + .init_machine = coyote_init, 111 112 MACHINE_END 112 113 #endif 113 114 ··· 118 117 */ 119 118 #ifdef CONFIG_MACH_IXDPG425 120 119 MACHINE_START(IXDPG425, "Intel IXDPG425") 121 - MAINTAINER("MontaVista Software, Inc.") 122 - BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 123 - IXP4XX_PERIPHERAL_BASE_VIRT) 124 - MAPIO(coyote_map_io) 125 - INITIRQ(ixp4xx_init_irq) 120 + /* Maintainer: MontaVista Software, Inc. */ 121 + .phys_ram = PHYS_OFFSET, 122 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 123 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 124 + .map_io = coyote_map_io, 125 + .init_irq = ixp4xx_init_irq, 126 126 .timer = &ixp4xx_timer, 127 - BOOT_PARAMS(0x0100) 128 - INIT_MACHINE(coyote_init) 127 + .boot_params = 0x0100, 128 + .init_machine = coyote_init, 129 129 MACHINE_END 130 130 #endif 131 131
+9 -8
arch/arm/mach-ixp4xx/gtwx5715-setup.c
··· 140 140 141 141 142 142 MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)") 143 - MAINTAINER("George Joseph") 144 - BOOT_MEM(PHYS_OFFSET, IXP4XX_UART2_BASE_PHYS, 145 - IXP4XX_UART2_BASE_VIRT) 146 - MAPIO(gtwx5715_map_io) 147 - INITIRQ(ixp4xx_init_irq) 148 - .timer = &ixp4xx_timer, 149 - BOOT_PARAMS(0x0100) 150 - INIT_MACHINE(gtwx5715_init) 143 + /* Maintainer: George Joseph */ 144 + .phys_ram = PHYS_OFFSET, 145 + .phys_io = IXP4XX_UART2_BASE_PHYS, 146 + .io_pg_offst = ((IXP4XX_UART2_BASE_VIRT) >> 18) & 0xfffc, 147 + .map_io = gtwx5715_map_io, 148 + .init_irq = ixp4xx_init_irq, 149 + .timer = &ixp4xx_timer, 150 + .boot_params = 0x0100, 151 + .init_machine = gtwx5715_init, 151 152 MACHINE_END 152 153 153 154
+32 -28
arch/arm/mach-ixp4xx/ixdp425-setup.c
··· 128 128 } 129 129 130 130 MACHINE_START(IXDP425, "Intel IXDP425 Development Platform") 131 - MAINTAINER("MontaVista Software, Inc.") 132 - BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 133 - IXP4XX_PERIPHERAL_BASE_VIRT) 134 - MAPIO(ixdp425_map_io) 135 - INITIRQ(ixp4xx_init_irq) 131 + /* Maintainer: MontaVista Software, Inc. */ 132 + .phys_ram = PHYS_OFFSET, 133 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 134 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 135 + .map_io = ixdp425_map_io, 136 + .init_irq = ixp4xx_init_irq, 136 137 .timer = &ixp4xx_timer, 137 - BOOT_PARAMS(0x0100) 138 - INIT_MACHINE(ixdp425_init) 138 + .boot_params = 0x0100, 139 + .init_machine = ixdp425_init, 139 140 MACHINE_END 140 141 141 142 MACHINE_START(IXDP465, "Intel IXDP465 Development Platform") 142 - MAINTAINER("MontaVista Software, Inc.") 143 - BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 144 - IXP4XX_PERIPHERAL_BASE_VIRT) 145 - MAPIO(ixdp425_map_io) 146 - INITIRQ(ixp4xx_init_irq) 143 + /* Maintainer: MontaVista Software, Inc. */ 144 + .phys_ram = PHYS_OFFSET, 145 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 146 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 147 + .map_io = ixdp425_map_io, 148 + .init_irq = ixp4xx_init_irq, 147 149 .timer = &ixp4xx_timer, 148 - BOOT_PARAMS(0x0100) 149 - INIT_MACHINE(ixdp425_init) 150 + .boot_params = 0x0100, 151 + .init_machine = ixdp425_init, 150 152 MACHINE_END 151 153 152 154 MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform") 153 - MAINTAINER("MontaVista Software, Inc.") 154 - BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 155 - IXP4XX_PERIPHERAL_BASE_VIRT) 156 - MAPIO(ixdp425_map_io) 157 - INITIRQ(ixp4xx_init_irq) 155 + /* Maintainer: MontaVista Software, Inc. */ 156 + .phys_ram = PHYS_OFFSET, 157 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 158 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 159 + .map_io = ixdp425_map_io, 160 + .init_irq = ixp4xx_init_irq, 158 161 .timer = &ixp4xx_timer, 159 - BOOT_PARAMS(0x0100) 160 - INIT_MACHINE(ixdp425_init) 162 + .boot_params = 0x0100, 163 + .init_machine = ixdp425_init, 161 164 MACHINE_END 162 165 163 166 /* ··· 171 168 */ 172 169 #ifdef CONFIG_ARCH_AVILA 173 170 MACHINE_START(AVILA, "Gateworks Avila Network Platform") 174 - MAINTAINER("Deepak Saxena <dsaxena@plexity.net>") 175 - BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 176 - IXP4XX_PERIPHERAL_BASE_VIRT) 177 - MAPIO(ixdp425_map_io) 178 - INITIRQ(ixp4xx_init_irq) 171 + /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */ 172 + .phys_ram = PHYS_OFFSET, 173 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, 174 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, 175 + .map_io = ixdp425_map_io, 176 + .init_irq = ixp4xx_init_irq, 179 177 .timer = &ixp4xx_timer, 180 - BOOT_PARAMS(0x0100) 181 - INIT_MACHINE(ixdp425_init) 178 + .boot_params = 0x0100, 179 + .init_machine = ixdp425_init, 182 180 MACHINE_END 183 181 #endif 184 182
+6 -4
arch/arm/mach-l7200/core.c
··· 81 81 } 82 82 83 83 MACHINE_START(L7200, "LinkUp Systems L7200") 84 - MAINTAINER("Steve Hill / Scott McConnell") 85 - BOOT_MEM(0xf0000000, 0x80040000, 0xd0000000) 86 - MAPIO(l7200_map_io) 87 - INITIRQ(l7200_init_irq) 84 + /* Maintainer: Steve Hill / Scott McConnell */ 85 + .phys_ram = 0xf0000000, 86 + .phys_io = 0x80040000, 87 + .io_pg_offst = ((0xd0000000) >> 18) & 0xfffc, 88 + .map_io = l7200_map_io, 89 + .init_irq = l7200_init_irq, 88 90 MACHINE_END 89 91
+7 -5
arch/arm/mach-lh7a40x/arch-kev7a400.c
··· 102 102 } 103 103 104 104 MACHINE_START (KEV7A400, "Sharp KEV7a400") 105 - MAINTAINER ("Marc Singer") 106 - BOOT_MEM (0xc0000000, 0x80000000, io_p2v (0x80000000)) 107 - BOOT_PARAMS (0xc0000100) 108 - MAPIO (kev7a400_map_io) 109 - INITIRQ (lh7a400_init_irq) 105 + /* Maintainer: Marc Singer */ 106 + .phys_ram = 0xc0000000, 107 + .phys_io = 0x80000000, 108 + .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc, 109 + .boot_params = 0xc0000100, 110 + .map_io = kev7a400_map_io, 111 + .init_irq = lh7a400_init_irq, 110 112 .timer = &lh7a40x_timer, 111 113 MACHINE_END
+16 -12
arch/arm/mach-lh7a40x/arch-lpd7a40x.c
··· 260 260 #ifdef CONFIG_MACH_LPD7A400 261 261 262 262 MACHINE_START (LPD7A400, "Logic Product Development LPD7A400-10") 263 - MAINTAINER ("Marc Singer") 264 - BOOT_MEM (0xc0000000, 0x80000000, io_p2v (0x80000000)) 265 - BOOT_PARAMS (0xc0000100) 266 - MAPIO (lpd7a400_map_io) 267 - INITIRQ (lh7a400_init_irq) 263 + /* Maintainer: Marc Singer */ 264 + .phys_ram = 0xc0000000, 265 + .phys_io = 0x80000000, 266 + .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc, 267 + .boot_params = 0xc0000100, 268 + .map_io = lpd7a400_map_io, 269 + .init_irq = lh7a400_init_irq, 268 270 .timer = &lh7a40x_timer, 269 - INIT_MACHINE (lpd7a40x_init) 271 + .init_machine = lpd7a40x_init, 270 272 MACHINE_END 271 273 272 274 #endif ··· 276 274 #ifdef CONFIG_MACH_LPD7A404 277 275 278 276 MACHINE_START (LPD7A404, "Logic Product Development LPD7A404-10") 279 - MAINTAINER ("Marc Singer") 280 - BOOT_MEM (0xc0000000, 0x80000000, io_p2v (0x80000000)) 281 - BOOT_PARAMS (0xc0000100) 282 - MAPIO (lpd7a400_map_io) 283 - INITIRQ (lh7a404_init_irq) 277 + /* Maintainer: Marc Singer */ 278 + .phys_ram = 0xc0000000, 279 + .phys_io = 0x80000000, 280 + .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc, 281 + .boot_params = 0xc0000100, 282 + .map_io = lpd7a400_map_io, 283 + .init_irq = lh7a404_init_irq, 284 284 .timer = &lh7a40x_timer, 285 - INIT_MACHINE (lpd7a40x_init) 285 + .init_machine = lpd7a40x_init, 286 286 MACHINE_END 287 287 288 288 #endif
+8 -6
arch/arm/mach-omap/board-generic.c
··· 88 88 } 89 89 90 90 MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") 91 - MAINTAINER("Tony Lindgren <tony@atomide.com>") 92 - BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 93 - BOOT_PARAMS(0x10000100) 94 - MAPIO(omap_generic_map_io) 95 - INITIRQ(omap_generic_init_irq) 96 - INIT_MACHINE(omap_generic_init) 91 + /* Maintainer: Tony Lindgren <tony@atomide.com> */ 92 + .phys_ram = 0x10000000, 93 + .phys_io = 0xfff00000, 94 + .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, 95 + .boot_params = 0x10000100, 96 + .map_io = omap_generic_map_io, 97 + .init_irq = omap_generic_init_irq, 98 + .init_machine = omap_generic_init, 97 99 .timer = &omap_timer, 98 100 MACHINE_END
+8 -6
arch/arm/mach-omap/board-h2.c
··· 177 177 } 178 178 179 179 MACHINE_START(OMAP_H2, "TI-H2") 180 - MAINTAINER("Imre Deak <imre.deak@nokia.com>") 181 - BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 182 - BOOT_PARAMS(0x10000100) 183 - MAPIO(h2_map_io) 184 - INITIRQ(h2_init_irq) 185 - INIT_MACHINE(h2_init) 180 + /* Maintainer: Imre Deak <imre.deak@nokia.com> */ 181 + .phys_ram = 0x10000000, 182 + .phys_io = 0xfff00000, 183 + .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, 184 + .boot_params = 0x10000100, 185 + .map_io = h2_map_io, 186 + .init_irq = h2_init_irq, 187 + .init_machine = h2_init, 186 188 .timer = &omap_timer, 187 189 MACHINE_END
+8 -6
arch/arm/mach-omap/board-h3.c
··· 195 195 } 196 196 197 197 MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") 198 - MAINTAINER("Texas Instruments, Inc.") 199 - BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 200 - BOOT_PARAMS(0x10000100) 201 - MAPIO(h3_map_io) 202 - INITIRQ(h3_init_irq) 203 - INIT_MACHINE(h3_init) 198 + /* Maintainer: Texas Instruments, Inc. */ 199 + .phys_ram = 0x10000000, 200 + .phys_io = 0xfff00000, 201 + .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, 202 + .boot_params = 0x10000100, 203 + .map_io = h3_map_io, 204 + .init_irq = h3_init_irq, 205 + .init_machine = h3_init, 204 206 .timer = &omap_timer, 205 207 MACHINE_END
+8 -6
arch/arm/mach-omap/board-innovator.c
··· 270 270 } 271 271 272 272 MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") 273 - MAINTAINER("MontaVista Software, Inc.") 274 - BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 275 - BOOT_PARAMS(0x10000100) 276 - MAPIO(innovator_map_io) 277 - INITIRQ(innovator_init_irq) 278 - INIT_MACHINE(innovator_init) 273 + /* Maintainer: MontaVista Software, Inc. */ 274 + .phys_ram = 0x10000000, 275 + .phys_io = 0xfff00000, 276 + .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, 277 + .boot_params = 0x10000100, 278 + .map_io = innovator_map_io, 279 + .init_irq = innovator_init_irq, 280 + .init_machine = innovator_init, 279 281 .timer = &omap_timer, 280 282 MACHINE_END
+9 -7
arch/arm/mach-omap/board-netstar.c
··· 141 141 postcore_initcall(netstar_late_init); 142 142 143 143 MACHINE_START(NETSTAR, "NetStar OMAP5910") 144 - MAINTAINER("Ladislav Michl <michl@2n.cz>") 145 - BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 146 - BOOT_PARAMS(0x10000100) 147 - MAPIO(netstar_map_io) 148 - INITIRQ(netstar_init_irq) 149 - INIT_MACHINE(netstar_init) 150 - .timer = &omap_timer, 144 + /* Maintainer: Ladislav Michl <michl@2n.cz> */ 145 + .phys_ram = 0x10000000, 146 + .phys_io = 0xfff00000, 147 + .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, 148 + .boot_params = 0x10000100, 149 + .map_io = netstar_map_io, 150 + .init_irq = netstar_init_irq, 151 + .init_machine = netstar_init, 152 + .timer = &omap_timer, 151 153 MACHINE_END
+8 -6
arch/arm/mach-omap/board-osk.c
··· 159 159 } 160 160 161 161 MACHINE_START(OMAP_OSK, "TI-OSK") 162 - MAINTAINER("Dirk Behme <dirk.behme@de.bosch.com>") 163 - BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 164 - BOOT_PARAMS(0x10000100) 165 - MAPIO(osk_map_io) 166 - INITIRQ(osk_init_irq) 167 - INIT_MACHINE(osk_init) 162 + /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */ 163 + .phys_ram = 0x10000000, 164 + .phys_io = 0xfff00000, 165 + .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, 166 + .boot_params = 0x10000100, 167 + .map_io = osk_map_io, 168 + .init_irq = osk_init_irq, 169 + .init_machine = osk_init, 168 170 .timer = &omap_timer, 169 171 MACHINE_END
+8 -6
arch/arm/mach-omap/board-perseus2.c
··· 179 179 } 180 180 181 181 MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") 182 - MAINTAINER("Kevin Hilman <kjh@hilman.org>") 183 - BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 184 - BOOT_PARAMS(0x10000100) 185 - MAPIO(omap_perseus2_map_io) 186 - INITIRQ(omap_perseus2_init_irq) 187 - INIT_MACHINE(omap_perseus2_init) 182 + /* Maintainer: Kevin Hilman <kjh@hilman.org> */ 183 + .phys_ram = 0x10000000, 184 + .phys_io = 0xfff00000, 185 + .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, 186 + .boot_params = 0x10000100, 187 + .map_io = omap_perseus2_map_io, 188 + .init_irq = omap_perseus2_init_irq, 189 + .init_machine = omap_perseus2_init, 188 190 .timer = &omap_timer, 189 191 MACHINE_END
+9 -7
arch/arm/mach-omap/board-voiceblue.c
··· 246 246 EXPORT_SYMBOL(voiceblue_wdt_ping); 247 247 248 248 MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") 249 - MAINTAINER("Ladislav Michl <michl@2n.cz>") 250 - BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 251 - BOOT_PARAMS(0x10000100) 252 - MAPIO(voiceblue_map_io) 253 - INITIRQ(voiceblue_init_irq) 254 - INIT_MACHINE(voiceblue_init) 255 - .timer = &omap_timer, 249 + /* Maintainer: Ladislav Michl <michl@2n.cz> */ 250 + .phys_ram = 0x10000000, 251 + .phys_io = 0xfff00000, 252 + .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, 253 + .boot_params = 0x10000100, 254 + .map_io = voiceblue_map_io, 255 + .init_irq = voiceblue_init_irq, 256 + .init_machine = voiceblue_init, 257 + .timer = &omap_timer, 256 258 MACHINE_END
-1
arch/arm/mach-omap/usb.c
··· 41 41 42 42 /* These routines should handle the standard chip-specific modes 43 43 * for usb0/1/2 ports, covering basic mux and transceiver setup. 44 - * Call omap_usb_init() once, from INIT_MACHINE(). 45 44 * 46 45 * Some board-*.c files will need to set up additional mux options, 47 46 * like for suspend handling, vbus sensing, GPIOs, and the D+ pullup.
+4
arch/arm/mach-pxa/Makefile
··· 24 24 25 25 # Misc features 26 26 obj-$(CONFIG_PM) += pm.o sleep.o 27 + 28 + ifeq ($(CONFIG_PXA27x),y) 29 + obj-$(CONFIG_PM) += standby.o 30 + endif
+24 -18
arch/arm/mach-pxa/corgi.c
··· 287 287 288 288 #ifdef CONFIG_MACH_CORGI 289 289 MACHINE_START(CORGI, "SHARP Corgi") 290 - BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 291 - FIXUP(fixup_corgi) 292 - MAPIO(corgi_map_io) 293 - INITIRQ(corgi_init_irq) 294 - .init_machine = corgi_init, 295 - .timer = &pxa_timer, 290 + .phys_ram = 0xa0000000, 291 + .phys_io = 0x40000000, 292 + .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc,) 293 + .fixup = fixup_corgi, 294 + .map_io = corgi_map_io, 295 + .init_irq = corgi_init_irq, 296 + .init_machine = corgi_init, 297 + .timer = &pxa_timer, 296 298 MACHINE_END 297 299 #endif 298 300 299 301 #ifdef CONFIG_MACH_SHEPHERD 300 302 MACHINE_START(SHEPHERD, "SHARP Shepherd") 301 - BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 302 - FIXUP(fixup_corgi) 303 - MAPIO(corgi_map_io) 304 - INITIRQ(corgi_init_irq) 305 - .init_machine = corgi_init, 306 - .timer = &pxa_timer, 303 + .phys_ram = 0xa0000000, 304 + .phys_io = 0x40000000, 305 + .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc,) 306 + .fixup = fixup_corgi, 307 + .map_io = corgi_map_io, 308 + .init_irq = corgi_init_irq, 309 + .init_machine = corgi_init, 310 + .timer = &pxa_timer, 307 311 MACHINE_END 308 312 #endif 309 313 310 314 #ifdef CONFIG_MACH_HUSKY 311 315 MACHINE_START(HUSKY, "SHARP Husky") 312 - BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 313 - FIXUP(fixup_corgi) 314 - MAPIO(corgi_map_io) 315 - INITIRQ(corgi_init_irq) 316 - .init_machine = corgi_init, 317 - .timer = &pxa_timer, 316 + .phys_ram = 0xa0000000, 317 + .phys_io = 0x40000000, 318 + .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc,) 319 + .fixup = fixup_corgi, 320 + .map_io = corgi_map_io, 321 + .init_irq = corgi_init_irq, 322 + .init_machine = corgi_init, 323 + .timer = &pxa_timer, 318 324 MACHINE_END 319 325 #endif 320 326
+7 -5
arch/arm/mach-pxa/idp.c
··· 181 181 182 182 183 183 MACHINE_START(PXA_IDP, "Vibren PXA255 IDP") 184 - MAINTAINER("Vibren Technologies") 185 - BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 186 - MAPIO(idp_map_io) 187 - INITIRQ(idp_init_irq) 184 + /* Maintainer: Vibren Technologies */ 185 + .phys_ram = 0xa0000000, 186 + .phys_io = 0x40000000, 187 + .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc,) 188 + .map_io = idp_map_io, 189 + .init_irq = idp_init_irq, 188 190 .timer = &pxa_timer, 189 - INIT_MACHINE(idp_init) 191 + .init_machine = idp_init, 190 192 MACHINE_END
+7 -5
arch/arm/mach-pxa/lubbock.c
··· 268 268 } 269 269 270 270 MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)") 271 - MAINTAINER("MontaVista Software Inc.") 272 - BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 273 - MAPIO(lubbock_map_io) 274 - INITIRQ(lubbock_init_irq) 271 + /* Maintainer: MontaVista Software Inc. */ 272 + .phys_ram = 0xa0000000, 273 + .phys_io = 0x40000000, 274 + .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc,) 275 + .map_io = lubbock_map_io, 276 + .init_irq = lubbock_init_irq, 275 277 .timer = &pxa_timer, 276 - INIT_MACHINE(lubbock_init) 278 + .init_machine = lubbock_init, 277 279 MACHINE_END
+7 -5
arch/arm/mach-pxa/mainstone.c
··· 345 345 } 346 346 347 347 MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") 348 - MAINTAINER("MontaVista Software Inc.") 349 - BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 350 - MAPIO(mainstone_map_io) 351 - INITIRQ(mainstone_init_irq) 348 + /* Maintainer: MontaVista Software Inc. */ 349 + .phys_ram = 0xa0000000, 350 + .phys_io = 0x40000000, 351 + .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc,) 352 + .map_io = mainstone_map_io, 353 + .init_irq = mainstone_init_irq, 352 354 .timer = &pxa_timer, 353 - INIT_MACHINE(mainstone_init) 355 + .init_machine = mainstone_init, 354 356 MACHINE_END
+8 -6
arch/arm/mach-pxa/poodle.c
··· 180 180 } 181 181 182 182 MACHINE_START(POODLE, "SHARP Poodle") 183 - BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 184 - FIXUP(fixup_poodle) 185 - MAPIO(poodle_map_io) 186 - INITIRQ(pxa_init_irq) 187 - .timer = &pxa_timer, 188 - .init_machine = poodle_init, 183 + .phys_ram = 0xa0000000, 184 + .phys_io = 0x40000000, 185 + .io_pg_offst = ((io_p2v(0x40000000) >> 18) & 0xfffc,) 186 + .fixup = fixup_poodle, 187 + .map_io = poodle_map_io, 188 + .init_irq = pxa_init_irq, 189 + .timer = &pxa_timer, 190 + .init_machine = poodle_init, 189 191 MACHINE_END
+8 -1
arch/arm/mach-pxa/pxa27x.c
··· 126 126 { 127 127 switch (state) { 128 128 case PM_SUSPEND_MEM: 129 + case PM_SUSPEND_STANDBY: 129 130 return 0; 130 131 default: 131 132 return -EINVAL; ··· 139 138 extern void pxa_cpu_suspend(unsigned int); 140 139 extern void pxa_cpu_resume(void); 141 140 142 - CKEN = CKEN22_MEMC | CKEN9_OSTIMER; 141 + if (state == PM_SUSPEND_STANDBY) 142 + CKEN = CKEN22_MEMC | CKEN9_OSTIMER | CKEN16_LCD |CKEN0_PWM0; 143 + else 144 + CKEN = CKEN22_MEMC | CKEN9_OSTIMER; 143 145 144 146 /* ensure voltage-change sequencer not initiated, which hangs */ 145 147 PCFR &= ~PCFR_FVC; ··· 151 147 PEDR = 0xDF12FE1B; 152 148 153 149 switch (state) { 150 + case PM_SUSPEND_STANDBY: 151 + pxa_cpu_standby(); 152 + break; 154 153 case PM_SUSPEND_MEM: 155 154 /* set resume return address */ 156 155 PSPR = virt_to_phys(pxa_cpu_resume);
+32
arch/arm/mach-pxa/standby.S
··· 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
+9 -7
arch/arm/mach-rpc/riscpc.c
··· 163 163 extern struct sys_timer ioc_timer; 164 164 165 165 MACHINE_START(RISCPC, "Acorn-RiscPC") 166 - MAINTAINER("Russell King") 167 - BOOT_MEM(0x10000000, 0x03000000, 0xe0000000) 168 - BOOT_PARAMS(0x10000100) 169 - DISABLE_PARPORT(0) 170 - DISABLE_PARPORT(1) 171 - MAPIO(rpc_map_io) 172 - INITIRQ(rpc_init_irq) 166 + /* Maintainer: Russell King */ 167 + .phys_ram = 0x10000000, 168 + .phys_io = 0x03000000, 169 + .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, 170 + .boot_params = 0x10000100, 171 + .reserve_lp0 = 1, 172 + .reserve_lp1 = 1, 173 + .map_io = rpc_map_io, 174 + .init_irq = rpc_init_irq, 173 175 .timer = &ioc_timer, 174 176 MACHINE_END
+5 -4
arch/arm/mach-s3c2410/mach-bast.c
··· 407 407 408 408 409 409 MACHINE_START(BAST, "Simtec-BAST") 410 - MAINTAINER("Ben Dooks <ben@simtec.co.uk>") 411 - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 412 - BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 413 - 410 + /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ 411 + .phys_ram = S3C2410_SDRAM_PA, 412 + .phys_io = S3C2410_PA_UART, 413 + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 414 + .boot_params = S3C2410_SDRAM_PA + 0x100, 414 415 .map_io = bast_map_io, 415 416 .init_irq = s3c24xx_init_irq, 416 417 .timer = &s3c24xx_timer,
+7 -5
arch/arm/mach-s3c2410/mach-h1940.c
··· 117 117 } 118 118 119 119 MACHINE_START(H1940, "IPAQ-H1940") 120 - MAINTAINER("Ben Dooks <ben@fluff.org>") 121 - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 122 - BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 123 - MAPIO(h1940_map_io) 124 - INITIRQ(h1940_init_irq) 120 + /* Maintainer: Ben Dooks <ben@fluff.org> */ 121 + .phys_ram = S3C2410_SDRAM_PA, 122 + .phys_io = S3C2410_PA_UART, 123 + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 124 + .boot_params = S3C2410_SDRAM_PA + 0x100, 125 + .map_io = h1940_map_io, 126 + .init_irq = h1940_init_irq, 125 127 .timer = &s3c24xx_timer, 126 128 MACHINE_END
+5 -4
arch/arm/mach-s3c2410/mach-n30.c
··· 137 137 } 138 138 139 139 MACHINE_START(N30, "Acer-N30") 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) 142 - BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 143 - 140 + /* Maintainer: Christer Weinigel <christer@weinigel.se>, Ben Dooks <ben-linux@fluff.org> */ 141 + .phys_ram = S3C2410_SDRAM_PA, 142 + .phys_io = S3C2410_PA_UART, 143 + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 144 + .boot_params = S3C2410_SDRAM_PA + 0x100, 144 145 .timer = &s3c24xx_timer, 145 146 .init_machine = n30_init, 146 147 .init_irq = n30_init_irq,
+5 -3
arch/arm/mach-s3c2410/mach-nexcoder.c
··· 147 147 148 148 149 149 MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") 150 - MAINTAINER("Guillaume GOURAT <guillaume.gourat@nexvision.tv>") 151 - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 152 - BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 150 + /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */ 151 + .phys_ram = S3C2410_SDRAM_PA, 152 + .phys_io = S3C2410_PA_UART, 153 + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 154 + .boot_params = S3C2410_SDRAM_PA + 0x100, 153 155 .map_io = nexcoder_map_io, 154 156 .init_irq = s3c24xx_init_irq, 155 157 .timer = &s3c24xx_timer,
+5 -3
arch/arm/mach-s3c2410/mach-otom.c
··· 115 115 116 116 117 117 MACHINE_START(OTOM, "Nex Vision - Otom 1.1") 118 - MAINTAINER("Guillaume GOURAT <guillaume.gourat@nexvision.tv>") 119 - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 120 - BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 118 + /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */ 119 + .phys_ram = S3C2410_SDRAM_PA, 120 + .phys_io = S3C2410_PA_UART, 121 + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 122 + .boot_params = S3C2410_SDRAM_PA + 0x100, 121 123 .map_io = otom11_map_io, 122 124 .init_irq = s3c24xx_init_irq, 123 125 .timer = &s3c24xx_timer,
+8 -6
arch/arm/mach-s3c2410/mach-rx3715.c
··· 131 131 #endif 132 132 133 133 MACHINE_START(RX3715, "IPAQ-RX3715") 134 - MAINTAINER("Ben Dooks <ben@fluff.org>") 135 - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 136 - BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 137 - MAPIO(rx3715_map_io) 138 - INITIRQ(rx3715_init_irq) 139 - INIT_MACHINE(rx3715_init_machine) 134 + /* Maintainer: Ben Dooks <ben@fluff.org> */ 135 + .phys_ram = S3C2410_SDRAM_PA, 136 + .phys_io = S3C2410_PA_UART, 137 + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 138 + .boot_params = S3C2410_SDRAM_PA + 0x100, 139 + .map_io = rx3715_map_io, 140 + .init_irq = rx3715_init_irq, 141 + .init_machine = rx3715_init_machine, 140 142 .timer = &s3c24xx_timer, 141 143 MACHINE_END
+7 -5
arch/arm/mach-s3c2410/mach-smdk2410.c
··· 112 112 113 113 MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch 114 114 * to SMDK2410 */ 115 - MAINTAINER("Jonas Dietsche") 116 - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 117 - BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 118 - MAPIO(smdk2410_map_io) 119 - INITIRQ(smdk2410_init_irq) 115 + /* Maintainer: Jonas Dietsche */ 116 + .phys_ram = S3C2410_SDRAM_PA, 117 + .phys_io = S3C2410_PA_UART, 118 + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 119 + .boot_params = S3C2410_SDRAM_PA + 0x100, 120 + .map_io = smdk2410_map_io, 121 + .init_irq = smdk2410_init_irq, 120 122 .timer = &s3c24xx_timer, 121 123 MACHINE_END 122 124
+5 -3
arch/arm/mach-s3c2410/mach-smdk2440.c
··· 124 124 } 125 125 126 126 MACHINE_START(S3C2440, "SMDK2440") 127 - MAINTAINER("Ben Dooks <ben@fluff.org>") 128 - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 129 - BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 127 + /* Maintainer: Ben Dooks <ben@fluff.org> */ 128 + .phys_ram = S3C2410_SDRAM_PA, 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 133 .init_irq = s3c24xx_init_irq, 132 134 .map_io = smdk2440_map_io,
+5 -3
arch/arm/mach-s3c2410/mach-vr1000.c
··· 373 373 374 374 375 375 MACHINE_START(VR1000, "Thorcom-VR1000") 376 - MAINTAINER("Ben Dooks <ben@simtec.co.uk>") 377 - BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 378 - BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 376 + /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ 377 + .phys_ram = S3C2410_SDRAM_PA, 378 + .phys_io = S3C2410_PA_UART, 379 + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 380 + .boot_params = S3C2410_SDRAM_PA + 0x100, 379 381 .map_io = vr1000_map_io, 380 382 .init_irq = s3c24xx_init_irq, 381 383 .timer = &s3c24xx_timer,
+7 -5
arch/arm/mach-sa1100/assabet.c
··· 431 431 432 432 433 433 MACHINE_START(ASSABET, "Intel-Assabet") 434 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 435 - BOOT_PARAMS(0xc0000100) 436 - FIXUP(fixup_assabet) 437 - MAPIO(assabet_map_io) 438 - INITIRQ(sa1100_init_irq) 434 + .phys_ram = 0xc0000000, 435 + .phys_io = 0x80000000, 436 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 437 + .boot_params = 0xc0000100, 438 + .fixup = fixup_assabet, 439 + .map_io = assabet_map_io, 440 + .init_irq = sa1100_init_irq, 439 441 .timer = &sa1100_timer, 440 442 .init_machine = assabet_init, 441 443 MACHINE_END
+6 -4
arch/arm/mach-sa1100/badge4.c
··· 285 285 } 286 286 287 287 MACHINE_START(BADGE4, "Hewlett-Packard Laboratories BadgePAD 4") 288 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 289 - BOOT_PARAMS(0xc0000100) 290 - MAPIO(badge4_map_io) 291 - INITIRQ(sa1100_init_irq) 288 + .phys_ram = 0xc0000000, 289 + .phys_io = 0x80000000, 290 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 291 + .boot_params = 0xc0000100, 292 + .map_io = badge4_map_io, 293 + .init_irq = sa1100_init_irq, 292 294 .timer = &sa1100_timer, 293 295 MACHINE_END
+6 -4
arch/arm/mach-sa1100/cerf.c
··· 123 123 } 124 124 125 125 MACHINE_START(CERF, "Intrinsyc CerfBoard/CerfCube") 126 - MAINTAINER("support@intrinsyc.com") 127 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 128 - MAPIO(cerf_map_io) 129 - INITIRQ(cerf_init_irq) 126 + /* Maintainer: support@intrinsyc.com */ 127 + .phys_ram = 0xc0000000, 128 + .phys_io = 0x80000000, 129 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 130 + .map_io = cerf_map_io, 131 + .init_irq = cerf_init_irq, 130 132 .timer = &sa1100_timer, 131 133 .init_machine = cerf_init, 132 134 MACHINE_END
+5 -3
arch/arm/mach-sa1100/collie.c
··· 184 184 } 185 185 186 186 MACHINE_START(COLLIE, "Sharp-Collie") 187 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 188 - MAPIO(collie_map_io) 189 - INITIRQ(sa1100_init_irq) 187 + .phys_ram = 0xc0000000, 188 + .phys_io = 0x80000000, 189 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 190 + .map_io = collie_map_io, 191 + .init_irq = sa1100_init_irq, 190 192 .timer = &sa1100_timer, 191 193 .init_machine = collie_init, 192 194 MACHINE_END
+1 -2
arch/arm/mach-sa1100/cpu-sa1110.c
··· 271 271 */ 272 272 sdram_set_refresh(2); 273 273 if (!irqs_disabled()) { 274 - set_current_state(TASK_UNINTERRUPTIBLE); 275 - schedule_timeout(20 * HZ / 1000); 274 + msleep(20); 276 275 } else { 277 276 mdelay(20); 278 277 }
+18 -12
arch/arm/mach-sa1100/h3600.c
··· 380 380 } 381 381 382 382 MACHINE_START(H3100, "Compaq iPAQ H3100") 383 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 384 - BOOT_PARAMS(0xc0000100) 385 - MAPIO(h3100_map_io) 386 - INITIRQ(sa1100_init_irq) 383 + .phys_ram = 0xc0000000, 384 + .phys_io = 0x80000000, 385 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 386 + .boot_params = 0xc0000100, 387 + .map_io = h3100_map_io, 388 + .init_irq = sa1100_init_irq, 387 389 .timer = &sa1100_timer, 388 390 .init_machine = h3xxx_mach_init, 389 391 MACHINE_END ··· 498 496 } 499 497 500 498 MACHINE_START(H3600, "Compaq iPAQ H3600") 501 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 502 - BOOT_PARAMS(0xc0000100) 503 - MAPIO(h3600_map_io) 504 - INITIRQ(sa1100_init_irq) 499 + .phys_ram = 0xc0000000, 500 + .phys_io = 0x80000000, 501 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 502 + .boot_params = 0xc0000100, 503 + .map_io = h3600_map_io, 504 + .init_irq = sa1100_init_irq, 505 505 .timer = &sa1100_timer, 506 506 .init_machine = h3xxx_mach_init, 507 507 MACHINE_END ··· 885 881 } 886 882 887 883 MACHINE_START(H3800, "Compaq iPAQ H3800") 888 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 889 - BOOT_PARAMS(0xc0000100) 890 - MAPIO(h3800_map_io) 891 - INITIRQ(h3800_init_irq) 884 + .phys_ram = 0xc0000000, 885 + .phys_io = 0x80000000, 886 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 887 + .boot_params = 0xc0000100, 888 + .map_io = h3800_map_io, 889 + .init_irq = h3800_init_irq, 892 890 .timer = &sa1100_timer, 893 891 .init_machine = h3xxx_mach_init, 894 892 MACHINE_END
+6 -4
arch/arm/mach-sa1100/hackkit.c
··· 191 191 */ 192 192 193 193 MACHINE_START(HACKKIT, "HackKit Cpu Board") 194 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 195 - BOOT_PARAMS(0xc0000100) 196 - MAPIO(hackkit_map_io) 197 - INITIRQ(sa1100_init_irq) 194 + .phys_ram = 0xc0000000, 195 + .phys_io = 0x80000000, 196 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 197 + .boot_params = 0xc0000100, 198 + .map_io = hackkit_map_io, 199 + .init_irq = sa1100_init_irq, 198 200 .timer = &sa1100_timer, 199 201 .init_machine = hackkit_init, 200 202 MACHINE_END
+6 -4
arch/arm/mach-sa1100/jornada720.c
··· 97 97 } 98 98 99 99 MACHINE_START(JORNADA720, "HP Jornada 720") 100 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 101 - BOOT_PARAMS(0xc0000100) 102 - MAPIO(jornada720_map_io) 103 - INITIRQ(sa1100_init_irq) 100 + .phys_ram = 0xc0000000, 101 + .phys_io = 0x80000000, 102 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 103 + .boot_params = 0xc0000100, 104 + .map_io = jornada720_map_io, 105 + .init_irq = sa1100_init_irq, 104 106 .timer = &sa1100_timer, 105 107 MACHINE_END
+6 -4
arch/arm/mach-sa1100/lart.c
··· 41 41 } 42 42 43 43 MACHINE_START(LART, "LART") 44 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 45 - BOOT_PARAMS(0xc0000100) 46 - MAPIO(lart_map_io) 47 - INITIRQ(sa1100_init_irq) 44 + .phys_ram = 0xc0000000, 45 + .phys_io = 0x80000000, 46 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 47 + .boot_params = 0xc0000100, 48 + .map_io = lart_map_io, 49 + .init_irq = sa1100_init_irq, 48 50 .timer = &sa1100_timer, 49 51 MACHINE_END
+5 -3
arch/arm/mach-sa1100/pleb.c
··· 146 146 } 147 147 148 148 MACHINE_START(PLEB, "PLEB") 149 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 150 - MAPIO(pleb_map_io) 151 - INITIRQ(sa1100_init_irq) 149 + .phys_ram = 0xc0000000, 150 + .phys_io = 0x80000000, 151 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 152 + .map_io = pleb_map_io, 153 + .init_irq = sa1100_init_irq, 152 154 .timer = &sa1100_timer, 153 155 .init_machine = pleb_init, 154 156 MACHINE_END
+6 -4
arch/arm/mach-sa1100/shannon.c
··· 76 76 } 77 77 78 78 MACHINE_START(SHANNON, "Shannon (AKA: Tuxscreen)") 79 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 80 - BOOT_PARAMS(0xc0000100) 81 - MAPIO(shannon_map_io) 82 - INITIRQ(sa1100_init_irq) 79 + .phys_ram = 0xc0000000, 80 + .phys_io = 0x80000000, 81 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 82 + .boot_params = 0xc0000100, 83 + .map_io = shannon_map_io, 84 + .init_irq = sa1100_init_irq, 83 85 .timer = &sa1100_timer, 84 86 .init_machine = shannon_init, 85 87 MACHINE_END
+7 -5
arch/arm/mach-sa1100/simpad.c
··· 215 215 216 216 217 217 MACHINE_START(SIMPAD, "Simpad") 218 - MAINTAINER("Holger Freyther") 219 - BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 220 - BOOT_PARAMS(0xc0000100) 221 - MAPIO(simpad_map_io) 222 - INITIRQ(sa1100_init_irq) 218 + /* Maintainer: Holger Freyther */ 219 + .phys_ram = 0xc0000000, 220 + .phys_io = 0x80000000, 221 + .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc, 222 + .boot_params = 0xc0000100, 223 + .map_io = simpad_map_io, 224 + .init_irq = sa1100_init_irq, 223 225 .timer = &sa1100_timer, 224 226 MACHINE_END
+7 -5
arch/arm/mach-shark/core.c
··· 105 105 }; 106 106 107 107 MACHINE_START(SHARK, "Shark") 108 - MAINTAINER("Alexander Schulz") 109 - BOOT_MEM(0x08000000, 0x40000000, 0xe0000000) 110 - BOOT_PARAMS(0x08003000) 111 - MAPIO(shark_map_io) 112 - INITIRQ(shark_init_irq) 108 + /* Maintainer: Alexander Schulz */ 109 + .phys_ram = 0x08000000, 110 + .phys_io = 0x40000000, 111 + .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, 112 + .boot_params = 0x08003000, 113 + .map_io = shark_map_io, 114 + .init_irq = shark_init_irq, 113 115 .timer = &shark_timer, 114 116 MACHINE_END
+8 -6
arch/arm/mach-versatile/versatile_ab.c
··· 35 35 #include "core.h" 36 36 37 37 MACHINE_START(VERSATILE_AB, "ARM-Versatile AB") 38 - MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") 39 - BOOT_MEM(0x00000000, 0x101f1000, 0xf11f1000) 40 - BOOT_PARAMS(0x00000100) 41 - MAPIO(versatile_map_io) 42 - INITIRQ(versatile_init_irq) 38 + /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 39 + .phys_ram = 0x00000000, 40 + .phys_io = 0x101f1000, 41 + .io_pg_offst = ((0xf11f1000) >> 18) & 0xfffc, 42 + .boot_params = 0x00000100, 43 + .map_io = versatile_map_io, 44 + .init_irq = versatile_init_irq, 43 45 .timer = &versatile_timer, 44 - INIT_MACHINE(versatile_init) 46 + .init_machine = versatile_init, 45 47 MACHINE_END
+8 -6
arch/arm/mach-versatile/versatile_pb.c
··· 99 99 arch_initcall(versatile_pb_init); 100 100 101 101 MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") 102 - MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") 103 - BOOT_MEM(0x00000000, 0x101f1000, 0xf11f1000) 104 - BOOT_PARAMS(0x00000100) 105 - MAPIO(versatile_map_io) 106 - INITIRQ(versatile_init_irq) 102 + /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 103 + .phys_ram = 0x00000000, 104 + .phys_io = 0x101f1000, 105 + .io_pg_offst = ((0xf11f1000) >> 18) & 0xfffc, 106 + .boot_params = 0x00000100, 107 + .map_io = versatile_map_io, 108 + .init_irq = versatile_init_irq, 107 109 .timer = &versatile_timer, 108 - INIT_MACHINE(versatile_init) 110 + .init_machine = versatile_init, 109 111 MACHINE_END
+2 -1
arch/arm/mm/blockops.c
··· 25 25 { 26 26 asm( 27 27 "add r1, r0, %0 \n\ 28 + sub r1, r1, %1 \n\ 28 29 1: .word 0xec401f0e @ mcrr p15, 0, r0, r1, c14, 0 @ blocking \n\ 29 30 mov r0, #0 \n\ 30 31 mcr p15, 0, r0, c7, c5, 0 \n\ 31 32 mcr p15, 0, r0, c7, c10, 4 \n\ 32 33 mov pc, lr" 33 34 : 34 - : "I" (PAGE_SIZE)); 35 + : "I" (PAGE_SIZE), "I" (L1_CACHE_BYTES)); 35 36 } 36 37 37 38 /*
+40 -35
arch/arm/mm/fault.c
··· 372 372 static struct fsr_info { 373 373 int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); 374 374 int sig; 375 + int code; 375 376 const char *name; 376 377 } fsr_info[] = { 377 378 /* 378 379 * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 379 380 * defines these to be "precise" aborts. 380 381 */ 381 - { do_bad, SIGSEGV, "vector exception" }, 382 - { do_bad, SIGILL, "alignment exception" }, 383 - { do_bad, SIGKILL, "terminal exception" }, 384 - { do_bad, SIGILL, "alignment exception" }, 385 - { do_bad, SIGBUS, "external abort on linefetch" }, 386 - { do_translation_fault, SIGSEGV, "section translation fault" }, 387 - { do_bad, SIGBUS, "external abort on linefetch" }, 388 - { do_page_fault, SIGSEGV, "page translation fault" }, 389 - { do_bad, SIGBUS, "external abort on non-linefetch" }, 390 - { do_bad, SIGSEGV, "section domain fault" }, 391 - { do_bad, SIGBUS, "external abort on non-linefetch" }, 392 - { do_bad, SIGSEGV, "page domain fault" }, 393 - { do_bad, SIGBUS, "external abort on translation" }, 394 - { do_sect_fault, SIGSEGV, "section permission fault" }, 395 - { do_bad, SIGBUS, "external abort on translation" }, 396 - { do_page_fault, SIGSEGV, "page permission fault" }, 382 + { do_bad, SIGSEGV, 0, "vector exception" }, 383 + { do_bad, SIGILL, BUS_ADRALN, "alignment exception" }, 384 + { do_bad, SIGKILL, 0, "terminal exception" }, 385 + { do_bad, SIGILL, BUS_ADRALN, "alignment exception" }, 386 + { do_bad, SIGBUS, 0, "external abort on linefetch" }, 387 + { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, 388 + { do_bad, SIGBUS, 0, "external abort on linefetch" }, 389 + { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, 390 + { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, 391 + { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" }, 392 + { do_bad, SIGBUS, 0, "external abort on non-linefetch" }, 393 + { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" }, 394 + { do_bad, SIGBUS, 0, "external abort on translation" }, 395 + { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" }, 396 + { do_bad, SIGBUS, 0, "external abort on translation" }, 397 + { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" }, 397 398 /* 398 399 * The following are "imprecise" aborts, which are signalled by bit 399 400 * 10 of the FSR, and may not be recoverable. These are only 400 401 * supported if the CPU abort handler supports bit 10. 401 402 */ 402 - { do_bad, SIGBUS, "unknown 16" }, 403 - { do_bad, SIGBUS, "unknown 17" }, 404 - { do_bad, SIGBUS, "unknown 18" }, 405 - { do_bad, SIGBUS, "unknown 19" }, 406 - { do_bad, SIGBUS, "lock abort" }, /* xscale */ 407 - { do_bad, SIGBUS, "unknown 21" }, 408 - { do_bad, SIGBUS, "imprecise external abort" }, /* xscale */ 409 - { do_bad, SIGBUS, "unknown 23" }, 410 - { do_bad, SIGBUS, "dcache parity error" }, /* xscale */ 411 - { do_bad, SIGBUS, "unknown 25" }, 412 - { do_bad, SIGBUS, "unknown 26" }, 413 - { do_bad, SIGBUS, "unknown 27" }, 414 - { do_bad, SIGBUS, "unknown 28" }, 415 - { do_bad, SIGBUS, "unknown 29" }, 416 - { do_bad, SIGBUS, "unknown 30" }, 417 - { do_bad, SIGBUS, "unknown 31" } 403 + { do_bad, SIGBUS, 0, "unknown 16" }, 404 + { do_bad, SIGBUS, 0, "unknown 17" }, 405 + { do_bad, SIGBUS, 0, "unknown 18" }, 406 + { do_bad, SIGBUS, 0, "unknown 19" }, 407 + { do_bad, SIGBUS, 0, "lock abort" }, /* xscale */ 408 + { do_bad, SIGBUS, 0, "unknown 21" }, 409 + { do_bad, SIGBUS, BUS_OBJERR, "imprecise external abort" }, /* xscale */ 410 + { do_bad, SIGBUS, 0, "unknown 23" }, 411 + { do_bad, SIGBUS, 0, "dcache parity error" }, /* xscale */ 412 + { do_bad, SIGBUS, 0, "unknown 25" }, 413 + { do_bad, SIGBUS, 0, "unknown 26" }, 414 + { do_bad, SIGBUS, 0, "unknown 27" }, 415 + { do_bad, SIGBUS, 0, "unknown 28" }, 416 + { do_bad, SIGBUS, 0, "unknown 29" }, 417 + { do_bad, SIGBUS, 0, "unknown 30" }, 418 + { do_bad, SIGBUS, 0, "unknown 31" } 418 419 }; 419 420 420 421 void __init ··· 436 435 do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) 437 436 { 438 437 const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6); 438 + struct siginfo info; 439 439 440 440 if (!inf->fn(addr, fsr, regs)) 441 441 return; 442 442 443 443 printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", 444 444 inf->name, fsr, addr); 445 - force_sig(inf->sig, current); 446 - show_pte(current->mm, addr); 447 - die_if_kernel("Oops", regs, 0); 445 + 446 + info.si_signo = inf->sig; 447 + info.si_errno = 0; 448 + info.si_code = inf->code; 449 + info.si_addr = (void __user *)addr; 450 + notify_die("", regs, &info, fsr, 0); 448 451 } 449 452 450 453 asmlinkage void
+2 -2
arch/arm/mm/proc-arm1020.S
··· 445 445 /* 446 446 * R 447 447 * .RVI ZFRS BLDP WCAM 448 - * .0.1 1001 ..11 0101 /* FIXME: why no V bit? */ 448 + * .011 1001 ..11 0101 449 449 */ 450 450 .type arm1020_cr1_clear, #object 451 451 .type arm1020_cr1_set, #object 452 452 arm1020_cr1_clear: 453 453 .word 0x593f 454 454 arm1020_cr1_set: 455 - .word 0x1935 455 + .word 0x3935 456 456 457 457 __INITDATA 458 458
+2 -2
arch/arm/mm/proc-arm1020e.S
··· 427 427 /* 428 428 * R 429 429 * .RVI ZFRS BLDP WCAM 430 - * .0.1 1001 ..11 0101 /* FIXME: why no V bit? */ 430 + * .011 1001 ..11 0101 431 431 */ 432 432 .type arm1020e_cr1_clear, #object 433 433 .type arm1020e_cr1_set, #object 434 434 arm1020e_cr1_clear: 435 435 .word 0x5f3f 436 436 arm1020e_cr1_set: 437 - .word 0x1935 437 + .word 0x3935 438 438 439 439 __INITDATA 440 440
+1 -1
arch/i386/kernel/apic.c
··· 35 35 #include <asm/desc.h> 36 36 #include <asm/arch_hooks.h> 37 37 #include <asm/hpet.h> 38 + #include <asm/i8253.h> 38 39 39 40 #include <mach_apic.h> 40 41 ··· 880 879 */ 881 880 static unsigned int __devinit get_8254_timer_count(void) 882 881 { 883 - extern spinlock_t i8253_lock; 884 882 unsigned long flags; 885 883 886 884 unsigned int count;
+2 -3
arch/i386/kernel/apm.c
··· 228 228 #include <asm/system.h> 229 229 #include <asm/uaccess.h> 230 230 #include <asm/desc.h> 231 + #include <asm/i8253.h> 231 232 232 233 #include "io_ports.h" 233 234 234 - extern spinlock_t i8253_lock; 235 235 extern unsigned long get_cmos_time(void); 236 236 extern void machine_real_restart(unsigned char *, int); 237 237 ··· 1168 1168 static void reinit_timer(void) 1169 1169 { 1170 1170 #ifdef INIT_TIMER_AFTER_SUSPEND 1171 - unsigned long flags; 1172 - extern spinlock_t i8253_lock; 1171 + unsigned long flags; 1173 1172 1174 1173 spin_lock_irqsave(&i8253_lock, flags); 1175 1174 /* set the clock to 100 Hz */
+1 -1
arch/i386/kernel/io_apic.c
··· 37 37 #include <asm/smp.h> 38 38 #include <asm/desc.h> 39 39 #include <asm/timer.h> 40 + #include <asm/i8259.h> 40 41 41 42 #include <mach_apic.h> 42 43 ··· 1567 1566 1568 1567 void /*__init*/ print_PIC(void) 1569 1568 { 1570 - extern spinlock_t i8259A_lock; 1571 1569 unsigned int v; 1572 1570 unsigned long flags; 1573 1571
+4 -1
arch/i386/kernel/time.c
··· 68 68 69 69 #include "io_ports.h" 70 70 71 - extern spinlock_t i8259A_lock; 71 + #include <asm/i8259.h> 72 + 72 73 int pit_latch_buggy; /* extern */ 73 74 74 75 #include "do_timer.h" ··· 85 84 86 85 DEFINE_SPINLOCK(rtc_lock); 87 86 EXPORT_SYMBOL(rtc_lock); 87 + 88 + #include <asm/i8253.h> 88 89 89 90 DEFINE_SPINLOCK(i8253_lock); 90 91 EXPORT_SYMBOL(i8253_lock);
+2 -2
arch/i386/kernel/timers/timer_cyclone.c
··· 17 17 #include <asm/io.h> 18 18 #include <asm/pgtable.h> 19 19 #include <asm/fixmap.h> 20 - #include "io_ports.h" 20 + #include <asm/i8253.h> 21 21 22 - extern spinlock_t i8253_lock; 22 + #include "io_ports.h" 23 23 24 24 /* Number of usecs that the last interrupt was delayed */ 25 25 static int delay_at_last_interrupt;
+1 -3
arch/i386/kernel/timers/timer_pit.c
··· 15 15 #include <asm/smp.h> 16 16 #include <asm/io.h> 17 17 #include <asm/arch_hooks.h> 18 + #include <asm/i8253.h> 18 19 19 - extern spinlock_t i8259A_lock; 20 - extern spinlock_t i8253_lock; 21 20 #include "do_timer.h" 22 21 #include "io_ports.h" 23 22 ··· 165 166 166 167 void setup_pit_timer(void) 167 168 { 168 - extern spinlock_t i8253_lock; 169 169 unsigned long flags; 170 170 171 171 spin_lock_irqsave(&i8253_lock, flags);
+1 -2
arch/i386/kernel/timers/timer_tsc.c
··· 24 24 #include "mach_timer.h" 25 25 26 26 #include <asm/hpet.h> 27 + #include <asm/i8253.h> 27 28 28 29 #ifdef CONFIG_HPET_TIMER 29 30 static unsigned long hpet_usec_quotient; ··· 35 34 static inline void cpufreq_delayed_get(void); 36 35 37 36 int tsc_disable __devinitdata = 0; 38 - 39 - extern spinlock_t i8253_lock; 40 37 41 38 static int use_tsc; 42 39 /* Number of usecs that the last interrupt was delayed */
+1 -1
arch/i386/mach-voyager/voyager_basic.c
··· 30 30 #include <linux/irq.h> 31 31 #include <asm/tlbflush.h> 32 32 #include <asm/arch_hooks.h> 33 + #include <asm/i8253.h> 33 34 34 35 /* 35 36 * Power off function, if any ··· 183 182 * and swiftly introduce it to something sharp and 184 183 * pointy. */ 185 184 __u16 val; 186 - extern spinlock_t i8253_lock; 187 185 188 186 spin_lock(&i8253_lock); 189 187
+2 -2
arch/ppc/kernel/relocate_kernel.S
··· 34 34 35 35 mr r8, r0 36 36 ori r8, r8, MSR_RI|MSR_ME 37 - mtspr SRR1, r8 37 + mtspr SPRN_SRR1, r8 38 38 addi r8, r4, 1f - relocate_new_kernel 39 - mtspr SRR0, r8 39 + mtspr SPRN_SRR0, r8 40 40 sync 41 41 rfi 42 42
+1 -1
arch/ppc/platforms/85xx/mpc8540_ads.c
··· 111 111 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); 112 112 } 113 113 114 + pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC); 114 115 if (pdata) { 115 - pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC); 116 116 pdata->board_flags = 0; 117 117 pdata->interruptPHY = MPC85xx_IRQ_EXT5; 118 118 pdata->phyid = 3;
+1 -4
arch/ppc64/boot/Makefile
··· 52 52 src-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.c, $(section))) 53 53 gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section))) 54 54 55 - hostprogs-y := piggy addnote addRamDisk 55 + hostprogs-y := addnote addRamDisk 56 56 targets += zImage zImage.initrd imagesize.c \ 57 57 $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \ 58 58 $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \ ··· 77 77 78 78 quiet_cmd_addnote = ADDNOTE $@ 79 79 cmd_addnote = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@ 80 - 81 - quiet_cmd_piggy = PIGGY $@ 82 - cmd_piggy = $(obj)/piggyback $(@:.o=) < $< | $(CROSS32AS) -o $@ 83 80 84 81 $(call gz-sec, $(required)): $(obj)/kernel-%.gz: % FORCE 85 82 $(call if_changed,gzip)
+2 -6
arch/ppc64/boot/main.c
··· 17 17 18 18 extern void *finddevice(const char *); 19 19 extern int getprop(void *, const char *, void *, int); 20 - extern void printk(char *fmt, ...); 21 20 extern void printf(const char *fmt, ...); 22 21 extern int sprintf(char *buf, const char *fmt, ...); 23 22 void gunzip(void *, int, unsigned char *, int *); ··· 146 147 } 147 148 a1 = initrd.addr; 148 149 a2 = initrd.size; 149 - printf("initial ramdisk moving 0x%lx <- 0x%lx (%lx bytes)\n\r", 150 + printf("initial ramdisk moving 0x%lx <- 0x%lx (0x%lx bytes)\n\r", 150 151 initrd.addr, (unsigned long)_initrd_start, initrd.size); 151 152 memmove((void *)initrd.addr, (void *)_initrd_start, initrd.size); 152 - printf("initrd head: 0x%lx\n\r", *((u32 *)initrd.addr)); 153 + printf("initrd head: 0x%lx\n\r", *((unsigned long *)initrd.addr)); 153 154 } 154 155 155 156 /* Eventually gunzip the kernel */ ··· 199 200 vmlinux.size -= (unsigned long)elf64ph->p_offset; 200 201 201 202 flush_cache((void *)vmlinux.addr, vmlinux.size); 202 - 203 - if (a1) 204 - printf("initrd head: 0x%lx\n\r", *((u32 *)initrd.addr)); 205 203 206 204 kernel_entry = (kernel_entry_t)vmlinux.addr; 207 205 #ifdef DEBUG
-43
arch/ppc64/boot/mknote.c
··· 1 - /* 2 - * Copyright (C) Cort Dougan 1999. 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 - * Generate a note section as per the CHRP specification. 10 - * 11 - */ 12 - 13 - #include <stdio.h> 14 - 15 - #define PL(x) printf("%c%c%c%c", ((x)>>24)&0xff, ((x)>>16)&0xff, ((x)>>8)&0xff, (x)&0xff ); 16 - 17 - int main(void) 18 - { 19 - /* header */ 20 - /* namesz */ 21 - PL(strlen("PowerPC")+1); 22 - /* descrsz */ 23 - PL(6*4); 24 - /* type */ 25 - PL(0x1275); 26 - /* name */ 27 - printf("PowerPC"); printf("%c", 0); 28 - 29 - /* descriptor */ 30 - /* real-mode */ 31 - PL(0xffffffff); 32 - /* real-base */ 33 - PL(0x00c00000); 34 - /* real-size */ 35 - PL(0xffffffff); 36 - /* virt-base */ 37 - PL(0xffffffff); 38 - /* virt-size */ 39 - PL(0xffffffff); 40 - /* load-base */ 41 - PL(0x4000); 42 - return 0; 43 - }
-83
arch/ppc64/boot/piggyback.c
··· 1 - /* 2 - * Copyright 2001 IBM Corp 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 - #include <stdio.h> 10 - #include <unistd.h> 11 - #include <string.h> 12 - 13 - extern long ce_exec_config[]; 14 - 15 - int main(int argc, char *argv[]) 16 - { 17 - int i, cnt, pos, len; 18 - unsigned int cksum, val; 19 - unsigned char *lp; 20 - unsigned char buf[8192]; 21 - char *varname; 22 - if (argc != 2) 23 - { 24 - fprintf(stderr, "usage: %s name <in-file >out-file\n", 25 - argv[0]); 26 - exit(1); 27 - } 28 - 29 - varname = strrchr(argv[1], '/'); 30 - if (varname) 31 - varname++; 32 - else 33 - varname = argv[1]; 34 - 35 - fprintf(stdout, "#\n"); 36 - fprintf(stdout, "# Miscellaneous data structures:\n"); 37 - fprintf(stdout, "# WARNING - this file is automatically generated!\n"); 38 - fprintf(stdout, "#\n"); 39 - fprintf(stdout, "\n"); 40 - fprintf(stdout, "\t.data\n"); 41 - fprintf(stdout, "\t.globl %s_data\n", varname); 42 - fprintf(stdout, "%s_data:\n", varname); 43 - pos = 0; 44 - cksum = 0; 45 - while ((len = read(0, buf, sizeof(buf))) > 0) 46 - { 47 - cnt = 0; 48 - lp = (unsigned char *)buf; 49 - len = (len + 3) & ~3; /* Round up to longwords */ 50 - for (i = 0; i < len; i += 4) 51 - { 52 - if (cnt == 0) 53 - { 54 - fprintf(stdout, "\t.long\t"); 55 - } 56 - fprintf(stdout, "0x%02X%02X%02X%02X", lp[0], lp[1], lp[2], lp[3]); 57 - val = *(unsigned long *)lp; 58 - cksum ^= val; 59 - lp += 4; 60 - if (++cnt == 4) 61 - { 62 - cnt = 0; 63 - fprintf(stdout, " # %x \n", pos+i-12); 64 - fflush(stdout); 65 - } else 66 - { 67 - fprintf(stdout, ","); 68 - } 69 - } 70 - if (cnt) 71 - { 72 - fprintf(stdout, "0\n"); 73 - } 74 - pos += len; 75 - } 76 - fprintf(stdout, "\t.globl %s_len\n", varname); 77 - fprintf(stdout, "%s_len:\t.long\t0x%x\n", varname, pos); 78 - fflush(stdout); 79 - fclose(stdout); 80 - fprintf(stderr, "cksum = %x\n", cksum); 81 - exit(0); 82 - } 83 -
+2 -14
arch/ppc64/boot/prom.c
··· 40 40 int getprop(void *phandle, const char *name, void *buf, int buflen); 41 41 void chrpboot(int a1, int a2, void *prom); /* in main.c */ 42 42 43 - void printk(char *fmt, ...); 43 + int printf(char *fmt, ...); 44 44 45 45 /* there is no convenient header to get this from... -- paulus */ 46 46 extern unsigned long strlen(const char *); ··· 220 220 case 1: 221 221 return ch; 222 222 case -1: 223 - printk("read(stdin) returned -1\r\n"); 223 + printf("read(stdin) returned -1\r\n"); 224 224 return -1; 225 225 } 226 226 } ··· 626 626 } 627 627 628 628 static char sprint_buf[1024]; 629 - 630 - void 631 - printk(char *fmt, ...) 632 - { 633 - va_list args; 634 - int n; 635 - 636 - va_start(args, fmt); 637 - n = vsprintf(sprint_buf, fmt, args); 638 - va_end(args); 639 - write(stdout, sprint_buf, n); 640 - } 641 629 642 630 int 643 631 printf(char *fmt, ...)
+196 -100
arch/ppc64/kernel/ItLpQueue.c
··· 1 1 /* 2 2 * ItLpQueue.c 3 3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 4 - * 4 + * 5 5 * This program is free software; you can redistribute it and/or modify 6 6 * it under the terms of the GNU General Public License as published by 7 7 * the Free Software Foundation; either version 2 of the License, or ··· 11 11 #include <linux/stddef.h> 12 12 #include <linux/kernel.h> 13 13 #include <linux/sched.h> 14 + #include <linux/bootmem.h> 15 + #include <linux/seq_file.h> 16 + #include <linux/proc_fs.h> 14 17 #include <asm/system.h> 15 18 #include <asm/paca.h> 16 19 #include <asm/iSeries/ItLpQueue.h> 17 20 #include <asm/iSeries/HvLpEvent.h> 18 21 #include <asm/iSeries/HvCallEvent.h> 19 22 20 - static __inline__ int set_inUse( struct ItLpQueue * lpQueue ) 21 - { 22 - int t; 23 - u32 * inUseP = &(lpQueue->xInUseWord); 23 + /* 24 + * The LpQueue is used to pass event data from the hypervisor to 25 + * the partition. This is where I/O interrupt events are communicated. 26 + * 27 + * It is written to by the hypervisor so cannot end up in the BSS. 28 + */ 29 + struct hvlpevent_queue hvlpevent_queue __attribute__((__section__(".data"))); 24 30 25 - __asm__ __volatile__("\n\ 26 - 1: lwarx %0,0,%2 \n\ 27 - cmpwi 0,%0,0 \n\ 28 - li %0,0 \n\ 29 - bne- 2f \n\ 30 - addi %0,%0,1 \n\ 31 - stwcx. %0,0,%2 \n\ 32 - bne- 1b \n\ 33 - 2: eieio" 34 - : "=&r" (t), "=m" (lpQueue->xInUseWord) 35 - : "r" (inUseP), "m" (lpQueue->xInUseWord) 36 - : "cc"); 31 + DEFINE_PER_CPU(unsigned long[HvLpEvent_Type_NumTypes], hvlpevent_counts); 37 32 38 - return t; 39 - } 40 - 41 - static __inline__ void clear_inUse( struct ItLpQueue * lpQueue ) 42 - { 43 - lpQueue->xInUseWord = 0; 44 - } 33 + static char *event_types[HvLpEvent_Type_NumTypes] = { 34 + "Hypervisor", 35 + "Machine Facilities", 36 + "Session Manager", 37 + "SPD I/O", 38 + "Virtual Bus", 39 + "PCI I/O", 40 + "RIO I/O", 41 + "Virtual Lan", 42 + "Virtual I/O" 43 + }; 45 44 46 45 /* Array of LpEvent handler functions */ 47 46 extern LpEventHandler lpEventHandler[HvLpEvent_Type_NumTypes]; 48 - unsigned long ItLpQueueInProcess = 0; 49 47 50 - struct HvLpEvent * ItLpQueue_getNextLpEvent( struct ItLpQueue * lpQueue ) 48 + static struct HvLpEvent * get_next_hvlpevent(void) 51 49 { 52 - struct HvLpEvent * nextLpEvent = 53 - (struct HvLpEvent *)lpQueue->xSlicCurEventPtr; 54 - if ( nextLpEvent->xFlags.xValid ) { 50 + struct HvLpEvent * event; 51 + event = (struct HvLpEvent *)hvlpevent_queue.xSlicCurEventPtr; 52 + 53 + if (event->xFlags.xValid) { 55 54 /* rmb() needed only for weakly consistent machines (regatta) */ 56 55 rmb(); 57 56 /* Set pointer to next potential event */ 58 - lpQueue->xSlicCurEventPtr += ((nextLpEvent->xSizeMinus1 + 59 - LpEventAlign ) / 60 - LpEventAlign ) * 61 - LpEventAlign; 57 + hvlpevent_queue.xSlicCurEventPtr += ((event->xSizeMinus1 + 58 + LpEventAlign) / LpEventAlign) * LpEventAlign; 59 + 62 60 /* Wrap to beginning if no room at end */ 63 - if (lpQueue->xSlicCurEventPtr > lpQueue->xSlicLastValidEventPtr) 64 - lpQueue->xSlicCurEventPtr = lpQueue->xSlicEventStackPtr; 61 + if (hvlpevent_queue.xSlicCurEventPtr > 62 + hvlpevent_queue.xSlicLastValidEventPtr) { 63 + hvlpevent_queue.xSlicCurEventPtr = 64 + hvlpevent_queue.xSlicEventStackPtr; 65 + } 66 + } else { 67 + event = NULL; 65 68 } 66 - else 67 - nextLpEvent = NULL; 68 69 69 - return nextLpEvent; 70 + return event; 70 71 } 71 72 72 - int ItLpQueue_isLpIntPending( struct ItLpQueue * lpQueue ) 73 + static unsigned long spread_lpevents = NR_CPUS; 74 + 75 + int hvlpevent_is_pending(void) 73 76 { 74 - int retval = 0; 75 - struct HvLpEvent * nextLpEvent; 76 - if ( lpQueue ) { 77 - nextLpEvent = (struct HvLpEvent *)lpQueue->xSlicCurEventPtr; 78 - retval = nextLpEvent->xFlags.xValid | lpQueue->xPlicOverflowIntPending; 79 - } 80 - return retval; 77 + struct HvLpEvent *next_event; 78 + 79 + if (smp_processor_id() >= spread_lpevents) 80 + return 0; 81 + 82 + next_event = (struct HvLpEvent *)hvlpevent_queue.xSlicCurEventPtr; 83 + 84 + return next_event->xFlags.xValid | 85 + hvlpevent_queue.xPlicOverflowIntPending; 81 86 } 82 87 83 - void ItLpQueue_clearValid( struct HvLpEvent * event ) 88 + static void hvlpevent_clear_valid(struct HvLpEvent * event) 84 89 { 85 - /* Clear the valid bit of the event 86 - * Also clear bits within this event that might 87 - * look like valid bits (on 64-byte boundaries) 88 - */ 89 - unsigned extra = (( event->xSizeMinus1 + LpEventAlign ) / 90 - LpEventAlign ) - 1; 91 - switch ( extra ) { 92 - case 3: 93 - ((struct HvLpEvent*)((char*)event+3*LpEventAlign))->xFlags.xValid=0; 94 - case 2: 95 - ((struct HvLpEvent*)((char*)event+2*LpEventAlign))->xFlags.xValid=0; 96 - case 1: 97 - ((struct HvLpEvent*)((char*)event+1*LpEventAlign))->xFlags.xValid=0; 98 - case 0: 99 - ; 90 + /* Tell the Hypervisor that we're done with this event. 91 + * Also clear bits within this event that might look like valid bits. 92 + * ie. on 64-byte boundaries. 93 + */ 94 + struct HvLpEvent *tmp; 95 + unsigned extra = ((event->xSizeMinus1 + LpEventAlign) / 96 + LpEventAlign) - 1; 97 + 98 + switch (extra) { 99 + case 3: 100 + tmp = (struct HvLpEvent*)((char*)event + 3 * LpEventAlign); 101 + tmp->xFlags.xValid = 0; 102 + case 2: 103 + tmp = (struct HvLpEvent*)((char*)event + 2 * LpEventAlign); 104 + tmp->xFlags.xValid = 0; 105 + case 1: 106 + tmp = (struct HvLpEvent*)((char*)event + 1 * LpEventAlign); 107 + tmp->xFlags.xValid = 0; 100 108 } 109 + 101 110 mb(); 111 + 102 112 event->xFlags.xValid = 0; 103 113 } 104 114 105 - unsigned ItLpQueue_process( struct ItLpQueue * lpQueue, struct pt_regs *regs ) 115 + void process_hvlpevents(struct pt_regs *regs) 106 116 { 107 - unsigned numIntsProcessed = 0; 108 - struct HvLpEvent * nextLpEvent; 117 + struct HvLpEvent * event; 109 118 110 119 /* If we have recursed, just return */ 111 - if ( !set_inUse( lpQueue ) ) 112 - return 0; 113 - 114 - if (ItLpQueueInProcess == 0) 115 - ItLpQueueInProcess = 1; 116 - else 117 - BUG(); 120 + if (!spin_trylock(&hvlpevent_queue.lock)) 121 + return; 118 122 119 123 for (;;) { 120 - nextLpEvent = ItLpQueue_getNextLpEvent( lpQueue ); 121 - if ( nextLpEvent ) { 122 - /* Count events to return to caller 123 - * and count processed events in lpQueue 124 - */ 125 - ++numIntsProcessed; 126 - lpQueue->xLpIntCount++; 127 - /* Call appropriate handler here, passing 124 + event = get_next_hvlpevent(); 125 + if (event) { 126 + /* Call appropriate handler here, passing 128 127 * a pointer to the LpEvent. The handler 129 128 * must make a copy of the LpEvent if it 130 129 * needs it in a bottom half. (perhaps for 131 130 * an ACK) 132 - * 133 - * Handlers are responsible for ACK processing 131 + * 132 + * Handlers are responsible for ACK processing 134 133 * 135 134 * The Hypervisor guarantees that LpEvents will 136 135 * only be delivered with types that we have 137 136 * registered for, so no type check is necessary 138 137 * here! 139 - */ 140 - if ( nextLpEvent->xType < HvLpEvent_Type_NumTypes ) 141 - lpQueue->xLpIntCountByType[nextLpEvent->xType]++; 142 - if ( nextLpEvent->xType < HvLpEvent_Type_NumTypes && 143 - lpEventHandler[nextLpEvent->xType] ) 144 - lpEventHandler[nextLpEvent->xType](nextLpEvent, regs); 138 + */ 139 + if (event->xType < HvLpEvent_Type_NumTypes) 140 + __get_cpu_var(hvlpevent_counts)[event->xType]++; 141 + if (event->xType < HvLpEvent_Type_NumTypes && 142 + lpEventHandler[event->xType]) 143 + lpEventHandler[event->xType](event, regs); 145 144 else 146 - printk(KERN_INFO "Unexpected Lp Event type=%d\n", nextLpEvent->xType ); 147 - 148 - ItLpQueue_clearValid( nextLpEvent ); 149 - } else if ( lpQueue->xPlicOverflowIntPending ) 145 + printk(KERN_INFO "Unexpected Lp Event type=%d\n", event->xType ); 146 + 147 + hvlpevent_clear_valid(event); 148 + } else if (hvlpevent_queue.xPlicOverflowIntPending) 150 149 /* 151 150 * No more valid events. If overflow events are 152 151 * pending process them 153 152 */ 154 - HvCallEvent_getOverflowLpEvents( lpQueue->xIndex); 153 + HvCallEvent_getOverflowLpEvents(hvlpevent_queue.xIndex); 155 154 else 156 155 break; 157 156 } 158 157 159 - ItLpQueueInProcess = 0; 160 - mb(); 161 - clear_inUse( lpQueue ); 162 - 163 - get_paca()->lpevent_count += numIntsProcessed; 164 - 165 - return numIntsProcessed; 158 + spin_unlock(&hvlpevent_queue.lock); 166 159 } 160 + 161 + static int set_spread_lpevents(char *str) 162 + { 163 + unsigned long val = simple_strtoul(str, NULL, 0); 164 + 165 + /* 166 + * The parameter is the number of processors to share in processing 167 + * lp events. 168 + */ 169 + if (( val > 0) && (val <= NR_CPUS)) { 170 + spread_lpevents = val; 171 + printk("lpevent processing spread over %ld processors\n", val); 172 + } else { 173 + printk("invalid spread_lpevents %ld\n", val); 174 + } 175 + 176 + return 1; 177 + } 178 + __setup("spread_lpevents=", set_spread_lpevents); 179 + 180 + void setup_hvlpevent_queue(void) 181 + { 182 + void *eventStack; 183 + 184 + /* 185 + * Allocate a page for the Event Stack. The Hypervisor needs the 186 + * absolute real address, so we subtract out the KERNELBASE and add 187 + * in the absolute real address of the kernel load area. 188 + */ 189 + eventStack = alloc_bootmem_pages(LpEventStackSize); 190 + memset(eventStack, 0, LpEventStackSize); 191 + 192 + /* Invoke the hypervisor to initialize the event stack */ 193 + HvCallEvent_setLpEventStack(0, eventStack, LpEventStackSize); 194 + 195 + hvlpevent_queue.xSlicEventStackPtr = (char *)eventStack; 196 + hvlpevent_queue.xSlicCurEventPtr = (char *)eventStack; 197 + hvlpevent_queue.xSlicLastValidEventPtr = (char *)eventStack + 198 + (LpEventStackSize - LpEventMaxSize); 199 + hvlpevent_queue.xIndex = 0; 200 + } 201 + 202 + static int proc_lpevents_show(struct seq_file *m, void *v) 203 + { 204 + int cpu, i; 205 + unsigned long sum; 206 + static unsigned long cpu_totals[NR_CPUS]; 207 + 208 + /* FIXME: do we care that there's no locking here? */ 209 + sum = 0; 210 + for_each_online_cpu(cpu) { 211 + cpu_totals[cpu] = 0; 212 + for (i = 0; i < HvLpEvent_Type_NumTypes; i++) { 213 + cpu_totals[cpu] += per_cpu(hvlpevent_counts, cpu)[i]; 214 + } 215 + sum += cpu_totals[cpu]; 216 + } 217 + 218 + seq_printf(m, "LpEventQueue 0\n"); 219 + seq_printf(m, " events processed:\t%lu\n", sum); 220 + 221 + for (i = 0; i < HvLpEvent_Type_NumTypes; ++i) { 222 + sum = 0; 223 + for_each_online_cpu(cpu) { 224 + sum += per_cpu(hvlpevent_counts, cpu)[i]; 225 + } 226 + 227 + seq_printf(m, " %-20s %10lu\n", event_types[i], sum); 228 + } 229 + 230 + seq_printf(m, "\n events processed by processor:\n"); 231 + 232 + for_each_online_cpu(cpu) { 233 + seq_printf(m, " CPU%02d %10lu\n", cpu, cpu_totals[cpu]); 234 + } 235 + 236 + return 0; 237 + } 238 + 239 + static int proc_lpevents_open(struct inode *inode, struct file *file) 240 + { 241 + return single_open(file, proc_lpevents_show, NULL); 242 + } 243 + 244 + static struct file_operations proc_lpevents_operations = { 245 + .open = proc_lpevents_open, 246 + .read = seq_read, 247 + .llseek = seq_lseek, 248 + .release = single_release, 249 + }; 250 + 251 + static int __init proc_lpevents_init(void) 252 + { 253 + struct proc_dir_entry *e; 254 + 255 + e = create_proc_entry("iSeries/lpevents", S_IFREG|S_IRUGO, NULL); 256 + if (e) 257 + e->proc_fops = &proc_lpevents_operations; 258 + 259 + return 0; 260 + } 261 + __initcall(proc_lpevents_init); 262 +
+2 -9
arch/ppc64/kernel/LparData.c
··· 28 28 #include <asm/iSeries/IoHriProcessorVpd.h> 29 29 #include <asm/iSeries/ItSpCommArea.h> 30 30 31 - /* The LpQueue is used to pass event data from the hypervisor to 32 - * the partition. This is where I/O interrupt events are communicated. 33 - */ 34 - 35 - /* May be filled in by the hypervisor so cannot end up in the BSS */ 36 - struct ItLpQueue xItLpQueue __attribute__((__section__(".data"))); 37 - 38 31 39 32 /* The HvReleaseData is the root of the information shared between 40 33 * the hypervisor and Linux. ··· 193 200 0,0,0, /* 13 - 15 */ 194 201 sizeof(struct IoHriProcessorVpd),/* 16 length of Proc Vpd */ 195 202 0,0,0,0,0,0, /* 17 - 22 */ 196 - sizeof(struct ItLpQueue),/* 23 length of Lp Queue */ 203 + sizeof(struct hvlpevent_queue), /* 23 length of Lp Queue */ 197 204 0,0 /* 24 - 25 */ 198 205 }, 199 206 .xSlicVpdAdrs = { /* VPD addresses */ ··· 211 218 0,0,0, /* 13 - 15 */ 212 219 &xIoHriProcessorVpd, /* 16 Proc Vpd */ 213 220 0,0,0,0,0,0, /* 17 - 22 */ 214 - &xItLpQueue, /* 23 Lp Queue */ 221 + &hvlpevent_queue, /* 23 Lp Queue */ 215 222 0,0 216 223 } 217 224 };
-48
arch/ppc64/kernel/iSeries_proc.c
··· 40 40 } 41 41 core_initcall(iseries_proc_create); 42 42 43 - static char *event_types[9] = { 44 - "Hypervisor\t\t", 45 - "Machine Facilities\t", 46 - "Session Manager\t", 47 - "SPD I/O\t\t", 48 - "Virtual Bus\t\t", 49 - "PCI I/O\t\t", 50 - "RIO I/O\t\t", 51 - "Virtual Lan\t\t", 52 - "Virtual I/O\t\t" 53 - }; 54 - 55 - static int proc_lpevents_show(struct seq_file *m, void *v) 56 - { 57 - unsigned int i; 58 - 59 - seq_printf(m, "LpEventQueue 0\n"); 60 - seq_printf(m, " events processed:\t%lu\n", 61 - (unsigned long)xItLpQueue.xLpIntCount); 62 - 63 - for (i = 0; i < 9; ++i) 64 - seq_printf(m, " %s %10lu\n", event_types[i], 65 - (unsigned long)xItLpQueue.xLpIntCountByType[i]); 66 - 67 - seq_printf(m, "\n events processed by processor:\n"); 68 - 69 - for_each_online_cpu(i) 70 - seq_printf(m, " CPU%02d %10u\n", i, paca[i].lpevent_count); 71 - 72 - return 0; 73 - } 74 - 75 - static int proc_lpevents_open(struct inode *inode, struct file *file) 76 - { 77 - return single_open(file, proc_lpevents_show, NULL); 78 - } 79 - 80 - static struct file_operations proc_lpevents_operations = { 81 - .open = proc_lpevents_open, 82 - .read = seq_read, 83 - .llseek = seq_lseek, 84 - .release = single_release, 85 - }; 86 - 87 43 static unsigned long startTitan = 0; 88 44 static unsigned long startTb = 0; 89 45 ··· 103 147 static int __init iseries_proc_init(void) 104 148 { 105 149 struct proc_dir_entry *e; 106 - 107 - e = create_proc_entry("iSeries/lpevents", S_IFREG|S_IRUGO, NULL); 108 - if (e) 109 - e->proc_fops = &proc_lpevents_operations; 110 150 111 151 e = create_proc_entry("iSeries/titanTod", S_IFREG|S_IRUGO, NULL); 112 152 if (e)
+1 -42
arch/ppc64/kernel/iSeries_setup.c
··· 24 24 #include <linux/smp.h> 25 25 #include <linux/param.h> 26 26 #include <linux/string.h> 27 - #include <linux/bootmem.h> 28 27 #include <linux/initrd.h> 29 28 #include <linux/seq_file.h> 30 29 #include <linux/kdev_t.h> ··· 675 676 */ 676 677 static void __init iSeries_setup_arch(void) 677 678 { 678 - void *eventStack; 679 679 unsigned procIx = get_paca()->lppaca.dyn_hv_phys_proc_index; 680 680 681 681 /* Add an eye catcher and the systemcfg layout version number */ ··· 683 685 systemcfg->version.minor = SYSTEMCFG_MINOR; 684 686 685 687 /* Setup the Lp Event Queue */ 686 - 687 - /* Allocate a page for the Event Stack 688 - * The hypervisor wants the absolute real address, so 689 - * we subtract out the KERNELBASE and add in the 690 - * absolute real address of the kernel load area 691 - */ 692 - eventStack = alloc_bootmem_pages(LpEventStackSize); 693 - memset(eventStack, 0, LpEventStackSize); 694 - 695 - /* Invoke the hypervisor to initialize the event stack */ 696 - HvCallEvent_setLpEventStack(0, eventStack, LpEventStackSize); 697 - 698 - /* Initialize fields in our Lp Event Queue */ 699 - xItLpQueue.xSlicEventStackPtr = (char *)eventStack; 700 - xItLpQueue.xSlicCurEventPtr = (char *)eventStack; 701 - xItLpQueue.xSlicLastValidEventPtr = (char *)eventStack + 702 - (LpEventStackSize - LpEventMaxSize); 703 - xItLpQueue.xIndex = 0; 688 + setup_hvlpevent_queue(); 704 689 705 690 /* Compute processor frequency */ 706 691 procFreqHz = ((1UL << 34) * 1000000) / ··· 833 852 } 834 853 835 854 late_initcall(iSeries_src_init); 836 - 837 - static int set_spread_lpevents(char *str) 838 - { 839 - unsigned long i; 840 - unsigned long val = simple_strtoul(str, NULL, 0); 841 - 842 - /* 843 - * The parameter is the number of processors to share in processing 844 - * lp events. 845 - */ 846 - if (( val > 0) && (val <= NR_CPUS)) { 847 - for (i = 1; i < val; ++i) 848 - paca[i].lpqueue_ptr = paca[0].lpqueue_ptr; 849 - 850 - printk("lpevent processing spread over %ld processors\n", val); 851 - } else { 852 - printk("invalid spread_lpevents %ld\n", val); 853 - } 854 - 855 - return 1; 856 - } 857 - __setup("spread_lpevents=", set_spread_lpevents); 858 855 859 856 #ifndef CONFIG_PCI 860 857 void __init iSeries_init_IRQ(void) { }
+2 -2
arch/ppc64/kernel/idle.c
··· 88 88 89 89 while (1) { 90 90 if (lpaca->lppaca.shared_proc) { 91 - if (ItLpQueue_isLpIntPending(lpaca->lpqueue_ptr)) 91 + if (hvlpevent_is_pending()) 92 92 process_iSeries_events(); 93 93 if (!need_resched()) 94 94 yield_shared_processor(); ··· 100 100 101 101 while (!need_resched()) { 102 102 HMT_medium(); 103 - if (ItLpQueue_isLpIntPending(lpaca->lpqueue_ptr)) 103 + if (hvlpevent_is_pending()) 104 104 process_iSeries_events(); 105 105 HMT_low(); 106 106 }
+2 -5
arch/ppc64/kernel/irq.c
··· 66 66 int distribute_irqs = 1; 67 67 int __irq_offset_value; 68 68 int ppc_spurious_interrupts; 69 - unsigned long lpevent_count; 70 69 u64 ppc64_interrupt_controller; 71 70 72 71 int show_interrupts(struct seq_file *p, void *v) ··· 268 269 void do_IRQ(struct pt_regs *regs) 269 270 { 270 271 struct paca_struct *lpaca; 271 - struct ItLpQueue *lpq; 272 272 273 273 irq_enter(); 274 274 ··· 293 295 iSeries_smp_message_recv(regs); 294 296 } 295 297 #endif /* CONFIG_SMP */ 296 - lpq = lpaca->lpqueue_ptr; 297 - if (lpq && ItLpQueue_isLpIntPending(lpq)) 298 - lpevent_count += ItLpQueue_process(lpq, regs); 298 + if (hvlpevent_is_pending()) 299 + process_hvlpevents(regs); 299 300 300 301 irq_exit(); 301 302
+2 -4
arch/ppc64/kernel/mf.c
··· 801 801 return rc; 802 802 /* We need to poll here as we are not yet taking interrupts */ 803 803 while (rtc_data.busy) { 804 - extern unsigned long lpevent_count; 805 - struct ItLpQueue *lpq = get_paca()->lpqueue_ptr; 806 - if (lpq && ItLpQueue_isLpIntPending(lpq)) 807 - lpevent_count += ItLpQueue_process(lpq, NULL); 804 + if (hvlpevent_is_pending()) 805 + process_hvlpevents(NULL); 808 806 } 809 807 return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); 810 808 }
+3 -5
arch/ppc64/kernel/nvram.c
··· 338 338 */ 339 339 static int nvram_create_os_partition(void) 340 340 { 341 - struct list_head * p; 342 - struct nvram_partition *part = NULL; 343 - struct nvram_partition *new_part = NULL; 341 + struct nvram_partition *part; 342 + struct nvram_partition *new_part; 344 343 struct nvram_partition *free_part = NULL; 345 344 int seq_init[2] = { 0, 0 }; 346 345 loff_t tmp_index; ··· 348 349 349 350 /* Find a free partition that will give us the maximum needed size 350 351 If can't find one that will give us the minimum size needed */ 351 - list_for_each(p, &nvram_part->partition) { 352 - part = list_entry(p, struct nvram_partition, partition); 352 + list_for_each_entry(part, &nvram_part->partition, partition) { 353 353 if (part->header.signature != NVRAM_SIG_FREE) 354 354 continue; 355 355
+65 -147
arch/ppc64/kernel/pacaData.c
··· 42 42 * processors. The processor VPD array needs one entry per physical 43 43 * processor (not thread). 44 44 */ 45 - #ifdef CONFIG_PPC_ISERIES 46 - #define EXTRA_INITS(number, lpq) \ 47 - .lppaca_ptr = &paca[number].lppaca, \ 48 - .lpqueue_ptr = (lpq), /* &xItLpQueue, */ \ 49 - .reg_save_ptr = &paca[number].reg_save, \ 50 - .reg_save = { \ 51 - .xDesc = 0xd397d9e2, /* "LpRS" */ \ 52 - .xSize = sizeof(struct ItLpRegSave) \ 53 - }, 54 - #else 55 - #define EXTRA_INITS(number, lpq) 56 - #endif 57 - 58 - #define PACAINITDATA(number,start,lpq,asrr,asrv) \ 59 - { \ 45 + #define PACA_INIT_COMMON(number, start, asrr, asrv) \ 60 46 .lock_token = 0x8000, \ 61 47 .paca_index = (number), /* Paca Index */ \ 62 48 .default_decr = 0x00ff0000, /* Initial Decr */ \ ··· 60 74 .end_of_quantum = 0xfffffffffffffffful, \ 61 75 .slb_count = 64, \ 62 76 }, \ 63 - EXTRA_INITS((number), (lpq)) \ 77 + 78 + #ifdef CONFIG_PPC_ISERIES 79 + #define PACA_INIT_ISERIES(number) \ 80 + .lppaca_ptr = &paca[number].lppaca, \ 81 + .reg_save_ptr = &paca[number].reg_save, \ 82 + .reg_save = { \ 83 + .xDesc = 0xd397d9e2, /* "LpRS" */ \ 84 + .xSize = sizeof(struct ItLpRegSave) \ 85 + } 86 + 87 + #define PACA_INIT(number) \ 88 + { \ 89 + PACA_INIT_COMMON(number, 0, 0, 0) \ 90 + PACA_INIT_ISERIES(number) \ 64 91 } 65 92 66 - struct paca_struct paca[] = { 67 - #ifdef CONFIG_PPC_ISERIES 68 - PACAINITDATA( 0, 1, &xItLpQueue, 0, STAB0_VIRT_ADDR), 93 + #define BOOTCPU_PACA_INIT(number) \ 94 + { \ 95 + PACA_INIT_COMMON(number, 1, 0, STAB0_VIRT_ADDR) \ 96 + PACA_INIT_ISERIES(number) \ 97 + } 98 + 69 99 #else 70 - PACAINITDATA( 0, 1, NULL, STAB0_PHYS_ADDR, STAB0_VIRT_ADDR), 100 + #define PACA_INIT(number) \ 101 + { \ 102 + PACA_INIT_COMMON(number, 0, 0, 0) \ 103 + } 104 + 105 + #define BOOTCPU_PACA_INIT(number) \ 106 + { \ 107 + PACA_INIT_COMMON(number, 1, STAB0_PHYS_ADDR, STAB0_VIRT_ADDR) \ 108 + } 71 109 #endif 110 + 111 + struct paca_struct paca[] = { 112 + BOOTCPU_PACA_INIT(0), 72 113 #if NR_CPUS > 1 73 - PACAINITDATA( 1, 0, NULL, 0, 0), 74 - PACAINITDATA( 2, 0, NULL, 0, 0), 75 - PACAINITDATA( 3, 0, NULL, 0, 0), 114 + PACA_INIT( 1), PACA_INIT( 2), PACA_INIT( 3), 76 115 #if NR_CPUS > 4 77 - PACAINITDATA( 4, 0, NULL, 0, 0), 78 - PACAINITDATA( 5, 0, NULL, 0, 0), 79 - PACAINITDATA( 6, 0, NULL, 0, 0), 80 - PACAINITDATA( 7, 0, NULL, 0, 0), 116 + PACA_INIT( 4), PACA_INIT( 5), PACA_INIT( 6), PACA_INIT( 7), 81 117 #if NR_CPUS > 8 82 - PACAINITDATA( 8, 0, NULL, 0, 0), 83 - PACAINITDATA( 9, 0, NULL, 0, 0), 84 - PACAINITDATA(10, 0, NULL, 0, 0), 85 - PACAINITDATA(11, 0, NULL, 0, 0), 86 - PACAINITDATA(12, 0, NULL, 0, 0), 87 - PACAINITDATA(13, 0, NULL, 0, 0), 88 - PACAINITDATA(14, 0, NULL, 0, 0), 89 - PACAINITDATA(15, 0, NULL, 0, 0), 90 - PACAINITDATA(16, 0, NULL, 0, 0), 91 - PACAINITDATA(17, 0, NULL, 0, 0), 92 - PACAINITDATA(18, 0, NULL, 0, 0), 93 - PACAINITDATA(19, 0, NULL, 0, 0), 94 - PACAINITDATA(20, 0, NULL, 0, 0), 95 - PACAINITDATA(21, 0, NULL, 0, 0), 96 - PACAINITDATA(22, 0, NULL, 0, 0), 97 - PACAINITDATA(23, 0, NULL, 0, 0), 98 - PACAINITDATA(24, 0, NULL, 0, 0), 99 - PACAINITDATA(25, 0, NULL, 0, 0), 100 - PACAINITDATA(26, 0, NULL, 0, 0), 101 - PACAINITDATA(27, 0, NULL, 0, 0), 102 - PACAINITDATA(28, 0, NULL, 0, 0), 103 - PACAINITDATA(29, 0, NULL, 0, 0), 104 - PACAINITDATA(30, 0, NULL, 0, 0), 105 - PACAINITDATA(31, 0, NULL, 0, 0), 118 + PACA_INIT( 8), PACA_INIT( 9), PACA_INIT( 10), PACA_INIT( 11), 119 + PACA_INIT( 12), PACA_INIT( 13), PACA_INIT( 14), PACA_INIT( 15), 120 + PACA_INIT( 16), PACA_INIT( 17), PACA_INIT( 18), PACA_INIT( 19), 121 + PACA_INIT( 20), PACA_INIT( 21), PACA_INIT( 22), PACA_INIT( 23), 122 + PACA_INIT( 24), PACA_INIT( 25), PACA_INIT( 26), PACA_INIT( 27), 123 + PACA_INIT( 28), PACA_INIT( 29), PACA_INIT( 30), PACA_INIT( 31), 106 124 #if NR_CPUS > 32 107 - PACAINITDATA(32, 0, NULL, 0, 0), 108 - PACAINITDATA(33, 0, NULL, 0, 0), 109 - PACAINITDATA(34, 0, NULL, 0, 0), 110 - PACAINITDATA(35, 0, NULL, 0, 0), 111 - PACAINITDATA(36, 0, NULL, 0, 0), 112 - PACAINITDATA(37, 0, NULL, 0, 0), 113 - PACAINITDATA(38, 0, NULL, 0, 0), 114 - PACAINITDATA(39, 0, NULL, 0, 0), 115 - PACAINITDATA(40, 0, NULL, 0, 0), 116 - PACAINITDATA(41, 0, NULL, 0, 0), 117 - PACAINITDATA(42, 0, NULL, 0, 0), 118 - PACAINITDATA(43, 0, NULL, 0, 0), 119 - PACAINITDATA(44, 0, NULL, 0, 0), 120 - PACAINITDATA(45, 0, NULL, 0, 0), 121 - PACAINITDATA(46, 0, NULL, 0, 0), 122 - PACAINITDATA(47, 0, NULL, 0, 0), 123 - PACAINITDATA(48, 0, NULL, 0, 0), 124 - PACAINITDATA(49, 0, NULL, 0, 0), 125 - PACAINITDATA(50, 0, NULL, 0, 0), 126 - PACAINITDATA(51, 0, NULL, 0, 0), 127 - PACAINITDATA(52, 0, NULL, 0, 0), 128 - PACAINITDATA(53, 0, NULL, 0, 0), 129 - PACAINITDATA(54, 0, NULL, 0, 0), 130 - PACAINITDATA(55, 0, NULL, 0, 0), 131 - PACAINITDATA(56, 0, NULL, 0, 0), 132 - PACAINITDATA(57, 0, NULL, 0, 0), 133 - PACAINITDATA(58, 0, NULL, 0, 0), 134 - PACAINITDATA(59, 0, NULL, 0, 0), 135 - PACAINITDATA(60, 0, NULL, 0, 0), 136 - PACAINITDATA(61, 0, NULL, 0, 0), 137 - PACAINITDATA(62, 0, NULL, 0, 0), 138 - PACAINITDATA(63, 0, NULL, 0, 0), 125 + PACA_INIT( 32), PACA_INIT( 33), PACA_INIT( 34), PACA_INIT( 35), 126 + PACA_INIT( 36), PACA_INIT( 37), PACA_INIT( 38), PACA_INIT( 39), 127 + PACA_INIT( 40), PACA_INIT( 41), PACA_INIT( 42), PACA_INIT( 43), 128 + PACA_INIT( 44), PACA_INIT( 45), PACA_INIT( 46), PACA_INIT( 47), 129 + PACA_INIT( 48), PACA_INIT( 49), PACA_INIT( 50), PACA_INIT( 51), 130 + PACA_INIT( 52), PACA_INIT( 53), PACA_INIT( 54), PACA_INIT( 55), 131 + PACA_INIT( 56), PACA_INIT( 57), PACA_INIT( 58), PACA_INIT( 59), 132 + PACA_INIT( 60), PACA_INIT( 61), PACA_INIT( 62), PACA_INIT( 63), 139 133 #if NR_CPUS > 64 140 - PACAINITDATA(64, 0, NULL, 0, 0), 141 - PACAINITDATA(65, 0, NULL, 0, 0), 142 - PACAINITDATA(66, 0, NULL, 0, 0), 143 - PACAINITDATA(67, 0, NULL, 0, 0), 144 - PACAINITDATA(68, 0, NULL, 0, 0), 145 - PACAINITDATA(69, 0, NULL, 0, 0), 146 - PACAINITDATA(70, 0, NULL, 0, 0), 147 - PACAINITDATA(71, 0, NULL, 0, 0), 148 - PACAINITDATA(72, 0, NULL, 0, 0), 149 - PACAINITDATA(73, 0, NULL, 0, 0), 150 - PACAINITDATA(74, 0, NULL, 0, 0), 151 - PACAINITDATA(75, 0, NULL, 0, 0), 152 - PACAINITDATA(76, 0, NULL, 0, 0), 153 - PACAINITDATA(77, 0, NULL, 0, 0), 154 - PACAINITDATA(78, 0, NULL, 0, 0), 155 - PACAINITDATA(79, 0, NULL, 0, 0), 156 - PACAINITDATA(80, 0, NULL, 0, 0), 157 - PACAINITDATA(81, 0, NULL, 0, 0), 158 - PACAINITDATA(82, 0, NULL, 0, 0), 159 - PACAINITDATA(83, 0, NULL, 0, 0), 160 - PACAINITDATA(84, 0, NULL, 0, 0), 161 - PACAINITDATA(85, 0, NULL, 0, 0), 162 - PACAINITDATA(86, 0, NULL, 0, 0), 163 - PACAINITDATA(87, 0, NULL, 0, 0), 164 - PACAINITDATA(88, 0, NULL, 0, 0), 165 - PACAINITDATA(89, 0, NULL, 0, 0), 166 - PACAINITDATA(90, 0, NULL, 0, 0), 167 - PACAINITDATA(91, 0, NULL, 0, 0), 168 - PACAINITDATA(92, 0, NULL, 0, 0), 169 - PACAINITDATA(93, 0, NULL, 0, 0), 170 - PACAINITDATA(94, 0, NULL, 0, 0), 171 - PACAINITDATA(95, 0, NULL, 0, 0), 172 - PACAINITDATA(96, 0, NULL, 0, 0), 173 - PACAINITDATA(97, 0, NULL, 0, 0), 174 - PACAINITDATA(98, 0, NULL, 0, 0), 175 - PACAINITDATA(99, 0, NULL, 0, 0), 176 - PACAINITDATA(100, 0, NULL, 0, 0), 177 - PACAINITDATA(101, 0, NULL, 0, 0), 178 - PACAINITDATA(102, 0, NULL, 0, 0), 179 - PACAINITDATA(103, 0, NULL, 0, 0), 180 - PACAINITDATA(104, 0, NULL, 0, 0), 181 - PACAINITDATA(105, 0, NULL, 0, 0), 182 - PACAINITDATA(106, 0, NULL, 0, 0), 183 - PACAINITDATA(107, 0, NULL, 0, 0), 184 - PACAINITDATA(108, 0, NULL, 0, 0), 185 - PACAINITDATA(109, 0, NULL, 0, 0), 186 - PACAINITDATA(110, 0, NULL, 0, 0), 187 - PACAINITDATA(111, 0, NULL, 0, 0), 188 - PACAINITDATA(112, 0, NULL, 0, 0), 189 - PACAINITDATA(113, 0, NULL, 0, 0), 190 - PACAINITDATA(114, 0, NULL, 0, 0), 191 - PACAINITDATA(115, 0, NULL, 0, 0), 192 - PACAINITDATA(116, 0, NULL, 0, 0), 193 - PACAINITDATA(117, 0, NULL, 0, 0), 194 - PACAINITDATA(118, 0, NULL, 0, 0), 195 - PACAINITDATA(119, 0, NULL, 0, 0), 196 - PACAINITDATA(120, 0, NULL, 0, 0), 197 - PACAINITDATA(121, 0, NULL, 0, 0), 198 - PACAINITDATA(122, 0, NULL, 0, 0), 199 - PACAINITDATA(123, 0, NULL, 0, 0), 200 - PACAINITDATA(124, 0, NULL, 0, 0), 201 - PACAINITDATA(125, 0, NULL, 0, 0), 202 - PACAINITDATA(126, 0, NULL, 0, 0), 203 - PACAINITDATA(127, 0, NULL, 0, 0), 134 + PACA_INIT( 64), PACA_INIT( 65), PACA_INIT( 66), PACA_INIT( 67), 135 + PACA_INIT( 68), PACA_INIT( 69), PACA_INIT( 70), PACA_INIT( 71), 136 + PACA_INIT( 72), PACA_INIT( 73), PACA_INIT( 74), PACA_INIT( 75), 137 + PACA_INIT( 76), PACA_INIT( 77), PACA_INIT( 78), PACA_INIT( 79), 138 + PACA_INIT( 80), PACA_INIT( 81), PACA_INIT( 82), PACA_INIT( 83), 139 + PACA_INIT( 84), PACA_INIT( 85), PACA_INIT( 86), PACA_INIT( 87), 140 + PACA_INIT( 88), PACA_INIT( 89), PACA_INIT( 90), PACA_INIT( 91), 141 + PACA_INIT( 92), PACA_INIT( 93), PACA_INIT( 94), PACA_INIT( 95), 142 + PACA_INIT( 96), PACA_INIT( 97), PACA_INIT( 98), PACA_INIT( 99), 143 + PACA_INIT(100), PACA_INIT(101), PACA_INIT(102), PACA_INIT(103), 144 + PACA_INIT(104), PACA_INIT(105), PACA_INIT(106), PACA_INIT(107), 145 + PACA_INIT(108), PACA_INIT(109), PACA_INIT(110), PACA_INIT(111), 146 + PACA_INIT(112), PACA_INIT(113), PACA_INIT(114), PACA_INIT(115), 147 + PACA_INIT(116), PACA_INIT(117), PACA_INIT(118), PACA_INIT(119), 148 + PACA_INIT(120), PACA_INIT(121), PACA_INIT(122), PACA_INIT(123), 149 + PACA_INIT(124), PACA_INIT(125), PACA_INIT(126), PACA_INIT(127), 204 150 #endif 205 151 #endif 206 152 #endif
+6 -1
arch/ppc64/kernel/sysfs.c
··· 400 400 struct cpu *c = &per_cpu(cpu_devices, cpu); 401 401 402 402 #ifdef CONFIG_NUMA 403 - parent = &node_devices[cpu_to_node(cpu)]; 403 + /* The node to which a cpu belongs can't be known 404 + * until the cpu is made present. 405 + */ 406 + parent = NULL; 407 + if (cpu_present(cpu)) 408 + parent = &node_devices[cpu_to_node(cpu)]; 404 409 #endif 405 410 /* 406 411 * For now, we just see if the system supports making
+2 -6
arch/ppc64/kernel/time.c
··· 99 99 struct gettimeofday_struct do_gtod; 100 100 101 101 extern unsigned long wall_jiffies; 102 - extern unsigned long lpevent_count; 103 102 extern int smp_tb_synchronized; 104 103 105 104 extern struct timezone sys_tz; ··· 366 367 set_dec(next_dec); 367 368 368 369 #ifdef CONFIG_PPC_ISERIES 369 - { 370 - struct ItLpQueue *lpq = lpaca->lpqueue_ptr; 371 - if (lpq && ItLpQueue_isLpIntPending(lpq)) 372 - lpevent_count += ItLpQueue_process(lpq, regs); 373 - } 370 + if (hvlpevent_is_pending()) 371 + process_hvlpevents(regs); 374 372 #endif 375 373 376 374 /* collect purr register values often, for accurate calculations */
-1
arch/x86_64/kernel/io_apic.c
··· 1064 1064 1065 1065 void __apicdebuginit print_PIC(void) 1066 1066 { 1067 - extern spinlock_t i8259A_lock; 1068 1067 unsigned int v; 1069 1068 unsigned long flags; 1070 1069
+3 -1
arch/xtensa/Kconfig
··· 132 132 config GENERIC_CALIBRATE_DELAY 133 133 bool "Auto calibration of the BogoMIPS value" 134 134 ---help--- 135 - The BogoMIPS value can easily derived from the CPU frequency. 135 + The BogoMIPS value can easily be derived from the CPU frequency. 136 136 137 137 config CMDLINE_BOOL 138 138 bool "Default bootloader kernel arguments" ··· 157 157 bool 158 158 depends on XTENSA_PLATFORM_ISS 159 159 default y 160 + 161 + source "mm/Kconfig" 160 162 161 163 endmenu 162 164
+25 -23
arch/xtensa/Makefile
··· 21 21 22 22 # Platform configuration 23 23 24 - platform-y := common 25 24 platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 26 25 platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss 27 26 28 27 PLATFORM = $(platform-y) 29 28 export PLATFORM 30 29 31 - #LDFLAGS_vmlinux := -T$(word 1,$(LINKSCRIPT)) 32 - AFLAGS_vmlinux.lds.o := -Uxtensa 33 - CPPFLAGS += -Iarch/xtensa -Iinclude/asm -mlongcalls -g 34 - AFLAGS += -Iarch/xtensa -Iinclude/asm 35 - CPP = $(CC) -E $(CFLAGS) 30 + CPPFLAGS += $(if $(KBUILD_SRC),-I$(srctree)/include/asm-xtensa/) 31 + CPPFLAGS += -Iinclude/asm 32 + CFLAGS += -pipe -mlongcalls 36 33 37 - cflags-y += -Iarch/xtensa -pipe -mlongcalls 38 - 39 - 40 - KBUILD_DEFCONFIG := common_defconfig 34 + KBUILD_DEFCONFIG := iss_defconfig 41 35 42 36 # ramdisk/initrd support 43 37 # You need a compressed ramdisk image, named ramdisk.gz in ··· 56 62 LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 57 63 58 64 head-y := arch/xtensa/kernel/head.o 59 - core-y += arch/xtensa/kernel/ \ 60 - arch/xtensa/mm/ arch/xtensa/platform-$(PLATFORM)/ 65 + core-y += arch/xtensa/kernel/ arch/xtensa/mm/ 66 + ifneq ($(PLATFORM),) 67 + core-y += arch/xtensa/platform-$(PLATFORM)/ 68 + endif 61 69 libs-y += arch/xtensa/lib/ $(LIBGCC) 62 70 63 - boot := arch/xtensa/boot 71 + boot := arch/xtensa/boot 72 + 73 + archinc := include/asm-xtensa 64 74 65 75 arch/xtensa/kernel/asm-offsets.s: \ 66 - arch/xtensa/kernel/asm-offsets.c \ 67 - include/asm-xtensa/.platform 76 + arch/xtensa/kernel/asm-offsets.c $(archinc)/.platform 68 77 69 78 include/asm-xtensa/offsets.h: arch/xtensa/kernel/asm-offsets.s 70 79 $(call filechk,gen-asm-offsets) 71 80 72 - prepare: include/asm-xtensa/.platform include/asm-xtensa/offsets.h 81 + prepare: $(archinc)/.platform $(archinc)/offsets.h 73 82 74 83 # Update machine cpu and platform symlinks if something which affects 75 84 # them changed. 76 85 77 - include/asm-xtensa/.platform: $(wildcard include/config/arch/*.h) 78 - @echo ' Setting up cpu ($(CPU)) and platform ($(PLATFORM)) symlinks' 79 - $(Q)rm -f include/asm-xtensa/platform 80 - $(Q)rm -f include/asm-xtensa/xtensa/config 81 - $(Q)(cd include/asm-xtensa/; ln -sf platform-$(PLATFORM) platform) 82 - $(Q)(cd include/asm-xtensa/xtensa; ln -sf config-$(CPU) config) 86 + $(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/MARKER 87 + @echo ' SYMLINK $(archinc)/xtensa/config -> $(archinc)/xtensa/config-$(CPU)' 88 + $(Q)mkdir -p $(archinc) 89 + $(Q)mkdir -p $(archinc)/xtensa 90 + $(Q)ln -fsn $(srctree)/$(archinc)/xtensa/config-$(CPU) $(archinc)/xtensa/config 91 + @echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)' 92 + $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform 93 + @touch $@ 94 + 83 95 84 96 all: zImage 85 97 ··· 94 94 zImage zImage.initrd: vmlinux 95 95 $(Q)$(MAKE) $(build)=$(boot) $@ 96 96 97 - CLEAN_FILES += arch/xtensa/vmlinux.lds include/asm-xtensa/offset.h 97 + CLEAN_FILES += arch/xtensa/vmlinux.lds $(archinc)/offset.h \ 98 + $(archinc)/platform $(archinc)/xtensa/config \ 99 + $(archinc)/.platform 98 100 99 101 define archhelp 100 102 @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
+3 -7
arch/xtensa/boot/Makefile
··· 11 11 CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include 12 12 HOSTFLAGS += -Iarch/$(ARCH)/boot/include 13 13 14 - BIG_ENDIAN := $(shell echo -e "\#ifdef __XTENSA_EL__\nint little;\n\#else\nint big;\n\#endif" | $(CC) -E -|grep -c big) 15 - 14 + BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") 16 15 17 16 export CFLAGS 18 17 export AFLAGS 19 18 export BIG_ENDIAN 19 + 20 + subdir-y := lib 20 21 21 22 # Subdirs for the boot loader(s) 22 23 23 24 bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf 24 25 bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf 25 26 26 - subdir-y := lib/ 27 - 28 - subdir-y += boot-elf/ boot-redboot/ 29 27 30 28 zImage zImage.initrd Image Image.initrd: $(bootdir-y) 31 29 32 30 $(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \ 33 31 $(addprefix $(obj)/,$(host-progs)) 34 32 $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) 35 - 36 - 37 33
+2 -2
arch/xtensa/boot/boot-elf/Makefile
··· 27 27 --set-section-flags image=contents,alloc,load,load,data \ 28 28 $(OBJS) $@.tmp 29 29 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ 30 - -T arch/$(ARCH)/boot/boot-elf/boot.ld \ 30 + -T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \ 31 31 -o arch/$(ARCH)/boot/$@.elf $@.tmp 32 32 rm -f $@.tmp vmlinux.tmp 33 33 ··· 41 41 --set-section-flags image=contents,alloc,load,load,data \ 42 42 $(OBJS) $@.tmp 43 43 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ 44 - -T arch/$(ARCH)/boot/boot-elf/boot.ld \ 44 + -T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \ 45 45 -o arch/$(ARCH)/boot/$@.elf $@.tmp 46 46 rm -f $@.tmp vmlinux.tmp 47 47
+5 -5
arch/xtensa/boot/boot-redboot/Makefile
··· 12 12 OBJCOPY_ARGS := -O elf32-xtensa-le 13 13 endif 14 14 15 - LD_ARGS = -T $(obj)/boot.ld 15 + LD_ARGS = -T $(srctree)/$(obj)/boot.ld 16 16 17 17 boot-y := bootstrap.o 18 18 19 19 OBJS := $(addprefix $(obj)/,$(boot-y)) 20 - LIBS := arch/$(ARCH)/boot/lib/lib.a arch/$(ARCH)/lib/lib.a 20 + LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a 21 21 22 22 LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 23 23 24 24 zImage: vmlinux $(OBJS) $(LIBS) 25 25 $(OBJCOPY) --strip-all -R .comment -R .xt.insn -O binary \ 26 - $(TOPDIR)/vmlinux vmlinux.tmp 26 + vmlinux vmlinux.tmp 27 27 gzip -vf9 vmlinux.tmp 28 28 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ 29 29 --add-section image=vmlinux.tmp.gz \ 30 30 --set-section-flags image=contents,alloc,load,load,data \ 31 31 $(OBJS) $@.tmp 32 32 $(LD) $(LD_ARGS) -o $@.elf $@.tmp $(LIBS) -L/xtensa-elf/lib $(LIBGCC) 33 - $(OBJCOPY) -S -O binary $@.elf arch/$(ARCH)/boot/images/$@.redboot 34 - # rm -f $@.tmp $@.elf vmlinux.tmp.gz 33 + $(OBJCOPY) -S -O binary $@.elf arch/$(ARCH)/boot/$@.redboot 34 + rm -f $@.tmp $@.elf vmlinux.tmp.gz 35 35
-433
arch/xtensa/boot/include/zlib.h
··· 1 - /* 2 - * BK Id: SCCS/s.zlib.h 1.8 05/18/01 15:17:23 cort 3 - */ 4 - /* 5 - * This file is derived from zlib.h and zconf.h from the zlib-0.95 6 - * distribution by Jean-loup Gailly and Mark Adler, with some additions 7 - * by Paul Mackerras to aid in implementing Deflate compression and 8 - * decompression for PPP packets. 9 - */ 10 - 11 - /* 12 - * ==FILEVERSION 960122== 13 - * 14 - * This marker is used by the Linux installation script to determine 15 - * whether an up-to-date version of this file is already installed. 16 - */ 17 - 18 - /* zlib.h -- interface of the 'zlib' general purpose compression library 19 - version 0.95, Aug 16th, 1995. 20 - 21 - Copyright (C) 1995 Jean-loup Gailly and Mark Adler 22 - 23 - This software is provided 'as-is', without any express or implied 24 - warranty. In no event will the authors be held liable for any damages 25 - arising from the use of this software. 26 - 27 - Permission is granted to anyone to use this software for any purpose, 28 - including commercial applications, and to alter it and redistribute it 29 - freely, subject to the following restrictions: 30 - 31 - 1. The origin of this software must not be misrepresented; you must not 32 - claim that you wrote the original software. If you use this software 33 - in a product, an acknowledgment in the product documentation would be 34 - appreciated but is not required. 35 - 2. Altered source versions must be plainly marked as such, and must not be 36 - misrepresented as being the original software. 37 - 3. This notice may not be removed or altered from any source distribution. 38 - 39 - Jean-loup Gailly Mark Adler 40 - gzip@prep.ai.mit.edu madler@alumni.caltech.edu 41 - */ 42 - 43 - #ifndef _ZLIB_H 44 - #define _ZLIB_H 45 - 46 - /* #include "zconf.h" */ /* included directly here */ 47 - 48 - /* zconf.h -- configuration of the zlib compression library 49 - * Copyright (C) 1995 Jean-loup Gailly. 50 - * For conditions of distribution and use, see copyright notice in zlib.h 51 - */ 52 - 53 - /* From: zconf.h,v 1.12 1995/05/03 17:27:12 jloup Exp */ 54 - 55 - /* 56 - The library does not install any signal handler. It is recommended to 57 - add at least a handler for SIGSEGV when decompressing; the library checks 58 - the consistency of the input data whenever possible but may go nuts 59 - for some forms of corrupted input. 60 - */ 61 - 62 - /* 63 - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more 64 - * than 64k bytes at a time (needed on systems with 16-bit int). 65 - * Compile with -DUNALIGNED_OK if it is OK to access shorts or ints 66 - * at addresses which are not a multiple of their size. 67 - * Under DOS, -DFAR=far or -DFAR=__far may be needed. 68 - */ 69 - 70 - #ifndef STDC 71 - # if defined(MSDOS) || defined(__STDC__) || defined(__cplusplus) 72 - # define STDC 73 - # endif 74 - #endif 75 - 76 - #ifdef __MWERKS__ /* Metrowerks CodeWarrior declares fileno() in unix.h */ 77 - # include <unix.h> 78 - #endif 79 - 80 - /* Maximum value for memLevel in deflateInit2 */ 81 - #ifndef MAX_MEM_LEVEL 82 - # ifdef MAXSEG_64K 83 - # define MAX_MEM_LEVEL 8 84 - # else 85 - # define MAX_MEM_LEVEL 9 86 - # endif 87 - #endif 88 - 89 - #ifndef FAR 90 - # define FAR 91 - #endif 92 - 93 - /* Maximum value for windowBits in deflateInit2 and inflateInit2 */ 94 - #ifndef MAX_WBITS 95 - # define MAX_WBITS 15 /* 32K LZ77 window */ 96 - #endif 97 - 98 - /* The memory requirements for deflate are (in bytes): 99 - 1 << (windowBits+2) + 1 << (memLevel+9) 100 - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 101 - plus a few kilobytes for small objects. For example, if you want to reduce 102 - the default memory requirements from 256K to 128K, compile with 103 - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 104 - Of course this will generally degrade compression (there's no free lunch). 105 - 106 - The memory requirements for inflate are (in bytes) 1 << windowBits 107 - that is, 32K for windowBits=15 (default value) plus a few kilobytes 108 - for small objects. 109 - */ 110 - 111 - /* Type declarations */ 112 - 113 - #ifndef OF /* function prototypes */ 114 - # ifdef STDC 115 - # define OF(args) args 116 - # else 117 - # define OF(args) () 118 - # endif 119 - #endif 120 - 121 - typedef unsigned char Byte; /* 8 bits */ 122 - typedef unsigned int uInt; /* 16 bits or more */ 123 - typedef unsigned long uLong; /* 32 bits or more */ 124 - 125 - typedef Byte FAR Bytef; 126 - typedef char FAR charf; 127 - typedef int FAR intf; 128 - typedef uInt FAR uIntf; 129 - typedef uLong FAR uLongf; 130 - 131 - #ifdef STDC 132 - typedef void FAR *voidpf; 133 - typedef void *voidp; 134 - #else 135 - typedef Byte FAR *voidpf; 136 - typedef Byte *voidp; 137 - #endif 138 - 139 - /* end of original zconf.h */ 140 - 141 - #define ZLIB_VERSION "0.95P" 142 - 143 - /* 144 - The 'zlib' compression library provides in-memory compression and 145 - decompression functions, including integrity checks of the uncompressed 146 - data. This version of the library supports only one compression method 147 - (deflation) but other algorithms may be added later and will have the same 148 - stream interface. 149 - 150 - For compression the application must provide the output buffer and 151 - may optionally provide the input buffer for optimization. For decompression, 152 - the application must provide the input buffer and may optionally provide 153 - the output buffer for optimization. 154 - 155 - Compression can be done in a single step if the buffers are large 156 - enough (for example if an input file is mmap'ed), or can be done by 157 - repeated calls of the compression function. In the latter case, the 158 - application must provide more input and/or consume the output 159 - (providing more output space) before each call. 160 - */ 161 - 162 - typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); 163 - typedef void (*free_func) OF((voidpf opaque, voidpf address, uInt nbytes)); 164 - 165 - struct internal_state; 166 - 167 - typedef struct z_stream_s { 168 - Bytef *next_in; /* next input byte */ 169 - uInt avail_in; /* number of bytes available at next_in */ 170 - uLong total_in; /* total nb of input bytes read so far */ 171 - 172 - Bytef *next_out; /* next output byte should be put there */ 173 - uInt avail_out; /* remaining free space at next_out */ 174 - uLong total_out; /* total nb of bytes output so far */ 175 - 176 - char *msg; /* last error message, NULL if no error */ 177 - struct internal_state FAR *state; /* not visible by applications */ 178 - 179 - alloc_func zalloc; /* used to allocate the internal state */ 180 - free_func zfree; /* used to free the internal state */ 181 - voidp opaque; /* private data object passed to zalloc and zfree */ 182 - 183 - Byte data_type; /* best guess about the data type: ascii or binary */ 184 - 185 - } z_stream; 186 - 187 - /* 188 - The application must update next_in and avail_in when avail_in has 189 - dropped to zero. It must update next_out and avail_out when avail_out 190 - has dropped to zero. The application must initialize zalloc, zfree and 191 - opaque before calling the init function. All other fields are set by the 192 - compression library and must not be updated by the application. 193 - 194 - The opaque value provided by the application will be passed as the first 195 - parameter for calls of zalloc and zfree. This can be useful for custom 196 - memory management. The compression library attaches no meaning to the 197 - opaque value. 198 - 199 - zalloc must return Z_NULL if there is not enough memory for the object. 200 - On 16-bit systems, the functions zalloc and zfree must be able to allocate 201 - exactly 65536 bytes, but will not be required to allocate more than this 202 - if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, 203 - pointers returned by zalloc for objects of exactly 65536 bytes *must* 204 - have their offset normalized to zero. The default allocation function 205 - provided by this library ensures this (see zutil.c). To reduce memory 206 - requirements and avoid any allocation of 64K objects, at the expense of 207 - compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). 208 - 209 - The fields total_in and total_out can be used for statistics or 210 - progress reports. After compression, total_in holds the total size of 211 - the uncompressed data and may be saved for use in the decompressor 212 - (particularly if the decompressor wants to decompress everything in 213 - a single step). 214 - */ 215 - 216 - /* constants */ 217 - 218 - #define Z_NO_FLUSH 0 219 - #define Z_PARTIAL_FLUSH 1 220 - #define Z_FULL_FLUSH 2 221 - #define Z_SYNC_FLUSH 3 /* experimental: partial_flush + byte align */ 222 - #define Z_FINISH 4 223 - #define Z_PACKET_FLUSH 5 224 - /* See deflate() below for the usage of these constants */ 225 - 226 - #define Z_OK 0 227 - #define Z_STREAM_END 1 228 - #define Z_ERRNO (-1) 229 - #define Z_STREAM_ERROR (-2) 230 - #define Z_DATA_ERROR (-3) 231 - #define Z_MEM_ERROR (-4) 232 - #define Z_BUF_ERROR (-5) 233 - /* error codes for the compression/decompression functions */ 234 - 235 - #define Z_BEST_SPEED 1 236 - #define Z_BEST_COMPRESSION 9 237 - #define Z_DEFAULT_COMPRESSION (-1) 238 - /* compression levels */ 239 - 240 - #define Z_FILTERED 1 241 - #define Z_HUFFMAN_ONLY 2 242 - #define Z_DEFAULT_STRATEGY 0 243 - 244 - #define Z_BINARY 0 245 - #define Z_ASCII 1 246 - #define Z_UNKNOWN 2 247 - /* Used to set the data_type field */ 248 - 249 - #define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ 250 - 251 - extern char *zlib_version; 252 - /* The application can compare zlib_version and ZLIB_VERSION for consistency. 253 - If the first character differs, the library code actually used is 254 - not compatible with the zlib.h header file used by the application. 255 - */ 256 - 257 - /* basic functions */ 258 - 259 - extern int inflateInit OF((z_stream *strm)); 260 - /* 261 - Initializes the internal stream state for decompression. The fields 262 - zalloc and zfree must be initialized before by the caller. If zalloc and 263 - zfree are set to Z_NULL, inflateInit updates them to use default allocation 264 - functions. 265 - 266 - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not 267 - enough memory. msg is set to null if there is no error message. 268 - inflateInit does not perform any decompression: this will be done by 269 - inflate(). 270 - */ 271 - 272 - 273 - extern int inflate OF((z_stream *strm, int flush)); 274 - /* 275 - Performs one or both of the following actions: 276 - 277 - - Decompress more input starting at next_in and update next_in and avail_in 278 - accordingly. If not all input can be processed (because there is not 279 - enough room in the output buffer), next_in is updated and processing 280 - will resume at this point for the next call of inflate(). 281 - 282 - - Provide more output starting at next_out and update next_out and avail_out 283 - accordingly. inflate() always provides as much output as possible 284 - (until there is no more input data or no more space in the output buffer). 285 - 286 - Before the call of inflate(), the application should ensure that at least 287 - one of the actions is possible, by providing more input and/or consuming 288 - more output, and updating the next_* and avail_* values accordingly. 289 - The application can consume the uncompressed output when it wants, for 290 - example when the output buffer is full (avail_out == 0), or after each 291 - call of inflate(). 292 - 293 - If the parameter flush is set to Z_PARTIAL_FLUSH or Z_PACKET_FLUSH, 294 - inflate flushes as much output as possible to the output buffer. The 295 - flushing behavior of inflate is not specified for values of the flush 296 - parameter other than Z_PARTIAL_FLUSH, Z_PACKET_FLUSH or Z_FINISH, but the 297 - current implementation actually flushes as much output as possible 298 - anyway. For Z_PACKET_FLUSH, inflate checks that once all the input data 299 - has been consumed, it is expecting to see the length field of a stored 300 - block; if not, it returns Z_DATA_ERROR. 301 - 302 - inflate() should normally be called until it returns Z_STREAM_END or an 303 - error. However if all decompression is to be performed in a single step 304 - (a single call of inflate), the parameter flush should be set to 305 - Z_FINISH. In this case all pending input is processed and all pending 306 - output is flushed; avail_out must be large enough to hold all the 307 - uncompressed data. (The size of the uncompressed data may have been saved 308 - by the compressor for this purpose.) The next operation on this stream must 309 - be inflateEnd to deallocate the decompression state. The use of Z_FINISH 310 - is never required, but can be used to inform inflate that a faster routine 311 - may be used for the single inflate() call. 312 - 313 - inflate() returns Z_OK if some progress has been made (more input 314 - processed or more output produced), Z_STREAM_END if the end of the 315 - compressed data has been reached and all uncompressed output has been 316 - produced, Z_DATA_ERROR if the input data was corrupted, Z_STREAM_ERROR if 317 - the stream structure was inconsistent (for example if next_in or next_out 318 - was NULL), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if no 319 - progress is possible or if there was not enough room in the output buffer 320 - when Z_FINISH is used. In the Z_DATA_ERROR case, the application may then 321 - call inflateSync to look for a good compression block. */ 322 - 323 - 324 - extern int inflateEnd OF((z_stream *strm)); 325 - /* 326 - All dynamically allocated data structures for this stream are freed. 327 - This function discards any unprocessed input and does not flush any 328 - pending output. 329 - 330 - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state 331 - was inconsistent. In the error case, msg may be set but then points to a 332 - static string (which must not be deallocated). 333 - */ 334 - 335 - /* advanced functions */ 336 - 337 - extern int inflateInit2 OF((z_stream *strm, 338 - int windowBits)); 339 - /* 340 - This is another version of inflateInit with more compression options. The 341 - fields next_out, zalloc and zfree must be initialized before by the caller. 342 - 343 - The windowBits parameter is the base two logarithm of the maximum window 344 - size (the size of the history buffer). It should be in the range 8..15 for 345 - this version of the library (the value 16 will be allowed soon). The 346 - default value is 15 if inflateInit is used instead. If a compressed stream 347 - with a larger window size is given as input, inflate() will return with 348 - the error code Z_DATA_ERROR instead of trying to allocate a larger window. 349 - 350 - If next_out is not null, the library will use this buffer for the history 351 - buffer; the buffer must either be large enough to hold the entire output 352 - data, or have at least 1<<windowBits bytes. If next_out is null, the 353 - library will allocate its own buffer (and leave next_out null). next_in 354 - need not be provided here but must be provided by the application for the 355 - next call of inflate(). 356 - 357 - If the history buffer is provided by the application, next_out must 358 - never be changed by the application since the decompressor maintains 359 - history information inside this buffer from call to call; the application 360 - can only reset next_out to the beginning of the history buffer when 361 - avail_out is zero and all output has been consumed. 362 - 363 - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was 364 - not enough memory, Z_STREAM_ERROR if a parameter is invalid (such as 365 - windowBits < 8). msg is set to null if there is no error message. 366 - inflateInit2 does not perform any decompression: this will be done by 367 - inflate(). 368 - */ 369 - 370 - extern int inflateSync OF((z_stream *strm)); 371 - /* 372 - Skips invalid compressed data until the special marker (see deflate() 373 - above) can be found, or until all available input is skipped. No output 374 - is provided. 375 - 376 - inflateSync returns Z_OK if the special marker has been found, Z_BUF_ERROR 377 - if no more input was provided, Z_DATA_ERROR if no marker has been found, 378 - or Z_STREAM_ERROR if the stream structure was inconsistent. In the success 379 - case, the application may save the current current value of total_in which 380 - indicates where valid compressed data was found. In the error case, the 381 - application may repeatedly call inflateSync, providing more input each time, 382 - until success or end of the input data. 383 - */ 384 - 385 - extern int inflateReset OF((z_stream *strm)); 386 - /* 387 - This function is equivalent to inflateEnd followed by inflateInit, 388 - but does not free and reallocate all the internal decompression state. 389 - The stream will keep attributes that may have been set by inflateInit2. 390 - 391 - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source 392 - stream state was inconsistent (such as zalloc or state being NULL). 393 - */ 394 - 395 - extern int inflateIncomp OF((z_stream *strm)); 396 - /* 397 - This function adds the data at next_in (avail_in bytes) to the output 398 - history without performing any output. There must be no pending output, 399 - and the decompressor must be expecting to see the start of a block. 400 - Calling this function is equivalent to decompressing a stored block 401 - containing the data at next_in (except that the data is not output). 402 - */ 403 - 404 - /* checksum functions */ 405 - 406 - /* 407 - This function is not related to compression but is exported 408 - anyway because it might be useful in applications using the 409 - compression library. 410 - */ 411 - 412 - extern uLong adler32 OF((uLong adler, Bytef *buf, uInt len)); 413 - 414 - /* 415 - Update a running Adler-32 checksum with the bytes buf[0..len-1] and 416 - return the updated checksum. If buf is NULL, this function returns 417 - the required initial value for the checksum. 418 - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed 419 - much faster. Usage example: 420 - 421 - uLong adler = adler32(0L, Z_NULL, 0); 422 - 423 - while (read_buffer(buffer, length) != EOF) { 424 - adler = adler32(adler, buffer, length); 425 - } 426 - if (adler != original_adler) error(); 427 - */ 428 - 429 - #ifndef _Z_UTIL_H 430 - struct internal_state {int dummy;}; /* hack for buggy compilers */ 431 - #endif 432 - 433 - #endif /* _ZLIB_H */
+12 -1
arch/xtensa/boot/lib/Makefile
··· 2 2 # Makefile for some libs needed by zImage. 3 3 # 4 4 5 + zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c 5 6 6 - lib-y := zlib.o zmem.o 7 + lib-y += $(zlib:.c=.o) zmem.o 8 + 9 + EXTRA_CFLAGS += -Ilib/zlib_inflate 10 + 11 + quiet_cmd_copy_zlib = COPY $@ 12 + cmd_copy_zlib = cat $< > $@ 13 + 14 + $(addprefix $(obj)/,$(zlib)): $(obj)/%: $(srctree)/lib/zlib_inflate/% 15 + $(call cmd,copy_zlib) 16 + 17 + clean-files := $(zlib)
-36
arch/xtensa/boot/lib/memcpy.S
··· 1 - /* 2 - * arch/xtensa/lib/memcpy.S 3 - * 4 - * ANSI C standard library function memcpy 5 - * 6 - * This file is subject to the terms and conditions of the GNU General 7 - * Public License. See the file "COPYING" in the main directory of 8 - * this archive for more details. 9 - * 10 - * Copyright (C) 2002 Tensilica Inc. 11 - */ 12 - 13 - #define _ASMLANGUAGE 14 - #include <xtensa/config/core.h> 15 - 16 - .text 17 - .align 4 18 - .global bcopy 19 - .type bcopy,@function 20 - bcopy: 21 - movi a14, xthal_bcopy // a14 safe to use regardless of whether caller 22 - // used call4 or call8 (can't have used call12) 23 - jx a14 // let the Core HAL do the work 24 - 25 - .text 26 - .align 4 27 - .global memcpy 28 - .type memcpy,@function 29 - memcpy: 30 - .global memmove 31 - .type memmove,@function 32 - memmove: 33 - movi a14, xthal_memcpy // a14 safe to use regardless of whether caller 34 - // used call4 or call8 (can't have used call12) 35 - jx a14 // let the Core HAL do the work 36 -
-2150
arch/xtensa/boot/lib/zlib.c
··· 1 - /* 2 - * BK Id: SCCS/s.zlib.c 1.8 05/18/01 15:17:24 cort 3 - */ 4 - /* 5 - * This file is derived from various .h and .c files from the zlib-0.95 6 - * distribution by Jean-loup Gailly and Mark Adler, with some additions 7 - * by Paul Mackerras to aid in implementing Deflate compression and 8 - * decompression for PPP packets. See zlib.h for conditions of 9 - * distribution and use. 10 - * 11 - * Changes that have been made include: 12 - * - changed functions not used outside this file to "local" 13 - * - added minCompression parameter to deflateInit2 14 - * - added Z_PACKET_FLUSH (see zlib.h for details) 15 - * - added inflateIncomp 16 - * 17 - */ 18 - 19 - /*+++++*/ 20 - /* zutil.h -- internal interface and configuration of the compression library 21 - * Copyright (C) 1995 Jean-loup Gailly. 22 - * For conditions of distribution and use, see copyright notice in zlib.h 23 - */ 24 - 25 - /* WARNING: this file should *not* be used by applications. It is 26 - part of the implementation of the compression library and is 27 - subject to change. Applications should only use zlib.h. 28 - */ 29 - 30 - /* From: zutil.h,v 1.9 1995/05/03 17:27:12 jloup Exp */ 31 - 32 - #define _Z_UTIL_H 33 - 34 - #include "zlib.h" 35 - 36 - #ifndef local 37 - # define local static 38 - #endif 39 - /* compile with -Dlocal if your debugger can't find static symbols */ 40 - 41 - #define FAR 42 - 43 - typedef unsigned char uch; 44 - typedef uch FAR uchf; 45 - typedef unsigned short ush; 46 - typedef ush FAR ushf; 47 - typedef unsigned long ulg; 48 - 49 - extern char *z_errmsg[]; /* indexed by 1-zlib_error */ 50 - 51 - #define ERR_RETURN(strm,err) return (strm->msg=z_errmsg[1-err], err) 52 - /* To be used only when the state is known to be valid */ 53 - 54 - #ifndef NULL 55 - #define NULL ((void *) 0) 56 - #endif 57 - 58 - /* common constants */ 59 - 60 - #define DEFLATED 8 61 - 62 - #ifndef DEF_WBITS 63 - # define DEF_WBITS MAX_WBITS 64 - #endif 65 - /* default windowBits for decompression. MAX_WBITS is for compression only */ 66 - 67 - #if MAX_MEM_LEVEL >= 8 68 - # define DEF_MEM_LEVEL 8 69 - #else 70 - # define DEF_MEM_LEVEL MAX_MEM_LEVEL 71 - #endif 72 - /* default memLevel */ 73 - 74 - #define STORED_BLOCK 0 75 - #define STATIC_TREES 1 76 - #define DYN_TREES 2 77 - /* The three kinds of block type */ 78 - 79 - #define MIN_MATCH 3 80 - #define MAX_MATCH 258 81 - /* The minimum and maximum match lengths */ 82 - 83 - /* functions */ 84 - 85 - #include <linux/string.h> 86 - #define zmemcpy memcpy 87 - #define zmemzero(dest, len) memset(dest, 0, len) 88 - 89 - /* Diagnostic functions */ 90 - #ifdef DEBUG_ZLIB 91 - # include <stdio.h> 92 - # ifndef verbose 93 - # define verbose 0 94 - # endif 95 - # define Assert(cond,msg) {if(!(cond)) z_error(msg);} 96 - # define Trace(x) fprintf x 97 - # define Tracev(x) {if (verbose) fprintf x ;} 98 - # define Tracevv(x) {if (verbose>1) fprintf x ;} 99 - # define Tracec(c,x) {if (verbose && (c)) fprintf x ;} 100 - # define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;} 101 - #else 102 - # define Assert(cond,msg) 103 - # define Trace(x) 104 - # define Tracev(x) 105 - # define Tracevv(x) 106 - # define Tracec(c,x) 107 - # define Tracecv(c,x) 108 - #endif 109 - 110 - 111 - typedef uLong (*check_func) OF((uLong check, Bytef *buf, uInt len)); 112 - 113 - /* voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); */ 114 - /* void zcfree OF((voidpf opaque, voidpf ptr)); */ 115 - 116 - #define ZALLOC(strm, items, size) \ 117 - (*((strm)->zalloc))((strm)->opaque, (items), (size)) 118 - #define ZFREE(strm, addr, size) \ 119 - (*((strm)->zfree))((strm)->opaque, (voidpf)(addr), (size)) 120 - #define TRY_FREE(s, p, n) {if (p) ZFREE(s, p, n);} 121 - 122 - /* deflate.h -- internal compression state 123 - * Copyright (C) 1995 Jean-loup Gailly 124 - * For conditions of distribution and use, see copyright notice in zlib.h 125 - */ 126 - 127 - /* WARNING: this file should *not* be used by applications. It is 128 - part of the implementation of the compression library and is 129 - subject to change. Applications should only use zlib.h. 130 - */ 131 - 132 - /*+++++*/ 133 - /* infblock.h -- header to use infblock.c 134 - * Copyright (C) 1995 Mark Adler 135 - * For conditions of distribution and use, see copyright notice in zlib.h 136 - */ 137 - 138 - /* WARNING: this file should *not* be used by applications. It is 139 - part of the implementation of the compression library and is 140 - subject to change. Applications should only use zlib.h. 141 - */ 142 - 143 - struct inflate_blocks_state; 144 - typedef struct inflate_blocks_state FAR inflate_blocks_statef; 145 - 146 - local inflate_blocks_statef * inflate_blocks_new OF(( 147 - z_stream *z, 148 - check_func c, /* check function */ 149 - uInt w)); /* window size */ 150 - 151 - local int inflate_blocks OF(( 152 - inflate_blocks_statef *, 153 - z_stream *, 154 - int)); /* initial return code */ 155 - 156 - local void inflate_blocks_reset OF(( 157 - inflate_blocks_statef *, 158 - z_stream *, 159 - uLongf *)); /* check value on output */ 160 - 161 - local int inflate_blocks_free OF(( 162 - inflate_blocks_statef *, 163 - z_stream *, 164 - uLongf *)); /* check value on output */ 165 - 166 - local int inflate_addhistory OF(( 167 - inflate_blocks_statef *, 168 - z_stream *)); 169 - 170 - local int inflate_packet_flush OF(( 171 - inflate_blocks_statef *)); 172 - 173 - /*+++++*/ 174 - /* inftrees.h -- header to use inftrees.c 175 - * Copyright (C) 1995 Mark Adler 176 - * For conditions of distribution and use, see copyright notice in zlib.h 177 - */ 178 - 179 - /* WARNING: this file should *not* be used by applications. It is 180 - part of the implementation of the compression library and is 181 - subject to change. Applications should only use zlib.h. 182 - */ 183 - 184 - /* Huffman code lookup table entry--this entry is four bytes for machines 185 - that have 16-bit pointers (e.g. PC's in the small or medium model). */ 186 - 187 - typedef struct inflate_huft_s FAR inflate_huft; 188 - 189 - struct inflate_huft_s { 190 - union { 191 - struct { 192 - Byte Exop; /* number of extra bits or operation */ 193 - Byte Bits; /* number of bits in this code or subcode */ 194 - } what; 195 - uInt Nalloc; /* number of these allocated here */ 196 - Bytef *pad; /* pad structure to a power of 2 (4 bytes for */ 197 - } word; /* 16-bit, 8 bytes for 32-bit machines) */ 198 - union { 199 - uInt Base; /* literal, length base, or distance base */ 200 - inflate_huft *Next; /* pointer to next level of table */ 201 - } more; 202 - }; 203 - 204 - #ifdef DEBUG_ZLIB 205 - local uInt inflate_hufts; 206 - #endif 207 - 208 - local int inflate_trees_bits OF(( 209 - uIntf *, /* 19 code lengths */ 210 - uIntf *, /* bits tree desired/actual depth */ 211 - inflate_huft * FAR *, /* bits tree result */ 212 - z_stream *)); /* for zalloc, zfree functions */ 213 - 214 - local int inflate_trees_dynamic OF(( 215 - uInt, /* number of literal/length codes */ 216 - uInt, /* number of distance codes */ 217 - uIntf *, /* that many (total) code lengths */ 218 - uIntf *, /* literal desired/actual bit depth */ 219 - uIntf *, /* distance desired/actual bit depth */ 220 - inflate_huft * FAR *, /* literal/length tree result */ 221 - inflate_huft * FAR *, /* distance tree result */ 222 - z_stream *)); /* for zalloc, zfree functions */ 223 - 224 - local int inflate_trees_fixed OF(( 225 - uIntf *, /* literal desired/actual bit depth */ 226 - uIntf *, /* distance desired/actual bit depth */ 227 - inflate_huft * FAR *, /* literal/length tree result */ 228 - inflate_huft * FAR *)); /* distance tree result */ 229 - 230 - local int inflate_trees_free OF(( 231 - inflate_huft *, /* tables to free */ 232 - z_stream *)); /* for zfree function */ 233 - 234 - 235 - /*+++++*/ 236 - /* infcodes.h -- header to use infcodes.c 237 - * Copyright (C) 1995 Mark Adler 238 - * For conditions of distribution and use, see copyright notice in zlib.h 239 - */ 240 - 241 - /* WARNING: this file should *not* be used by applications. It is 242 - part of the implementation of the compression library and is 243 - subject to change. Applications should only use zlib.h. 244 - */ 245 - 246 - struct inflate_codes_state; 247 - typedef struct inflate_codes_state FAR inflate_codes_statef; 248 - 249 - local inflate_codes_statef *inflate_codes_new OF(( 250 - uInt, uInt, 251 - inflate_huft *, inflate_huft *, 252 - z_stream *)); 253 - 254 - local int inflate_codes OF(( 255 - inflate_blocks_statef *, 256 - z_stream *, 257 - int)); 258 - 259 - local void inflate_codes_free OF(( 260 - inflate_codes_statef *, 261 - z_stream *)); 262 - 263 - 264 - /*+++++*/ 265 - /* inflate.c -- zlib interface to inflate modules 266 - * Copyright (C) 1995 Mark Adler 267 - * For conditions of distribution and use, see copyright notice in zlib.h 268 - */ 269 - 270 - /* inflate private state */ 271 - struct internal_state { 272 - 273 - /* mode */ 274 - enum { 275 - METHOD, /* waiting for method byte */ 276 - FLAG, /* waiting for flag byte */ 277 - BLOCKS, /* decompressing blocks */ 278 - CHECK4, /* four check bytes to go */ 279 - CHECK3, /* three check bytes to go */ 280 - CHECK2, /* two check bytes to go */ 281 - CHECK1, /* one check byte to go */ 282 - DONE, /* finished check, done */ 283 - BAD} /* got an error--stay here */ 284 - mode; /* current inflate mode */ 285 - 286 - /* mode dependent information */ 287 - union { 288 - uInt method; /* if FLAGS, method byte */ 289 - struct { 290 - uLong was; /* computed check value */ 291 - uLong need; /* stream check value */ 292 - } check; /* if CHECK, check values to compare */ 293 - uInt marker; /* if BAD, inflateSync's marker bytes count */ 294 - } sub; /* submode */ 295 - 296 - /* mode independent information */ 297 - int nowrap; /* flag for no wrapper */ 298 - uInt wbits; /* log2(window size) (8..15, defaults to 15) */ 299 - inflate_blocks_statef 300 - *blocks; /* current inflate_blocks state */ 301 - 302 - }; 303 - 304 - 305 - int inflateReset(z) 306 - z_stream *z; 307 - { 308 - uLong c; 309 - 310 - if (z == Z_NULL || z->state == Z_NULL) 311 - return Z_STREAM_ERROR; 312 - z->total_in = z->total_out = 0; 313 - z->msg = Z_NULL; 314 - z->state->mode = z->state->nowrap ? BLOCKS : METHOD; 315 - inflate_blocks_reset(z->state->blocks, z, &c); 316 - Trace((stderr, "inflate: reset\n")); 317 - return Z_OK; 318 - } 319 - 320 - 321 - int inflateEnd(z) 322 - z_stream *z; 323 - { 324 - uLong c; 325 - 326 - if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL) 327 - return Z_STREAM_ERROR; 328 - if (z->state->blocks != Z_NULL) 329 - inflate_blocks_free(z->state->blocks, z, &c); 330 - ZFREE(z, z->state, sizeof(struct internal_state)); 331 - z->state = Z_NULL; 332 - Trace((stderr, "inflate: end\n")); 333 - return Z_OK; 334 - } 335 - 336 - 337 - int inflateInit2(z, w) 338 - z_stream *z; 339 - int w; 340 - { 341 - /* initialize state */ 342 - if (z == Z_NULL) 343 - return Z_STREAM_ERROR; 344 - /* if (z->zalloc == Z_NULL) z->zalloc = zcalloc; */ 345 - /* if (z->zfree == Z_NULL) z->zfree = zcfree; */ 346 - if ((z->state = (struct internal_state FAR *) 347 - ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL) 348 - return Z_MEM_ERROR; 349 - z->state->blocks = Z_NULL; 350 - 351 - /* handle undocumented nowrap option (no zlib header or check) */ 352 - z->state->nowrap = 0; 353 - if (w < 0) 354 - { 355 - w = - w; 356 - z->state->nowrap = 1; 357 - } 358 - 359 - /* set window size */ 360 - if (w < 8 || w > 15) 361 - { 362 - inflateEnd(z); 363 - return Z_STREAM_ERROR; 364 - } 365 - z->state->wbits = (uInt)w; 366 - 367 - /* create inflate_blocks state */ 368 - if ((z->state->blocks = 369 - inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, 1 << w)) 370 - == Z_NULL) 371 - { 372 - inflateEnd(z); 373 - return Z_MEM_ERROR; 374 - } 375 - Trace((stderr, "inflate: allocated\n")); 376 - 377 - /* reset state */ 378 - inflateReset(z); 379 - return Z_OK; 380 - } 381 - 382 - 383 - int inflateInit(z) 384 - z_stream *z; 385 - { 386 - return inflateInit2(z, DEF_WBITS); 387 - } 388 - 389 - 390 - #define NEEDBYTE {if(z->avail_in==0)goto empty;r=Z_OK;} 391 - #define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) 392 - 393 - int inflate(z, f) 394 - z_stream *z; 395 - int f; 396 - { 397 - int r; 398 - uInt b; 399 - 400 - if (z == Z_NULL || z->next_in == Z_NULL) 401 - return Z_STREAM_ERROR; 402 - r = Z_BUF_ERROR; 403 - while (1) switch (z->state->mode) 404 - { 405 - case METHOD: 406 - NEEDBYTE 407 - if (((z->state->sub.method = NEXTBYTE) & 0xf) != DEFLATED) 408 - { 409 - z->state->mode = BAD; 410 - z->msg = "unknown compression method"; 411 - z->state->sub.marker = 5; /* can't try inflateSync */ 412 - break; 413 - } 414 - if ((z->state->sub.method >> 4) + 8 > z->state->wbits) 415 - { 416 - z->state->mode = BAD; 417 - z->msg = "invalid window size"; 418 - z->state->sub.marker = 5; /* can't try inflateSync */ 419 - break; 420 - } 421 - z->state->mode = FLAG; 422 - case FLAG: 423 - NEEDBYTE 424 - if ((b = NEXTBYTE) & 0x20) 425 - { 426 - z->state->mode = BAD; 427 - z->msg = "invalid reserved bit"; 428 - z->state->sub.marker = 5; /* can't try inflateSync */ 429 - break; 430 - } 431 - if (((z->state->sub.method << 8) + b) % 31) 432 - { 433 - z->state->mode = BAD; 434 - z->msg = "incorrect header check"; 435 - z->state->sub.marker = 5; /* can't try inflateSync */ 436 - break; 437 - } 438 - Trace((stderr, "inflate: zlib header ok\n")); 439 - z->state->mode = BLOCKS; 440 - case BLOCKS: 441 - r = inflate_blocks(z->state->blocks, z, r); 442 - if (f == Z_PACKET_FLUSH && z->avail_in == 0 && z->avail_out != 0) 443 - r = inflate_packet_flush(z->state->blocks); 444 - if (r == Z_DATA_ERROR) 445 - { 446 - z->state->mode = BAD; 447 - z->state->sub.marker = 0; /* can try inflateSync */ 448 - break; 449 - } 450 - if (r != Z_STREAM_END) 451 - return r; 452 - r = Z_OK; 453 - inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was); 454 - if (z->state->nowrap) 455 - { 456 - z->state->mode = DONE; 457 - break; 458 - } 459 - z->state->mode = CHECK4; 460 - case CHECK4: 461 - NEEDBYTE 462 - z->state->sub.check.need = (uLong)NEXTBYTE << 24; 463 - z->state->mode = CHECK3; 464 - case CHECK3: 465 - NEEDBYTE 466 - z->state->sub.check.need += (uLong)NEXTBYTE << 16; 467 - z->state->mode = CHECK2; 468 - case CHECK2: 469 - NEEDBYTE 470 - z->state->sub.check.need += (uLong)NEXTBYTE << 8; 471 - z->state->mode = CHECK1; 472 - case CHECK1: 473 - NEEDBYTE 474 - z->state->sub.check.need += (uLong)NEXTBYTE; 475 - 476 - if (z->state->sub.check.was != z->state->sub.check.need) 477 - { 478 - z->state->mode = BAD; 479 - z->msg = "incorrect data check"; 480 - z->state->sub.marker = 5; /* can't try inflateSync */ 481 - break; 482 - } 483 - Trace((stderr, "inflate: zlib check ok\n")); 484 - z->state->mode = DONE; 485 - case DONE: 486 - return Z_STREAM_END; 487 - case BAD: 488 - return Z_DATA_ERROR; 489 - default: 490 - return Z_STREAM_ERROR; 491 - } 492 - 493 - empty: 494 - if (f != Z_PACKET_FLUSH) 495 - return r; 496 - z->state->mode = BAD; 497 - z->state->sub.marker = 0; /* can try inflateSync */ 498 - return Z_DATA_ERROR; 499 - } 500 - 501 - /* 502 - * This subroutine adds the data at next_in/avail_in to the output history 503 - * without performing any output. The output buffer must be "caught up"; 504 - * i.e. no pending output (hence s->read equals s->write), and the state must 505 - * be BLOCKS (i.e. we should be willing to see the start of a series of 506 - * BLOCKS). On exit, the output will also be caught up, and the checksum 507 - * will have been updated if need be. 508 - */ 509 - 510 - int inflateIncomp(z) 511 - z_stream *z; 512 - { 513 - if (z->state->mode != BLOCKS) 514 - return Z_DATA_ERROR; 515 - return inflate_addhistory(z->state->blocks, z); 516 - } 517 - 518 - 519 - int inflateSync(z) 520 - z_stream *z; 521 - { 522 - uInt n; /* number of bytes to look at */ 523 - Bytef *p; /* pointer to bytes */ 524 - uInt m; /* number of marker bytes found in a row */ 525 - uLong r, w; /* temporaries to save total_in and total_out */ 526 - 527 - /* set up */ 528 - if (z == Z_NULL || z->state == Z_NULL) 529 - return Z_STREAM_ERROR; 530 - if (z->state->mode != BAD) 531 - { 532 - z->state->mode = BAD; 533 - z->state->sub.marker = 0; 534 - } 535 - if ((n = z->avail_in) == 0) 536 - return Z_BUF_ERROR; 537 - p = z->next_in; 538 - m = z->state->sub.marker; 539 - 540 - /* search */ 541 - while (n && m < 4) 542 - { 543 - if (*p == (Byte)(m < 2 ? 0 : 0xff)) 544 - m++; 545 - else if (*p) 546 - m = 0; 547 - else 548 - m = 4 - m; 549 - p++, n--; 550 - } 551 - 552 - /* restore */ 553 - z->total_in += p - z->next_in; 554 - z->next_in = p; 555 - z->avail_in = n; 556 - z->state->sub.marker = m; 557 - 558 - /* return no joy or set up to restart on a new block */ 559 - if (m != 4) 560 - return Z_DATA_ERROR; 561 - r = z->total_in; w = z->total_out; 562 - inflateReset(z); 563 - z->total_in = r; z->total_out = w; 564 - z->state->mode = BLOCKS; 565 - return Z_OK; 566 - } 567 - 568 - #undef NEEDBYTE 569 - #undef NEXTBYTE 570 - 571 - /*+++++*/ 572 - /* infutil.h -- types and macros common to blocks and codes 573 - * Copyright (C) 1995 Mark Adler 574 - * For conditions of distribution and use, see copyright notice in zlib.h 575 - */ 576 - 577 - /* WARNING: this file should *not* be used by applications. It is 578 - part of the implementation of the compression library and is 579 - subject to change. Applications should only use zlib.h. 580 - */ 581 - 582 - /* inflate blocks semi-private state */ 583 - struct inflate_blocks_state { 584 - 585 - /* mode */ 586 - enum { 587 - TYPE, /* get type bits (3, including end bit) */ 588 - LENS, /* get lengths for stored */ 589 - STORED, /* processing stored block */ 590 - TABLE, /* get table lengths */ 591 - BTREE, /* get bit lengths tree for a dynamic block */ 592 - DTREE, /* get length, distance trees for a dynamic block */ 593 - CODES, /* processing fixed or dynamic block */ 594 - DRY, /* output remaining window bytes */ 595 - DONEB, /* finished last block, done */ 596 - BADB} /* got a data error--stuck here */ 597 - mode; /* current inflate_block mode */ 598 - 599 - /* mode dependent information */ 600 - union { 601 - uInt left; /* if STORED, bytes left to copy */ 602 - struct { 603 - uInt table; /* table lengths (14 bits) */ 604 - uInt index; /* index into blens (or border) */ 605 - uIntf *blens; /* bit lengths of codes */ 606 - uInt bb; /* bit length tree depth */ 607 - inflate_huft *tb; /* bit length decoding tree */ 608 - int nblens; /* # elements allocated at blens */ 609 - } trees; /* if DTREE, decoding info for trees */ 610 - struct { 611 - inflate_huft *tl, *td; /* trees to free */ 612 - inflate_codes_statef 613 - *codes; 614 - } decode; /* if CODES, current state */ 615 - } sub; /* submode */ 616 - uInt last; /* true if this block is the last block */ 617 - 618 - /* mode independent information */ 619 - uInt bitk; /* bits in bit buffer */ 620 - uLong bitb; /* bit buffer */ 621 - Bytef *window; /* sliding window */ 622 - Bytef *end; /* one byte after sliding window */ 623 - Bytef *read; /* window read pointer */ 624 - Bytef *write; /* window write pointer */ 625 - check_func checkfn; /* check function */ 626 - uLong check; /* check on output */ 627 - 628 - }; 629 - 630 - 631 - /* defines for inflate input/output */ 632 - /* update pointers and return */ 633 - #define UPDBITS {s->bitb=b;s->bitk=k;} 634 - #define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;} 635 - #define UPDOUT {s->write=q;} 636 - #define UPDATE {UPDBITS UPDIN UPDOUT} 637 - #define LEAVE {UPDATE return inflate_flush(s,z,r);} 638 - /* get bytes and bits */ 639 - #define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;} 640 - #define NEEDBYTE {if(n)r=Z_OK;else LEAVE} 641 - #define NEXTBYTE (n--,*p++) 642 - #define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}} 643 - #define DUMPBITS(j) {b>>=(j);k-=(j);} 644 - /* output bytes */ 645 - #define WAVAIL (q<s->read?s->read-q-1:s->end-q) 646 - #define LOADOUT {q=s->write;m=WAVAIL;} 647 - #define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=WAVAIL;}} 648 - #define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT} 649 - #define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;} 650 - #define OUTBYTE(a) {*q++=(Byte)(a);m--;} 651 - /* load local pointers */ 652 - #define LOAD {LOADIN LOADOUT} 653 - 654 - /* 655 - * The IBM 150 firmware munges the data right after _etext[]. This 656 - * protects it. -- Cort 657 - */ 658 - local uInt protect_mask[] = {0, 0, 0, 0, 0, 0, 0, 0, 0 ,0 ,0 ,0}; 659 - /* And'ing with mask[n] masks the lower n bits */ 660 - local uInt inflate_mask[] = { 661 - 0x0000, 662 - 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 663 - 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff 664 - }; 665 - 666 - /* copy as much as possible from the sliding window to the output area */ 667 - local int inflate_flush OF(( 668 - inflate_blocks_statef *, 669 - z_stream *, 670 - int)); 671 - 672 - /*+++++*/ 673 - /* inffast.h -- header to use inffast.c 674 - * Copyright (C) 1995 Mark Adler 675 - * For conditions of distribution and use, see copyright notice in zlib.h 676 - */ 677 - 678 - /* WARNING: this file should *not* be used by applications. It is 679 - part of the implementation of the compression library and is 680 - subject to change. Applications should only use zlib.h. 681 - */ 682 - 683 - local int inflate_fast OF(( 684 - uInt, 685 - uInt, 686 - inflate_huft *, 687 - inflate_huft *, 688 - inflate_blocks_statef *, 689 - z_stream *)); 690 - 691 - 692 - /*+++++*/ 693 - /* infblock.c -- interpret and process block types to last block 694 - * Copyright (C) 1995 Mark Adler 695 - * For conditions of distribution and use, see copyright notice in zlib.h 696 - */ 697 - 698 - /* Table for deflate from PKZIP's appnote.txt. */ 699 - local uInt border[] = { /* Order of the bit length code lengths */ 700 - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; 701 - 702 - /* 703 - Notes beyond the 1.93a appnote.txt: 704 - 705 - 1. Distance pointers never point before the beginning of the output 706 - stream. 707 - 2. Distance pointers can point back across blocks, up to 32k away. 708 - 3. There is an implied maximum of 7 bits for the bit length table and 709 - 15 bits for the actual data. 710 - 4. If only one code exists, then it is encoded using one bit. (Zero 711 - would be more efficient, but perhaps a little confusing.) If two 712 - codes exist, they are coded using one bit each (0 and 1). 713 - 5. There is no way of sending zero distance codes--a dummy must be 714 - sent if there are none. (History: a pre 2.0 version of PKZIP would 715 - store blocks with no distance codes, but this was discovered to be 716 - too harsh a criterion.) Valid only for 1.93a. 2.04c does allow 717 - zero distance codes, which is sent as one code of zero bits in 718 - length. 719 - 6. There are up to 286 literal/length codes. Code 256 represents the 720 - end-of-block. Note however that the static length tree defines 721 - 288 codes just to fill out the Huffman codes. Codes 286 and 287 722 - cannot be used though, since there is no length base or extra bits 723 - defined for them. Similarily, there are up to 30 distance codes. 724 - However, static trees define 32 codes (all 5 bits) to fill out the 725 - Huffman codes, but the last two had better not show up in the data. 726 - 7. Unzip can check dynamic Huffman blocks for complete code sets. 727 - The exception is that a single code would not be complete (see #4). 728 - 8. The five bits following the block type is really the number of 729 - literal codes sent minus 257. 730 - 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits 731 - (1+6+6). Therefore, to output three times the length, you output 732 - three codes (1+1+1), whereas to output four times the same length, 733 - you only need two codes (1+3). Hmm. 734 - 10. In the tree reconstruction algorithm, Code = Code + Increment 735 - only if BitLength(i) is not zero. (Pretty obvious.) 736 - 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) 737 - 12. Note: length code 284 can represent 227-258, but length code 285 738 - really is 258. The last length deserves its own, short code 739 - since it gets used a lot in very redundant files. The length 740 - 258 is special since 258 - 3 (the min match length) is 255. 741 - 13. The literal/length and distance code bit lengths are read as a 742 - single stream of lengths. It is possible (and advantageous) for 743 - a repeat code (16, 17, or 18) to go across the boundary between 744 - the two sets of lengths. 745 - */ 746 - 747 - 748 - local void inflate_blocks_reset(s, z, c) 749 - inflate_blocks_statef *s; 750 - z_stream *z; 751 - uLongf *c; 752 - { 753 - if (s->checkfn != Z_NULL) 754 - *c = s->check; 755 - if (s->mode == BTREE || s->mode == DTREE) 756 - ZFREE(z, s->sub.trees.blens, s->sub.trees.nblens * sizeof(uInt)); 757 - if (s->mode == CODES) 758 - { 759 - inflate_codes_free(s->sub.decode.codes, z); 760 - inflate_trees_free(s->sub.decode.td, z); 761 - inflate_trees_free(s->sub.decode.tl, z); 762 - } 763 - s->mode = TYPE; 764 - s->bitk = 0; 765 - s->bitb = 0; 766 - s->read = s->write = s->window; 767 - if (s->checkfn != Z_NULL) 768 - s->check = (*s->checkfn)(0L, Z_NULL, 0); 769 - Trace((stderr, "inflate: blocks reset\n")); 770 - } 771 - 772 - 773 - local inflate_blocks_statef *inflate_blocks_new(z, c, w) 774 - z_stream *z; 775 - check_func c; 776 - uInt w; 777 - { 778 - inflate_blocks_statef *s; 779 - 780 - if ((s = (inflate_blocks_statef *)ZALLOC 781 - (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL) 782 - return s; 783 - if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL) 784 - { 785 - ZFREE(z, s, sizeof(struct inflate_blocks_state)); 786 - return Z_NULL; 787 - } 788 - s->end = s->window + w; 789 - s->checkfn = c; 790 - s->mode = TYPE; 791 - Trace((stderr, "inflate: blocks allocated\n")); 792 - inflate_blocks_reset(s, z, &s->check); 793 - return s; 794 - } 795 - 796 - 797 - local int inflate_blocks(s, z, r) 798 - inflate_blocks_statef *s; 799 - z_stream *z; 800 - int r; 801 - { 802 - uInt t; /* temporary storage */ 803 - uLong b; /* bit buffer */ 804 - uInt k; /* bits in bit buffer */ 805 - Bytef *p; /* input data pointer */ 806 - uInt n; /* bytes available there */ 807 - Bytef *q; /* output window write pointer */ 808 - uInt m; /* bytes to end of window or read pointer */ 809 - 810 - /* copy input/output information to locals (UPDATE macro restores) */ 811 - LOAD 812 - 813 - /* process input based on current state */ 814 - while (1) switch (s->mode) 815 - { 816 - case TYPE: 817 - NEEDBITS(3) 818 - t = (uInt)b & 7; 819 - s->last = t & 1; 820 - switch (t >> 1) 821 - { 822 - case 0: /* stored */ 823 - Trace((stderr, "inflate: stored block%s\n", 824 - s->last ? " (last)" : "")); 825 - DUMPBITS(3) 826 - t = k & 7; /* go to byte boundary */ 827 - DUMPBITS(t) 828 - s->mode = LENS; /* get length of stored block */ 829 - break; 830 - case 1: /* fixed */ 831 - Trace((stderr, "inflate: fixed codes block%s\n", 832 - s->last ? " (last)" : "")); 833 - { 834 - uInt bl, bd; 835 - inflate_huft *tl, *td; 836 - 837 - inflate_trees_fixed(&bl, &bd, &tl, &td); 838 - s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z); 839 - if (s->sub.decode.codes == Z_NULL) 840 - { 841 - r = Z_MEM_ERROR; 842 - LEAVE 843 - } 844 - s->sub.decode.tl = Z_NULL; /* don't try to free these */ 845 - s->sub.decode.td = Z_NULL; 846 - } 847 - DUMPBITS(3) 848 - s->mode = CODES; 849 - break; 850 - case 2: /* dynamic */ 851 - Trace((stderr, "inflate: dynamic codes block%s\n", 852 - s->last ? " (last)" : "")); 853 - DUMPBITS(3) 854 - s->mode = TABLE; 855 - break; 856 - case 3: /* illegal */ 857 - DUMPBITS(3) 858 - s->mode = BADB; 859 - z->msg = "invalid block type"; 860 - r = Z_DATA_ERROR; 861 - LEAVE 862 - } 863 - break; 864 - case LENS: 865 - NEEDBITS(32) 866 - if (((~b) >> 16) != (b & 0xffff)) 867 - { 868 - s->mode = BADB; 869 - z->msg = "invalid stored block lengths"; 870 - r = Z_DATA_ERROR; 871 - LEAVE 872 - } 873 - s->sub.left = (uInt)b & 0xffff; 874 - b = k = 0; /* dump bits */ 875 - Tracev((stderr, "inflate: stored length %u\n", s->sub.left)); 876 - s->mode = s->sub.left ? STORED : TYPE; 877 - break; 878 - case STORED: 879 - if (n == 0) 880 - LEAVE 881 - NEEDOUT 882 - t = s->sub.left; 883 - if (t > n) t = n; 884 - if (t > m) t = m; 885 - zmemcpy(q, p, t); 886 - p += t; n -= t; 887 - q += t; m -= t; 888 - if ((s->sub.left -= t) != 0) 889 - break; 890 - Tracev((stderr, "inflate: stored end, %lu total out\n", 891 - z->total_out + (q >= s->read ? q - s->read : 892 - (s->end - s->read) + (q - s->window)))); 893 - s->mode = s->last ? DRY : TYPE; 894 - break; 895 - case TABLE: 896 - NEEDBITS(14) 897 - s->sub.trees.table = t = (uInt)b & 0x3fff; 898 - #ifndef PKZIP_BUG_WORKAROUND 899 - if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) 900 - { 901 - s->mode = BADB; 902 - z->msg = "too many length or distance symbols"; 903 - r = Z_DATA_ERROR; 904 - LEAVE 905 - } 906 - #endif 907 - t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); 908 - if (t < 19) 909 - t = 19; 910 - if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL) 911 - { 912 - r = Z_MEM_ERROR; 913 - LEAVE 914 - } 915 - s->sub.trees.nblens = t; 916 - DUMPBITS(14) 917 - s->sub.trees.index = 0; 918 - Tracev((stderr, "inflate: table sizes ok\n")); 919 - s->mode = BTREE; 920 - case BTREE: 921 - while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10)) 922 - { 923 - NEEDBITS(3) 924 - s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7; 925 - DUMPBITS(3) 926 - } 927 - while (s->sub.trees.index < 19) 928 - s->sub.trees.blens[border[s->sub.trees.index++]] = 0; 929 - s->sub.trees.bb = 7; 930 - t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb, 931 - &s->sub.trees.tb, z); 932 - if (t != Z_OK) 933 - { 934 - r = t; 935 - if (r == Z_DATA_ERROR) 936 - s->mode = BADB; 937 - LEAVE 938 - } 939 - s->sub.trees.index = 0; 940 - Tracev((stderr, "inflate: bits tree ok\n")); 941 - s->mode = DTREE; 942 - case DTREE: 943 - while (t = s->sub.trees.table, 944 - s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) 945 - { 946 - inflate_huft *h; 947 - uInt i, j, c; 948 - 949 - t = s->sub.trees.bb; 950 - NEEDBITS(t) 951 - h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]); 952 - t = h->word.what.Bits; 953 - c = h->more.Base; 954 - if (c < 16) 955 - { 956 - DUMPBITS(t) 957 - s->sub.trees.blens[s->sub.trees.index++] = c; 958 - } 959 - else /* c == 16..18 */ 960 - { 961 - i = c == 18 ? 7 : c - 14; 962 - j = c == 18 ? 11 : 3; 963 - NEEDBITS(t + i) 964 - DUMPBITS(t) 965 - j += (uInt)b & inflate_mask[i]; 966 - DUMPBITS(i) 967 - i = s->sub.trees.index; 968 - t = s->sub.trees.table; 969 - if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || 970 - (c == 16 && i < 1)) 971 - { 972 - s->mode = BADB; 973 - z->msg = "invalid bit length repeat"; 974 - r = Z_DATA_ERROR; 975 - LEAVE 976 - } 977 - c = c == 16 ? s->sub.trees.blens[i - 1] : 0; 978 - do { 979 - s->sub.trees.blens[i++] = c; 980 - } while (--j); 981 - s->sub.trees.index = i; 982 - } 983 - } 984 - inflate_trees_free(s->sub.trees.tb, z); 985 - s->sub.trees.tb = Z_NULL; 986 - { 987 - uInt bl, bd; 988 - inflate_huft *tl, *td; 989 - inflate_codes_statef *c; 990 - 991 - bl = 9; /* must be <= 9 for lookahead assumptions */ 992 - bd = 6; /* must be <= 9 for lookahead assumptions */ 993 - t = s->sub.trees.table; 994 - t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), 995 - s->sub.trees.blens, &bl, &bd, &tl, &td, z); 996 - if (t != Z_OK) 997 - { 998 - if (t == (uInt)Z_DATA_ERROR) 999 - s->mode = BADB; 1000 - r = t; 1001 - LEAVE 1002 - } 1003 - Tracev((stderr, "inflate: trees ok\n")); 1004 - if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL) 1005 - { 1006 - inflate_trees_free(td, z); 1007 - inflate_trees_free(tl, z); 1008 - r = Z_MEM_ERROR; 1009 - LEAVE 1010 - } 1011 - ZFREE(z, s->sub.trees.blens, s->sub.trees.nblens * sizeof(uInt)); 1012 - s->sub.decode.codes = c; 1013 - s->sub.decode.tl = tl; 1014 - s->sub.decode.td = td; 1015 - } 1016 - s->mode = CODES; 1017 - case CODES: 1018 - UPDATE 1019 - if ((r = inflate_codes(s, z, r)) != Z_STREAM_END) 1020 - return inflate_flush(s, z, r); 1021 - r = Z_OK; 1022 - inflate_codes_free(s->sub.decode.codes, z); 1023 - inflate_trees_free(s->sub.decode.td, z); 1024 - inflate_trees_free(s->sub.decode.tl, z); 1025 - LOAD 1026 - Tracev((stderr, "inflate: codes end, %lu total out\n", 1027 - z->total_out + (q >= s->read ? q - s->read : 1028 - (s->end - s->read) + (q - s->window)))); 1029 - if (!s->last) 1030 - { 1031 - s->mode = TYPE; 1032 - break; 1033 - } 1034 - if (k > 7) /* return unused byte, if any */ 1035 - { 1036 - Assert(k < 16, "inflate_codes grabbed too many bytes") 1037 - k -= 8; 1038 - n++; 1039 - p--; /* can always return one */ 1040 - } 1041 - s->mode = DRY; 1042 - case DRY: 1043 - FLUSH 1044 - if (s->read != s->write) 1045 - LEAVE 1046 - s->mode = DONEB; 1047 - case DONEB: 1048 - r = Z_STREAM_END; 1049 - LEAVE 1050 - case BADB: 1051 - r = Z_DATA_ERROR; 1052 - LEAVE 1053 - default: 1054 - r = Z_STREAM_ERROR; 1055 - LEAVE 1056 - } 1057 - } 1058 - 1059 - 1060 - local int inflate_blocks_free(s, z, c) 1061 - inflate_blocks_statef *s; 1062 - z_stream *z; 1063 - uLongf *c; 1064 - { 1065 - inflate_blocks_reset(s, z, c); 1066 - ZFREE(z, s->window, s->end - s->window); 1067 - ZFREE(z, s, sizeof(struct inflate_blocks_state)); 1068 - Trace((stderr, "inflate: blocks freed\n")); 1069 - return Z_OK; 1070 - } 1071 - 1072 - /* 1073 - * This subroutine adds the data at next_in/avail_in to the output history 1074 - * without performing any output. The output buffer must be "caught up"; 1075 - * i.e. no pending output (hence s->read equals s->write), and the state must 1076 - * be BLOCKS (i.e. we should be willing to see the start of a series of 1077 - * BLOCKS). On exit, the output will also be caught up, and the checksum 1078 - * will have been updated if need be. 1079 - */ 1080 - local int inflate_addhistory(s, z) 1081 - inflate_blocks_statef *s; 1082 - z_stream *z; 1083 - { 1084 - uLong b; /* bit buffer */ /* NOT USED HERE */ 1085 - uInt k; /* bits in bit buffer */ /* NOT USED HERE */ 1086 - uInt t; /* temporary storage */ 1087 - Bytef *p; /* input data pointer */ 1088 - uInt n; /* bytes available there */ 1089 - Bytef *q; /* output window write pointer */ 1090 - uInt m; /* bytes to end of window or read pointer */ 1091 - 1092 - if (s->read != s->write) 1093 - return Z_STREAM_ERROR; 1094 - if (s->mode != TYPE) 1095 - return Z_DATA_ERROR; 1096 - 1097 - /* we're ready to rock */ 1098 - LOAD 1099 - /* while there is input ready, copy to output buffer, moving 1100 - * pointers as needed. 1101 - */ 1102 - while (n) { 1103 - t = n; /* how many to do */ 1104 - /* is there room until end of buffer? */ 1105 - if (t > m) t = m; 1106 - /* update check information */ 1107 - if (s->checkfn != Z_NULL) 1108 - s->check = (*s->checkfn)(s->check, q, t); 1109 - zmemcpy(q, p, t); 1110 - q += t; 1111 - p += t; 1112 - n -= t; 1113 - z->total_out += t; 1114 - s->read = q; /* drag read pointer forward */ 1115 - /* WRAP */ /* expand WRAP macro by hand to handle s->read */ 1116 - if (q == s->end) { 1117 - s->read = q = s->window; 1118 - m = WAVAIL; 1119 - } 1120 - } 1121 - UPDATE 1122 - return Z_OK; 1123 - } 1124 - 1125 - 1126 - /* 1127 - * At the end of a Deflate-compressed PPP packet, we expect to have seen 1128 - * a `stored' block type value but not the (zero) length bytes. 1129 - */ 1130 - local int inflate_packet_flush(s) 1131 - inflate_blocks_statef *s; 1132 - { 1133 - if (s->mode != LENS) 1134 - return Z_DATA_ERROR; 1135 - s->mode = TYPE; 1136 - return Z_OK; 1137 - } 1138 - 1139 - 1140 - /*+++++*/ 1141 - /* inftrees.c -- generate Huffman trees for efficient decoding 1142 - * Copyright (C) 1995 Mark Adler 1143 - * For conditions of distribution and use, see copyright notice in zlib.h 1144 - */ 1145 - 1146 - /* simplify the use of the inflate_huft type with some defines */ 1147 - #define base more.Base 1148 - #define next more.Next 1149 - #define exop word.what.Exop 1150 - #define bits word.what.Bits 1151 - 1152 - 1153 - local int huft_build OF(( 1154 - uIntf *, /* code lengths in bits */ 1155 - uInt, /* number of codes */ 1156 - uInt, /* number of "simple" codes */ 1157 - uIntf *, /* list of base values for non-simple codes */ 1158 - uIntf *, /* list of extra bits for non-simple codes */ 1159 - inflate_huft * FAR*,/* result: starting table */ 1160 - uIntf *, /* maximum lookup bits (returns actual) */ 1161 - z_stream *)); /* for zalloc function */ 1162 - 1163 - local voidpf falloc OF(( 1164 - voidpf, /* opaque pointer (not used) */ 1165 - uInt, /* number of items */ 1166 - uInt)); /* size of item */ 1167 - 1168 - local void ffree OF(( 1169 - voidpf q, /* opaque pointer (not used) */ 1170 - voidpf p, /* what to free (not used) */ 1171 - uInt n)); /* number of bytes (not used) */ 1172 - 1173 - /* Tables for deflate from PKZIP's appnote.txt. */ 1174 - local uInt cplens[] = { /* Copy lengths for literal codes 257..285 */ 1175 - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 1176 - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; 1177 - /* actually lengths - 2; also see note #13 above about 258 */ 1178 - local uInt cplext[] = { /* Extra bits for literal codes 257..285 */ 1179 - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1180 - 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 192, 192}; /* 192==invalid */ 1181 - local uInt cpdist[] = { /* Copy offsets for distance codes 0..29 */ 1182 - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 1183 - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 1184 - 8193, 12289, 16385, 24577}; 1185 - local uInt cpdext[] = { /* Extra bits for distance codes */ 1186 - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 1187 - 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 1188 - 12, 12, 13, 13}; 1189 - 1190 - /* 1191 - Huffman code decoding is performed using a multi-level table lookup. 1192 - The fastest way to decode is to simply build a lookup table whose 1193 - size is determined by the longest code. However, the time it takes 1194 - to build this table can also be a factor if the data being decoded 1195 - is not very long. The most common codes are necessarily the 1196 - shortest codes, so those codes dominate the decoding time, and hence 1197 - the speed. The idea is you can have a shorter table that decodes the 1198 - shorter, more probable codes, and then point to subsidiary tables for 1199 - the longer codes. The time it costs to decode the longer codes is 1200 - then traded against the time it takes to make longer tables. 1201 - 1202 - This results of this trade are in the variables lbits and dbits 1203 - below. lbits is the number of bits the first level table for literal/ 1204 - length codes can decode in one step, and dbits is the same thing for 1205 - the distance codes. Subsequent tables are also less than or equal to 1206 - those sizes. These values may be adjusted either when all of the 1207 - codes are shorter than that, in which case the longest code length in 1208 - bits is used, or when the shortest code is *longer* than the requested 1209 - table size, in which case the length of the shortest code in bits is 1210 - used. 1211 - 1212 - There are two different values for the two tables, since they code a 1213 - different number of possibilities each. The literal/length table 1214 - codes 286 possible values, or in a flat code, a little over eight 1215 - bits. The distance table codes 30 possible values, or a little less 1216 - than five bits, flat. The optimum values for speed end up being 1217 - about one bit more than those, so lbits is 8+1 and dbits is 5+1. 1218 - The optimum values may differ though from machine to machine, and 1219 - possibly even between compilers. Your mileage may vary. 1220 - */ 1221 - 1222 - 1223 - /* If BMAX needs to be larger than 16, then h and x[] should be uLong. */ 1224 - #define BMAX 15 /* maximum bit length of any code */ 1225 - #define N_MAX 288 /* maximum number of codes in any set */ 1226 - 1227 - #ifdef DEBUG_ZLIB 1228 - uInt inflate_hufts; 1229 - #endif 1230 - 1231 - local int huft_build(b, n, s, d, e, t, m, zs) 1232 - uIntf *b; /* code lengths in bits (all assumed <= BMAX) */ 1233 - uInt n; /* number of codes (assumed <= N_MAX) */ 1234 - uInt s; /* number of simple-valued codes (0..s-1) */ 1235 - uIntf *d; /* list of base values for non-simple codes */ 1236 - uIntf *e; /* list of extra bits for non-simple codes */ 1237 - inflate_huft * FAR *t; /* result: starting table */ 1238 - uIntf *m; /* maximum lookup bits, returns actual */ 1239 - z_stream *zs; /* for zalloc function */ 1240 - /* Given a list of code lengths and a maximum table size, make a set of 1241 - tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR 1242 - if the given code set is incomplete (the tables are still built in this 1243 - case), Z_DATA_ERROR if the input is invalid (all zero length codes or an 1244 - over-subscribed set of lengths), or Z_MEM_ERROR if not enough memory. */ 1245 - { 1246 - 1247 - uInt a; /* counter for codes of length k */ 1248 - uInt c[BMAX+1]; /* bit length count table */ 1249 - uInt f; /* i repeats in table every f entries */ 1250 - int g; /* maximum code length */ 1251 - int h; /* table level */ 1252 - register uInt i; /* counter, current code */ 1253 - register uInt j; /* counter */ 1254 - register int k; /* number of bits in current code */ 1255 - int l; /* bits per table (returned in m) */ 1256 - register uIntf *p; /* pointer into c[], b[], or v[] */ 1257 - inflate_huft *q; /* points to current table */ 1258 - struct inflate_huft_s r; /* table entry for structure assignment */ 1259 - inflate_huft *u[BMAX]; /* table stack */ 1260 - uInt v[N_MAX]; /* values in order of bit length */ 1261 - register int w; /* bits before this table == (l * h) */ 1262 - uInt x[BMAX+1]; /* bit offsets, then code stack */ 1263 - uIntf *xp; /* pointer into x */ 1264 - int y; /* number of dummy codes added */ 1265 - uInt z; /* number of entries in current table */ 1266 - 1267 - 1268 - /* Generate counts for each bit length */ 1269 - p = c; 1270 - #define C0 *p++ = 0; 1271 - #define C2 C0 C0 C0 C0 1272 - #define C4 C2 C2 C2 C2 1273 - C4 /* clear c[]--assume BMAX+1 is 16 */ 1274 - p = b; i = n; 1275 - do { 1276 - c[*p++]++; /* assume all entries <= BMAX */ 1277 - } while (--i); 1278 - if (c[0] == n) /* null input--all zero length codes */ 1279 - { 1280 - *t = (inflate_huft *)Z_NULL; 1281 - *m = 0; 1282 - return Z_OK; 1283 - } 1284 - 1285 - 1286 - /* Find minimum and maximum length, bound *m by those */ 1287 - l = *m; 1288 - for (j = 1; j <= BMAX; j++) 1289 - if (c[j]) 1290 - break; 1291 - k = j; /* minimum code length */ 1292 - if ((uInt)l < j) 1293 - l = j; 1294 - for (i = BMAX; i; i--) 1295 - if (c[i]) 1296 - break; 1297 - g = i; /* maximum code length */ 1298 - if ((uInt)l > i) 1299 - l = i; 1300 - *m = l; 1301 - 1302 - 1303 - /* Adjust last length count to fill out codes, if needed */ 1304 - for (y = 1 << j; j < i; j++, y <<= 1) 1305 - if ((y -= c[j]) < 0) 1306 - return Z_DATA_ERROR; 1307 - if ((y -= c[i]) < 0) 1308 - return Z_DATA_ERROR; 1309 - c[i] += y; 1310 - 1311 - 1312 - /* Generate starting offsets into the value table for each length */ 1313 - x[1] = j = 0; 1314 - p = c + 1; xp = x + 2; 1315 - while (--i) { /* note that i == g from above */ 1316 - *xp++ = (j += *p++); 1317 - } 1318 - 1319 - 1320 - /* Make a table of values in order of bit lengths */ 1321 - p = b; i = 0; 1322 - do { 1323 - if ((j = *p++) != 0) 1324 - v[x[j]++] = i; 1325 - } while (++i < n); 1326 - 1327 - 1328 - /* Generate the Huffman codes and for each, make the table entries */ 1329 - x[0] = i = 0; /* first Huffman code is zero */ 1330 - p = v; /* grab values in bit order */ 1331 - h = -1; /* no tables yet--level -1 */ 1332 - w = -l; /* bits decoded == (l * h) */ 1333 - u[0] = (inflate_huft *)Z_NULL; /* just to keep compilers happy */ 1334 - q = (inflate_huft *)Z_NULL; /* ditto */ 1335 - z = 0; /* ditto */ 1336 - 1337 - /* go through the bit lengths (k already is bits in shortest code) */ 1338 - for (; k <= g; k++) 1339 - { 1340 - a = c[k]; 1341 - while (a--) 1342 - { 1343 - /* here i is the Huffman code of length k bits for value *p */ 1344 - /* make tables up to required level */ 1345 - while (k > w + l) 1346 - { 1347 - h++; 1348 - w += l; /* previous table always l bits */ 1349 - 1350 - /* compute minimum size table less than or equal to l bits */ 1351 - z = (z = g - w) > (uInt)l ? l : z; /* table size upper limit */ 1352 - if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ 1353 - { /* too few codes for k-w bit table */ 1354 - f -= a + 1; /* deduct codes from patterns left */ 1355 - xp = c + k; 1356 - if (j < z) 1357 - while (++j < z) /* try smaller tables up to z bits */ 1358 - { 1359 - if ((f <<= 1) <= *++xp) 1360 - break; /* enough codes to use up j bits */ 1361 - f -= *xp; /* else deduct codes from patterns */ 1362 - } 1363 - } 1364 - z = 1 << j; /* table entries for j-bit table */ 1365 - 1366 - /* allocate and link in new table */ 1367 - if ((q = (inflate_huft *)ZALLOC 1368 - (zs,z + 1,sizeof(inflate_huft))) == Z_NULL) 1369 - { 1370 - if (h) 1371 - inflate_trees_free(u[0], zs); 1372 - return Z_MEM_ERROR; /* not enough memory */ 1373 - } 1374 - q->word.Nalloc = z + 1; 1375 - #ifdef DEBUG_ZLIB 1376 - inflate_hufts += z + 1; 1377 - #endif 1378 - *t = q + 1; /* link to list for huft_free() */ 1379 - *(t = &(q->next)) = Z_NULL; 1380 - u[h] = ++q; /* table starts after link */ 1381 - 1382 - /* connect to last table, if there is one */ 1383 - if (h) 1384 - { 1385 - x[h] = i; /* save pattern for backing up */ 1386 - r.bits = (Byte)l; /* bits to dump before this table */ 1387 - r.exop = (Byte)j; /* bits in this table */ 1388 - r.next = q; /* pointer to this table */ 1389 - j = i >> (w - l); /* (get around Turbo C bug) */ 1390 - u[h-1][j] = r; /* connect to last table */ 1391 - } 1392 - } 1393 - 1394 - /* set up table entry in r */ 1395 - r.bits = (Byte)(k - w); 1396 - if (p >= v + n) 1397 - r.exop = 128 + 64; /* out of values--invalid code */ 1398 - else if (*p < s) 1399 - { 1400 - r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */ 1401 - r.base = *p++; /* simple code is just the value */ 1402 - } 1403 - else 1404 - { 1405 - r.exop = (Byte)e[*p - s] + 16 + 64; /* non-simple--look up in lists */ 1406 - r.base = d[*p++ - s]; 1407 - } 1408 - 1409 - /* fill code-like entries with r */ 1410 - f = 1 << (k - w); 1411 - for (j = i >> w; j < z; j += f) 1412 - q[j] = r; 1413 - 1414 - /* backwards increment the k-bit code i */ 1415 - for (j = 1 << (k - 1); i & j; j >>= 1) 1416 - i ^= j; 1417 - i ^= j; 1418 - 1419 - /* backup over finished tables */ 1420 - while ((i & ((1 << w) - 1)) != x[h]) 1421 - { 1422 - h--; /* don't need to update q */ 1423 - w -= l; 1424 - } 1425 - } 1426 - } 1427 - 1428 - 1429 - /* Return Z_BUF_ERROR if we were given an incomplete table */ 1430 - return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK; 1431 - } 1432 - 1433 - 1434 - local int inflate_trees_bits(c, bb, tb, z) 1435 - uIntf *c; /* 19 code lengths */ 1436 - uIntf *bb; /* bits tree desired/actual depth */ 1437 - inflate_huft * FAR *tb; /* bits tree result */ 1438 - z_stream *z; /* for zfree function */ 1439 - { 1440 - int r; 1441 - 1442 - r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, tb, bb, z); 1443 - if (r == Z_DATA_ERROR) 1444 - z->msg = "oversubscribed dynamic bit lengths tree"; 1445 - else if (r == Z_BUF_ERROR) 1446 - { 1447 - inflate_trees_free(*tb, z); 1448 - z->msg = "incomplete dynamic bit lengths tree"; 1449 - r = Z_DATA_ERROR; 1450 - } 1451 - return r; 1452 - } 1453 - 1454 - 1455 - local int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, z) 1456 - uInt nl; /* number of literal/length codes */ 1457 - uInt nd; /* number of distance codes */ 1458 - uIntf *c; /* that many (total) code lengths */ 1459 - uIntf *bl; /* literal desired/actual bit depth */ 1460 - uIntf *bd; /* distance desired/actual bit depth */ 1461 - inflate_huft * FAR *tl; /* literal/length tree result */ 1462 - inflate_huft * FAR *td; /* distance tree result */ 1463 - z_stream *z; /* for zfree function */ 1464 - { 1465 - int r; 1466 - 1467 - /* build literal/length tree */ 1468 - if ((r = huft_build(c, nl, 257, cplens, cplext, tl, bl, z)) != Z_OK) 1469 - { 1470 - if (r == Z_DATA_ERROR) 1471 - z->msg = "oversubscribed literal/length tree"; 1472 - else if (r == Z_BUF_ERROR) 1473 - { 1474 - inflate_trees_free(*tl, z); 1475 - z->msg = "incomplete literal/length tree"; 1476 - r = Z_DATA_ERROR; 1477 - } 1478 - return r; 1479 - } 1480 - 1481 - /* build distance tree */ 1482 - if ((r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, z)) != Z_OK) 1483 - { 1484 - if (r == Z_DATA_ERROR) 1485 - z->msg = "oversubscribed literal/length tree"; 1486 - else if (r == Z_BUF_ERROR) { 1487 - #ifdef PKZIP_BUG_WORKAROUND 1488 - r = Z_OK; 1489 - } 1490 - #else 1491 - inflate_trees_free(*td, z); 1492 - z->msg = "incomplete literal/length tree"; 1493 - r = Z_DATA_ERROR; 1494 - } 1495 - inflate_trees_free(*tl, z); 1496 - return r; 1497 - #endif 1498 - } 1499 - 1500 - /* done */ 1501 - return Z_OK; 1502 - } 1503 - 1504 - 1505 - /* build fixed tables only once--keep them here */ 1506 - local int fixed_lock = 0; 1507 - local int fixed_built = 0; 1508 - #define FIXEDH 530 /* number of hufts used by fixed tables */ 1509 - local uInt fixed_left = FIXEDH; 1510 - local inflate_huft fixed_mem[FIXEDH]; 1511 - local uInt fixed_bl; 1512 - local uInt fixed_bd; 1513 - local inflate_huft *fixed_tl; 1514 - local inflate_huft *fixed_td; 1515 - 1516 - 1517 - local voidpf falloc(q, n, s) 1518 - voidpf q; /* opaque pointer (not used) */ 1519 - uInt n; /* number of items */ 1520 - uInt s; /* size of item */ 1521 - { 1522 - Assert(s == sizeof(inflate_huft) && n <= fixed_left, 1523 - "inflate_trees falloc overflow"); 1524 - if (q) s++; /* to make some compilers happy */ 1525 - fixed_left -= n; 1526 - return (voidpf)(fixed_mem + fixed_left); 1527 - } 1528 - 1529 - 1530 - local void ffree(q, p, n) 1531 - voidpf q; 1532 - voidpf p; 1533 - uInt n; 1534 - { 1535 - Assert(0, "inflate_trees ffree called!"); 1536 - if (q) q = p; /* to make some compilers happy */ 1537 - } 1538 - 1539 - 1540 - local int inflate_trees_fixed(bl, bd, tl, td) 1541 - uIntf *bl; /* literal desired/actual bit depth */ 1542 - uIntf *bd; /* distance desired/actual bit depth */ 1543 - inflate_huft * FAR *tl; /* literal/length tree result */ 1544 - inflate_huft * FAR *td; /* distance tree result */ 1545 - { 1546 - /* build fixed tables if not built already--lock out other instances */ 1547 - while (++fixed_lock > 1) 1548 - fixed_lock--; 1549 - if (!fixed_built) 1550 - { 1551 - int k; /* temporary variable */ 1552 - unsigned c[288]; /* length list for huft_build */ 1553 - z_stream z; /* for falloc function */ 1554 - 1555 - /* set up fake z_stream for memory routines */ 1556 - z.zalloc = falloc; 1557 - z.zfree = ffree; 1558 - z.opaque = Z_NULL; 1559 - 1560 - /* literal table */ 1561 - for (k = 0; k < 144; k++) 1562 - c[k] = 8; 1563 - for (; k < 256; k++) 1564 - c[k] = 9; 1565 - for (; k < 280; k++) 1566 - c[k] = 7; 1567 - for (; k < 288; k++) 1568 - c[k] = 8; 1569 - fixed_bl = 7; 1570 - huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, &z); 1571 - 1572 - /* distance table */ 1573 - for (k = 0; k < 30; k++) 1574 - c[k] = 5; 1575 - fixed_bd = 5; 1576 - huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, &z); 1577 - 1578 - /* done */ 1579 - fixed_built = 1; 1580 - } 1581 - fixed_lock--; 1582 - *bl = fixed_bl; 1583 - *bd = fixed_bd; 1584 - *tl = fixed_tl; 1585 - *td = fixed_td; 1586 - return Z_OK; 1587 - } 1588 - 1589 - 1590 - local int inflate_trees_free(t, z) 1591 - inflate_huft *t; /* table to free */ 1592 - z_stream *z; /* for zfree function */ 1593 - /* Free the malloc'ed tables built by huft_build(), which makes a linked 1594 - list of the tables it made, with the links in a dummy first entry of 1595 - each table. */ 1596 - { 1597 - register inflate_huft *p, *q; 1598 - 1599 - /* Go through linked list, freeing from the malloced (t[-1]) address. */ 1600 - p = t; 1601 - while (p != Z_NULL) 1602 - { 1603 - q = (--p)->next; 1604 - ZFREE(z, p, p->word.Nalloc * sizeof(inflate_huft)); 1605 - p = q; 1606 - } 1607 - return Z_OK; 1608 - } 1609 - 1610 - /*+++++*/ 1611 - /* infcodes.c -- process literals and length/distance pairs 1612 - * Copyright (C) 1995 Mark Adler 1613 - * For conditions of distribution and use, see copyright notice in zlib.h 1614 - */ 1615 - 1616 - /* simplify the use of the inflate_huft type with some defines */ 1617 - #define base more.Base 1618 - #define next more.Next 1619 - #define exop word.what.Exop 1620 - #define bits word.what.Bits 1621 - 1622 - /* inflate codes private state */ 1623 - struct inflate_codes_state { 1624 - 1625 - /* mode */ 1626 - enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ 1627 - START, /* x: set up for LEN */ 1628 - LEN, /* i: get length/literal/eob next */ 1629 - LENEXT, /* i: getting length extra (have base) */ 1630 - DIST, /* i: get distance next */ 1631 - DISTEXT, /* i: getting distance extra */ 1632 - COPY, /* o: copying bytes in window, waiting for space */ 1633 - LIT, /* o: got literal, waiting for output space */ 1634 - WASH, /* o: got eob, possibly still output waiting */ 1635 - END, /* x: got eob and all data flushed */ 1636 - BADCODE} /* x: got error */ 1637 - mode; /* current inflate_codes mode */ 1638 - 1639 - /* mode dependent information */ 1640 - uInt len; 1641 - union { 1642 - struct { 1643 - inflate_huft *tree; /* pointer into tree */ 1644 - uInt need; /* bits needed */ 1645 - } code; /* if LEN or DIST, where in tree */ 1646 - uInt lit; /* if LIT, literal */ 1647 - struct { 1648 - uInt get; /* bits to get for extra */ 1649 - uInt dist; /* distance back to copy from */ 1650 - } copy; /* if EXT or COPY, where and how much */ 1651 - } sub; /* submode */ 1652 - 1653 - /* mode independent information */ 1654 - Byte lbits; /* ltree bits decoded per branch */ 1655 - Byte dbits; /* dtree bits decoder per branch */ 1656 - inflate_huft *ltree; /* literal/length/eob tree */ 1657 - inflate_huft *dtree; /* distance tree */ 1658 - 1659 - }; 1660 - 1661 - 1662 - local inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z) 1663 - uInt bl, bd; 1664 - inflate_huft *tl, *td; 1665 - z_stream *z; 1666 - { 1667 - inflate_codes_statef *c; 1668 - 1669 - if ((c = (inflate_codes_statef *) 1670 - ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL) 1671 - { 1672 - c->mode = START; 1673 - c->lbits = (Byte)bl; 1674 - c->dbits = (Byte)bd; 1675 - c->ltree = tl; 1676 - c->dtree = td; 1677 - Tracev((stderr, "inflate: codes new\n")); 1678 - } 1679 - return c; 1680 - } 1681 - 1682 - 1683 - local int inflate_codes(s, z, r) 1684 - inflate_blocks_statef *s; 1685 - z_stream *z; 1686 - int r; 1687 - { 1688 - uInt j; /* temporary storage */ 1689 - inflate_huft *t; /* temporary pointer */ 1690 - uInt e; /* extra bits or operation */ 1691 - uLong b; /* bit buffer */ 1692 - uInt k; /* bits in bit buffer */ 1693 - Bytef *p; /* input data pointer */ 1694 - uInt n; /* bytes available there */ 1695 - Bytef *q; /* output window write pointer */ 1696 - uInt m; /* bytes to end of window or read pointer */ 1697 - Bytef *f; /* pointer to copy strings from */ 1698 - inflate_codes_statef *c = s->sub.decode.codes; /* codes state */ 1699 - 1700 - /* copy input/output information to locals (UPDATE macro restores) */ 1701 - LOAD 1702 - 1703 - /* process input and output based on current state */ 1704 - while (1) switch (c->mode) 1705 - { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */ 1706 - case START: /* x: set up for LEN */ 1707 - #ifndef SLOW 1708 - if (m >= 258 && n >= 10) 1709 - { 1710 - UPDATE 1711 - r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z); 1712 - LOAD 1713 - if (r != Z_OK) 1714 - { 1715 - c->mode = r == Z_STREAM_END ? WASH : BADCODE; 1716 - break; 1717 - } 1718 - } 1719 - #endif /* !SLOW */ 1720 - c->sub.code.need = c->lbits; 1721 - c->sub.code.tree = c->ltree; 1722 - c->mode = LEN; 1723 - case LEN: /* i: get length/literal/eob next */ 1724 - j = c->sub.code.need; 1725 - NEEDBITS(j) 1726 - t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); 1727 - DUMPBITS(t->bits) 1728 - e = (uInt)(t->exop); 1729 - if (e == 0) /* literal */ 1730 - { 1731 - c->sub.lit = t->base; 1732 - Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? 1733 - "inflate: literal '%c'\n" : 1734 - "inflate: literal 0x%02x\n", t->base)); 1735 - c->mode = LIT; 1736 - break; 1737 - } 1738 - if (e & 16) /* length */ 1739 - { 1740 - c->sub.copy.get = e & 15; 1741 - c->len = t->base; 1742 - c->mode = LENEXT; 1743 - break; 1744 - } 1745 - if ((e & 64) == 0) /* next table */ 1746 - { 1747 - c->sub.code.need = e; 1748 - c->sub.code.tree = t->next; 1749 - break; 1750 - } 1751 - if (e & 32) /* end of block */ 1752 - { 1753 - Tracevv((stderr, "inflate: end of block\n")); 1754 - c->mode = WASH; 1755 - break; 1756 - } 1757 - c->mode = BADCODE; /* invalid code */ 1758 - z->msg = "invalid literal/length code"; 1759 - r = Z_DATA_ERROR; 1760 - LEAVE 1761 - case LENEXT: /* i: getting length extra (have base) */ 1762 - j = c->sub.copy.get; 1763 - NEEDBITS(j) 1764 - c->len += (uInt)b & inflate_mask[j]; 1765 - DUMPBITS(j) 1766 - c->sub.code.need = c->dbits; 1767 - c->sub.code.tree = c->dtree; 1768 - Tracevv((stderr, "inflate: length %u\n", c->len)); 1769 - c->mode = DIST; 1770 - case DIST: /* i: get distance next */ 1771 - j = c->sub.code.need; 1772 - NEEDBITS(j) 1773 - t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); 1774 - DUMPBITS(t->bits) 1775 - e = (uInt)(t->exop); 1776 - if (e & 16) /* distance */ 1777 - { 1778 - c->sub.copy.get = e & 15; 1779 - c->sub.copy.dist = t->base; 1780 - c->mode = DISTEXT; 1781 - break; 1782 - } 1783 - if ((e & 64) == 0) /* next table */ 1784 - { 1785 - c->sub.code.need = e; 1786 - c->sub.code.tree = t->next; 1787 - break; 1788 - } 1789 - c->mode = BADCODE; /* invalid code */ 1790 - z->msg = "invalid distance code"; 1791 - r = Z_DATA_ERROR; 1792 - LEAVE 1793 - case DISTEXT: /* i: getting distance extra */ 1794 - j = c->sub.copy.get; 1795 - NEEDBITS(j) 1796 - c->sub.copy.dist += (uInt)b & inflate_mask[j]; 1797 - DUMPBITS(j) 1798 - Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); 1799 - c->mode = COPY; 1800 - case COPY: /* o: copying bytes in window, waiting for space */ 1801 - #ifndef __TURBOC__ /* Turbo C bug for following expression */ 1802 - f = (uInt)(q - s->window) < c->sub.copy.dist ? 1803 - s->end - (c->sub.copy.dist - (q - s->window)) : 1804 - q - c->sub.copy.dist; 1805 - #else 1806 - f = q - c->sub.copy.dist; 1807 - if ((uInt)(q - s->window) < c->sub.copy.dist) 1808 - f = s->end - (c->sub.copy.dist - (q - s->window)); 1809 - #endif 1810 - while (c->len) 1811 - { 1812 - NEEDOUT 1813 - OUTBYTE(*f++) 1814 - if (f == s->end) 1815 - f = s->window; 1816 - c->len--; 1817 - } 1818 - c->mode = START; 1819 - break; 1820 - case LIT: /* o: got literal, waiting for output space */ 1821 - NEEDOUT 1822 - OUTBYTE(c->sub.lit) 1823 - c->mode = START; 1824 - break; 1825 - case WASH: /* o: got eob, possibly more output */ 1826 - FLUSH 1827 - if (s->read != s->write) 1828 - LEAVE 1829 - c->mode = END; 1830 - case END: 1831 - r = Z_STREAM_END; 1832 - LEAVE 1833 - case BADCODE: /* x: got error */ 1834 - r = Z_DATA_ERROR; 1835 - LEAVE 1836 - default: 1837 - r = Z_STREAM_ERROR; 1838 - LEAVE 1839 - } 1840 - } 1841 - 1842 - 1843 - local void inflate_codes_free(c, z) 1844 - inflate_codes_statef *c; 1845 - z_stream *z; 1846 - { 1847 - ZFREE(z, c, sizeof(struct inflate_codes_state)); 1848 - Tracev((stderr, "inflate: codes free\n")); 1849 - } 1850 - 1851 - /*+++++*/ 1852 - /* inflate_util.c -- data and routines common to blocks and codes 1853 - * Copyright (C) 1995 Mark Adler 1854 - * For conditions of distribution and use, see copyright notice in zlib.h 1855 - */ 1856 - 1857 - /* copy as much as possible from the sliding window to the output area */ 1858 - local int inflate_flush(s, z, r) 1859 - inflate_blocks_statef *s; 1860 - z_stream *z; 1861 - int r; 1862 - { 1863 - uInt n; 1864 - Bytef *p, *q; 1865 - 1866 - /* local copies of source and destination pointers */ 1867 - p = z->next_out; 1868 - q = s->read; 1869 - 1870 - /* compute number of bytes to copy as far as end of window */ 1871 - n = (uInt)((q <= s->write ? s->write : s->end) - q); 1872 - if (n > z->avail_out) n = z->avail_out; 1873 - if (n && r == Z_BUF_ERROR) r = Z_OK; 1874 - 1875 - /* update counters */ 1876 - z->avail_out -= n; 1877 - z->total_out += n; 1878 - 1879 - /* update check information */ 1880 - if (s->checkfn != Z_NULL) 1881 - s->check = (*s->checkfn)(s->check, q, n); 1882 - 1883 - /* copy as far as end of window */ 1884 - zmemcpy(p, q, n); 1885 - p += n; 1886 - q += n; 1887 - 1888 - /* see if more to copy at beginning of window */ 1889 - if (q == s->end) 1890 - { 1891 - /* wrap pointers */ 1892 - q = s->window; 1893 - if (s->write == s->end) 1894 - s->write = s->window; 1895 - 1896 - /* compute bytes to copy */ 1897 - n = (uInt)(s->write - q); 1898 - if (n > z->avail_out) n = z->avail_out; 1899 - if (n && r == Z_BUF_ERROR) r = Z_OK; 1900 - 1901 - /* update counters */ 1902 - z->avail_out -= n; 1903 - z->total_out += n; 1904 - 1905 - /* update check information */ 1906 - if (s->checkfn != Z_NULL) 1907 - s->check = (*s->checkfn)(s->check, q, n); 1908 - 1909 - /* copy */ 1910 - zmemcpy(p, q, n); 1911 - p += n; 1912 - q += n; 1913 - } 1914 - 1915 - /* update pointers */ 1916 - z->next_out = p; 1917 - s->read = q; 1918 - 1919 - /* done */ 1920 - return r; 1921 - } 1922 - 1923 - 1924 - /*+++++*/ 1925 - /* inffast.c -- process literals and length/distance pairs fast 1926 - * Copyright (C) 1995 Mark Adler 1927 - * For conditions of distribution and use, see copyright notice in zlib.h 1928 - */ 1929 - 1930 - /* simplify the use of the inflate_huft type with some defines */ 1931 - #define base more.Base 1932 - #define next more.Next 1933 - #define exop word.what.Exop 1934 - #define bits word.what.Bits 1935 - 1936 - /* macros for bit input with no checking and for returning unused bytes */ 1937 - #define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<<k;k+=8;}} 1938 - #define UNGRAB {n+=(c=k>>3);p-=c;k&=7;} 1939 - 1940 - /* Called with number of bytes left to write in window at least 258 1941 - (the maximum string length) and number of input bytes available 1942 - at least ten. The ten bytes are six bytes for the longest length/ 1943 - distance pair plus four bytes for overloading the bit buffer. */ 1944 - 1945 - local int inflate_fast(bl, bd, tl, td, s, z) 1946 - uInt bl, bd; 1947 - inflate_huft *tl, *td; 1948 - inflate_blocks_statef *s; 1949 - z_stream *z; 1950 - { 1951 - inflate_huft *t; /* temporary pointer */ 1952 - uInt e; /* extra bits or operation */ 1953 - uLong b; /* bit buffer */ 1954 - uInt k; /* bits in bit buffer */ 1955 - Bytef *p; /* input data pointer */ 1956 - uInt n; /* bytes available there */ 1957 - Bytef *q; /* output window write pointer */ 1958 - uInt m; /* bytes to end of window or read pointer */ 1959 - uInt ml; /* mask for literal/length tree */ 1960 - uInt md; /* mask for distance tree */ 1961 - uInt c; /* bytes to copy */ 1962 - uInt d; /* distance back to copy from */ 1963 - Bytef *r; /* copy source pointer */ 1964 - 1965 - /* load input, output, bit values */ 1966 - LOAD 1967 - 1968 - /* initialize masks */ 1969 - ml = inflate_mask[bl]; 1970 - md = inflate_mask[bd]; 1971 - 1972 - /* do until not enough input or output space for fast loop */ 1973 - do { /* assume called with m >= 258 && n >= 10 */ 1974 - /* get literal/length code */ 1975 - GRABBITS(20) /* max bits for literal/length code */ 1976 - if ((e = (t = tl + ((uInt)b & ml))->exop) == 0) 1977 - { 1978 - DUMPBITS(t->bits) 1979 - Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? 1980 - "inflate: * literal '%c'\n" : 1981 - "inflate: * literal 0x%02x\n", t->base)); 1982 - *q++ = (Byte)t->base; 1983 - m--; 1984 - continue; 1985 - } 1986 - do { 1987 - DUMPBITS(t->bits) 1988 - if (e & 16) 1989 - { 1990 - /* get extra bits for length */ 1991 - e &= 15; 1992 - c = t->base + ((uInt)b & inflate_mask[e]); 1993 - DUMPBITS(e) 1994 - Tracevv((stderr, "inflate: * length %u\n", c)); 1995 - 1996 - /* decode distance base of block to copy */ 1997 - GRABBITS(15); /* max bits for distance code */ 1998 - e = (t = td + ((uInt)b & md))->exop; 1999 - do { 2000 - DUMPBITS(t->bits) 2001 - if (e & 16) 2002 - { 2003 - /* get extra bits to add to distance base */ 2004 - e &= 15; 2005 - GRABBITS(e) /* get extra bits (up to 13) */ 2006 - d = t->base + ((uInt)b & inflate_mask[e]); 2007 - DUMPBITS(e) 2008 - Tracevv((stderr, "inflate: * distance %u\n", d)); 2009 - 2010 - /* do the copy */ 2011 - m -= c; 2012 - if ((uInt)(q - s->window) >= d) /* offset before dest */ 2013 - { /* just copy */ 2014 - r = q - d; 2015 - *q++ = *r++; c--; /* minimum count is three, */ 2016 - *q++ = *r++; c--; /* so unroll loop a little */ 2017 - } 2018 - else /* else offset after destination */ 2019 - { 2020 - e = d - (q - s->window); /* bytes from offset to end */ 2021 - r = s->end - e; /* pointer to offset */ 2022 - if (c > e) /* if source crosses, */ 2023 - { 2024 - c -= e; /* copy to end of window */ 2025 - do { 2026 - *q++ = *r++; 2027 - } while (--e); 2028 - r = s->window; /* copy rest from start of window */ 2029 - } 2030 - } 2031 - do { /* copy all or what's left */ 2032 - *q++ = *r++; 2033 - } while (--c); 2034 - break; 2035 - } 2036 - else if ((e & 64) == 0) 2037 - e = (t = t->next + ((uInt)b & inflate_mask[e]))->exop; 2038 - else 2039 - { 2040 - z->msg = "invalid distance code"; 2041 - UNGRAB 2042 - UPDATE 2043 - return Z_DATA_ERROR; 2044 - } 2045 - } while (1); 2046 - break; 2047 - } 2048 - if ((e & 64) == 0) 2049 - { 2050 - if ((e = (t = t->next + ((uInt)b & inflate_mask[e]))->exop) == 0) 2051 - { 2052 - DUMPBITS(t->bits) 2053 - Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? 2054 - "inflate: * literal '%c'\n" : 2055 - "inflate: * literal 0x%02x\n", t->base)); 2056 - *q++ = (Byte)t->base; 2057 - m--; 2058 - break; 2059 - } 2060 - } 2061 - else if (e & 32) 2062 - { 2063 - Tracevv((stderr, "inflate: * end of block\n")); 2064 - UNGRAB 2065 - UPDATE 2066 - return Z_STREAM_END; 2067 - } 2068 - else 2069 - { 2070 - z->msg = "invalid literal/length code"; 2071 - UNGRAB 2072 - UPDATE 2073 - return Z_DATA_ERROR; 2074 - } 2075 - } while (1); 2076 - } while (m >= 258 && n >= 10); 2077 - 2078 - /* not enough input or output--restore pointers and return */ 2079 - UNGRAB 2080 - UPDATE 2081 - return Z_OK; 2082 - } 2083 - 2084 - 2085 - /*+++++*/ 2086 - /* zutil.c -- target dependent utility functions for the compression library 2087 - * Copyright (C) 1995 Jean-loup Gailly. 2088 - * For conditions of distribution and use, see copyright notice in zlib.h 2089 - */ 2090 - 2091 - /* From: zutil.c,v 1.8 1995/05/03 17:27:12 jloup Exp */ 2092 - 2093 - char *zlib_version = ZLIB_VERSION; 2094 - 2095 - char *z_errmsg[] = { 2096 - "stream end", /* Z_STREAM_END 1 */ 2097 - "", /* Z_OK 0 */ 2098 - "file error", /* Z_ERRNO (-1) */ 2099 - "stream error", /* Z_STREAM_ERROR (-2) */ 2100 - "data error", /* Z_DATA_ERROR (-3) */ 2101 - "insufficient memory", /* Z_MEM_ERROR (-4) */ 2102 - "buffer error", /* Z_BUF_ERROR (-5) */ 2103 - ""}; 2104 - 2105 - 2106 - /*+++++*/ 2107 - /* adler32.c -- compute the Adler-32 checksum of a data stream 2108 - * Copyright (C) 1995 Mark Adler 2109 - * For conditions of distribution and use, see copyright notice in zlib.h 2110 - */ 2111 - 2112 - /* From: adler32.c,v 1.6 1995/05/03 17:27:08 jloup Exp */ 2113 - 2114 - #define BASE 65521L /* largest prime smaller than 65536 */ 2115 - #define NMAX 5552 2116 - /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ 2117 - 2118 - #define DO1(buf) {s1 += *buf++; s2 += s1;} 2119 - #define DO2(buf) DO1(buf); DO1(buf); 2120 - #define DO4(buf) DO2(buf); DO2(buf); 2121 - #define DO8(buf) DO4(buf); DO4(buf); 2122 - #define DO16(buf) DO8(buf); DO8(buf); 2123 - 2124 - /* ========================================================================= */ 2125 - uLong adler32(adler, buf, len) 2126 - uLong adler; 2127 - Bytef *buf; 2128 - uInt len; 2129 - { 2130 - unsigned long s1 = adler & 0xffff; 2131 - unsigned long s2 = (adler >> 16) & 0xffff; 2132 - int k; 2133 - 2134 - if (buf == Z_NULL) return 1L; 2135 - 2136 - while (len > 0) { 2137 - k = len < NMAX ? len : NMAX; 2138 - len -= k; 2139 - while (k >= 16) { 2140 - DO16(buf); 2141 - k -= 16; 2142 - } 2143 - if (k != 0) do { 2144 - DO1(buf); 2145 - } while (--k); 2146 - s1 %= BASE; 2147 - s2 %= BASE; 2148 - } 2149 - return (s2 << 16) | s1; 2150 - }
+6 -14
arch/xtensa/boot/lib/zmem.c
··· 1 - #include "zlib.h" 1 + #include <linux/zlib.h> 2 2 3 3 /* bits taken from ppc */ 4 4 ··· 9 9 for (;;); 10 10 } 11 11 12 - void *zalloc(void *x, unsigned items, unsigned size) 12 + void *zalloc(unsigned size) 13 13 { 14 14 void *p = avail_ram; 15 15 16 - size *= items; 17 16 size = (size + 7) & -8; 18 17 avail_ram += size; 19 18 if (avail_ram > end_avail) { ··· 22 23 } 23 24 return p; 24 25 } 25 - 26 - void zfree(void *x, void *addr, unsigned nb) 27 - { 28 - } 29 - 30 26 31 27 #define HEAD_CRC 2 32 28 #define EXTRA_FIELD 4 ··· 37 43 int r, i, flags; 38 44 39 45 /* skip header */ 40 - 41 46 i = 10; 42 47 flags = src[3]; 43 48 if (src[2] != DEFLATED || (flags & RESERVED) != 0) { ··· 58 65 exit(); 59 66 } 60 67 61 - s.zalloc = zalloc; 62 - s.zfree = zfree; 63 - r = inflateInit2(&s, -MAX_WBITS); 68 + s.workspace = zalloc(zlib_inflate_workspacesize()); 69 + r = zlib_inflateInit2(&s, -MAX_WBITS); 64 70 if (r != Z_OK) { 65 71 //puts("inflateInit2 returned "); puthex(r); puts("\n"); 66 72 exit(); ··· 68 76 s.avail_in = *lenp - i; 69 77 s.next_out = dst; 70 78 s.avail_out = dstlen; 71 - r = inflate(&s, Z_FINISH); 79 + r = zlib_inflate(&s, Z_FINISH); 72 80 if (r != Z_OK && r != Z_STREAM_END) { 73 81 //puts("inflate returned "); puthex(r); puts("\n"); 74 82 exit(); 75 83 } 76 84 *lenp = s.next_out - (unsigned char *) dst; 77 - inflateEnd(&s); 85 + zlib_inflateEnd(&s); 78 86 } 79 87
+5 -90
arch/xtensa/kernel/pci.c
··· 57 57 58 58 static int pci_bus_count; 59 59 60 - static void pcibios_fixup_resources(struct pci_dev* dev); 61 - 62 - #if 0 // FIXME 63 - struct pci_fixup pcibios_fixups[] = { 64 - { DECLARE_PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources }, 65 - { 0 } 66 - }; 67 - #endif 68 - 69 - void 70 - pcibios_update_resource(struct pci_dev *dev, struct resource *root, 71 - struct resource *res, int resource) 72 - { 73 - u32 new, check, mask; 74 - int reg; 75 - struct pci_controller* pci_ctrl = dev->sysdata; 76 - 77 - new = res->start; 78 - if (pci_ctrl && res->flags & IORESOURCE_IO) { 79 - new -= pci_ctrl->io_space.base; 80 - } 81 - new |= (res->flags & PCI_REGION_FLAG_MASK); 82 - if (resource < 6) { 83 - reg = PCI_BASE_ADDRESS_0 + 4*resource; 84 - } else if (resource == PCI_ROM_RESOURCE) { 85 - res->flags |= PCI_ROM_ADDRESS_ENABLE; 86 - reg = dev->rom_base_reg; 87 - } else { 88 - /* Somebody might have asked allocation of a non-standard resource */ 89 - return; 90 - } 91 - 92 - pci_write_config_dword(dev, reg, new); 93 - pci_read_config_dword(dev, reg, &check); 94 - mask = (new & PCI_BASE_ADDRESS_SPACE_IO) ? 95 - PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK; 96 - 97 - if ((new ^ check) & mask) { 98 - printk(KERN_ERR "PCI: Error while updating region " 99 - "%s/%d (%08x != %08x)\n", dev->slot_name, resource, 100 - new, check); 101 - } 102 - } 103 - 104 60 /* 105 61 * We need to avoid collisions with `mirrored' VGA ports 106 62 * and other strange ISA hardware, so we always want the ··· 81 125 82 126 if (size > 0x100) { 83 127 printk(KERN_ERR "PCI: I/O Region %s/%d too large" 84 - " (%ld bytes)\n", dev->slot_name, 128 + " (%ld bytes)\n", pci_name(dev), 85 129 dev->resource - res, size); 86 130 } 87 131 ··· 105 149 r = &dev->resource[idx]; 106 150 if (!r->start && r->end) { 107 151 printk (KERN_ERR "PCI: Device %s not available because " 108 - "of resource collisions\n", dev->slot_name); 152 + "of resource collisions\n", pci_name(dev)); 109 153 return -EINVAL; 110 154 } 111 155 if (r->flags & IORESOURCE_IO) ··· 117 161 cmd |= PCI_COMMAND_MEMORY; 118 162 if (cmd != old_cmd) { 119 163 printk("PCI: Enabling device %s (%04x -> %04x)\n", 120 - dev->slot_name, old_cmd, cmd); 164 + pci_name(dev), old_cmd, cmd); 121 165 pci_write_config_word(dev, PCI_COMMAND, cmd); 122 166 } 123 167 return 0; ··· 249 293 r = &dev->resource[idx]; 250 294 if (!r->start && r->end) { 251 295 printk(KERN_ERR "PCI: Device %s not available because " 252 - "of resource collisions\n", dev->slot_name); 296 + "of resource collisions\n", pci_name(dev)); 253 297 return -EINVAL; 254 298 } 255 299 if (r->flags & IORESOURCE_IO) ··· 259 303 } 260 304 if (cmd != old_cmd) { 261 305 printk("PCI: Enabling device %s (%04x -> %04x)\n", 262 - dev->slot_name, old_cmd, cmd); 306 + pci_name(dev), old_cmd, cmd); 263 307 pci_write_config_word(dev, PCI_COMMAND, cmd); 264 308 } 265 309 ··· 280 324 } 281 325 282 326 #endif /* CONFIG_PROC_FS */ 283 - 284 - 285 - static void 286 - pcibios_fixup_resources(struct pci_dev *dev) 287 - { 288 - struct pci_controller* pci_ctrl = (struct pci_controller *)dev->sysdata; 289 - int i; 290 - unsigned long offset; 291 - 292 - if (!pci_ctrl) { 293 - printk(KERN_ERR "No pci_ctrl for PCI dev %s!\n",dev->slot_name); 294 - return; 295 - } 296 - for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { 297 - struct resource *res = dev->resource + i; 298 - if (!res->start || !res->flags) 299 - continue; 300 - if (res->end == 0xffffffff) { 301 - DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n", 302 - dev->slot_name, i, res->start, res->end); 303 - res->end -= res->start; 304 - res->start = 0; 305 - continue; 306 - } 307 - offset = 0; 308 - if (res->flags & IORESOURCE_IO) 309 - offset = (unsigned long) pci_ctrl->io_space.base; 310 - else if (res->flags & IORESOURCE_MEM) 311 - offset = (unsigned long) pci_ctrl->mem_space.base; 312 - 313 - if (offset != 0) { 314 - res->start += offset; 315 - res->end += offset; 316 - #ifdef DEBUG 317 - printk("Fixup res %d (%lx) of dev %s: %lx -> %lx\n", 318 - i, res->flags, dev->slot_name, 319 - res->start - offset, res->start); 320 - #endif 321 - } 322 - } 323 - } 324 327 325 328 /* 326 329 * Platform support for /proc/bus/pci/X/Y mmap()s,
+3 -2
arch/xtensa/kernel/ptrace.c
··· 22 22 #include <linux/smp.h> 23 23 #include <linux/smp_lock.h> 24 24 #include <linux/security.h> 25 + #include <linux/signal.h> 25 26 26 27 #include <asm/pgtable.h> 27 28 #include <asm/page.h> ··· 240 239 case PTRACE_CONT: /* restart after signal. */ 241 240 { 242 241 ret = -EIO; 243 - if ((unsigned long) data > _NSIG) 242 + if (!valid_signal(data)) 244 243 break; 245 244 if (request == PTRACE_SYSCALL) 246 245 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); ··· 270 269 271 270 case PTRACE_SINGLESTEP: 272 271 ret = -EIO; 273 - if ((unsigned long) data > _NSIG) 272 + if (!valid_signal(data)) 274 273 break; 275 274 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); 276 275 child->ptrace |= PT_SINGLESTEP;
+1 -1
drivers/acpi/pci_irq.c
··· 433 433 printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: no GSI", 434 434 pci_name(dev), ('A' + pin)); 435 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 437 printk(" - using IRQ %d\n", dev->irq); 438 438 acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW); 439 439 return_VALUE(0);
+1
drivers/base/base.h
··· 5 5 extern void bus_remove_driver(struct device_driver *); 6 6 7 7 extern void driver_detach(struct device_driver * drv); 8 + extern int driver_probe_device(struct device_driver *, struct device *); 8 9 9 10 static inline struct class_device *to_class_dev(struct kobject *obj) 10 11 {
+99 -18
drivers/base/bus.c
··· 133 133 decl_subsys(bus, &ktype_bus, NULL); 134 134 135 135 136 + /* Manually detach a device from it's associated driver. */ 137 + static int driver_helper(struct device *dev, void *data) 138 + { 139 + const char *name = data; 140 + 141 + if (strcmp(name, dev->bus_id) == 0) 142 + return 1; 143 + return 0; 144 + } 145 + 146 + static ssize_t driver_unbind(struct device_driver *drv, 147 + const char *buf, size_t count) 148 + { 149 + struct bus_type *bus = get_bus(drv->bus); 150 + struct device *dev; 151 + int err = -ENODEV; 152 + 153 + dev = bus_find_device(bus, NULL, (void *)buf, driver_helper); 154 + if ((dev) && 155 + (dev->driver == drv)) { 156 + device_release_driver(dev); 157 + err = count; 158 + } 159 + return err; 160 + } 161 + static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind); 162 + 163 + /* 164 + * Manually attach a device to a driver. 165 + * Note: the driver must want to bind to the device, 166 + * it is not possible to override the driver's id table. 167 + */ 168 + static ssize_t driver_bind(struct device_driver *drv, 169 + const char *buf, size_t count) 170 + { 171 + struct bus_type *bus = get_bus(drv->bus); 172 + struct device *dev; 173 + int err = -ENODEV; 174 + 175 + dev = bus_find_device(bus, NULL, (void *)buf, driver_helper); 176 + if ((dev) && 177 + (dev->driver == NULL)) { 178 + down(&dev->sem); 179 + err = driver_probe_device(drv, dev); 180 + up(&dev->sem); 181 + put_device(dev); 182 + } 183 + return err; 184 + } 185 + static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind); 186 + 187 + 136 188 static struct device * next_device(struct klist_iter * i) 137 189 { 138 190 struct klist_node * n = klist_next(i); ··· 229 177 return error; 230 178 } 231 179 180 + /** 181 + * bus_find_device - device iterator for locating a particular device. 182 + * @bus: bus type 183 + * @start: Device to begin with 184 + * @data: Data to pass to match function 185 + * @match: Callback function to check device 186 + * 187 + * This is similar to the bus_for_each_dev() function above, but it 188 + * returns a reference to a device that is 'found' for later use, as 189 + * determined by the @match callback. 190 + * 191 + * The callback should return 0 if the device doesn't match and non-zero 192 + * if it does. If the callback returns non-zero, this function will 193 + * return to the caller and not iterate over any more devices. 194 + */ 195 + struct device * bus_find_device(struct bus_type *bus, 196 + struct device *start, void *data, 197 + int (*match)(struct device *, void *)) 198 + { 199 + struct klist_iter i; 200 + struct device *dev; 201 + 202 + if (!bus) 203 + return NULL; 204 + 205 + klist_iter_init_node(&bus->klist_devices, &i, 206 + (start ? &start->knode_bus : NULL)); 207 + while ((dev = next_device(&i))) 208 + if (match(dev, data) && get_device(dev)) 209 + break; 210 + klist_iter_exit(&i); 211 + return dev; 212 + } 232 213 233 214 234 215 static struct device_driver * next_driver(struct klist_iter * i) ··· 448 363 module_add_driver(drv->owner, drv); 449 364 450 365 driver_add_attrs(bus, drv); 366 + driver_create_file(drv, &driver_attr_unbind); 367 + driver_create_file(drv, &driver_attr_bind); 451 368 } 452 369 return error; 453 370 } ··· 467 380 void bus_remove_driver(struct device_driver * drv) 468 381 { 469 382 if (drv->bus) { 383 + driver_remove_file(drv, &driver_attr_bind); 384 + driver_remove_file(drv, &driver_attr_unbind); 470 385 driver_remove_attrs(drv->bus, drv); 471 386 klist_remove(&drv->knode_bus); 472 387 pr_debug("bus %s: remove driver %s\n", drv->bus->name, drv->name); ··· 483 394 /* Helper for bus_rescan_devices's iter */ 484 395 static int bus_rescan_devices_helper(struct device *dev, void *data) 485 396 { 486 - int *count = data; 487 - 488 - if (!dev->driver && (device_attach(dev) > 0)) 489 - (*count)++; 490 - 397 + if (!dev->driver) 398 + device_attach(dev); 491 399 return 0; 492 400 } 493 401 494 - 495 402 /** 496 - * bus_rescan_devices - rescan devices on the bus for possible drivers 497 - * @bus: the bus to scan. 403 + * bus_rescan_devices - rescan devices on the bus for possible drivers 404 + * @bus: the bus to scan. 498 405 * 499 - * This function will look for devices on the bus with no driver 500 - * attached and rescan it against existing drivers to see if it 501 - * matches any. Calls device_attach(). Returns the number of devices 502 - * that were sucessfully bound to a driver. 406 + * This function will look for devices on the bus with no driver 407 + * attached and rescan it against existing drivers to see if it matches 408 + * any by calling device_attach() for the unbound devices. 503 409 */ 504 - int bus_rescan_devices(struct bus_type * bus) 410 + void bus_rescan_devices(struct bus_type * bus) 505 411 { 506 - int count = 0; 507 - 508 - bus_for_each_dev(bus, NULL, &count, bus_rescan_devices_helper); 509 - 510 - return count; 412 + bus_for_each_dev(bus, NULL, NULL, bus_rescan_devices_helper); 511 413 } 512 414 513 415 ··· 637 557 638 558 639 559 EXPORT_SYMBOL_GPL(bus_for_each_dev); 560 + EXPORT_SYMBOL_GPL(bus_find_device); 640 561 EXPORT_SYMBOL_GPL(bus_for_each_drv); 641 562 642 563 EXPORT_SYMBOL_GPL(bus_add_device);
+1 -1
drivers/base/core.c
··· 333 333 struct device * parent = dev->parent; 334 334 335 335 if (parent) 336 - klist_remove(&dev->knode_parent); 336 + klist_del(&dev->knode_parent); 337 337 338 338 /* Notify the platform of the removal, in case they 339 339 * need to do anything...
+1 -1
drivers/base/dd.c
··· 65 65 * 66 66 * This function must be called with @dev->sem held. 67 67 */ 68 - static int driver_probe_device(struct device_driver * drv, struct device * dev) 68 + int driver_probe_device(struct device_driver * drv, struct device * dev) 69 69 { 70 70 int ret = 0; 71 71
+35
drivers/base/driver.c
··· 56 56 57 57 58 58 /** 59 + * driver_find_device - device iterator for locating a particular device. 60 + * @driver: The device's driver 61 + * @start: Device to begin with 62 + * @data: Data to pass to match function 63 + * @match: Callback function to check device 64 + * 65 + * This is similar to the driver_for_each_device() function above, but 66 + * it returns a reference to a device that is 'found' for later use, as 67 + * determined by the @match callback. 68 + * 69 + * The callback should return 0 if the device doesn't match and non-zero 70 + * if it does. If the callback returns non-zero, this function will 71 + * return to the caller and not iterate over any more devices. 72 + */ 73 + struct device * driver_find_device(struct device_driver *drv, 74 + struct device * start, void * data, 75 + int (*match)(struct device *, void *)) 76 + { 77 + struct klist_iter i; 78 + struct device *dev; 79 + 80 + if (!drv) 81 + return NULL; 82 + 83 + klist_iter_init_node(&drv->klist_devices, &i, 84 + (start ? &start->knode_driver : NULL)); 85 + while ((dev = next_device(&i))) 86 + if (match(dev, data) && get_device(dev)) 87 + break; 88 + klist_iter_exit(&i); 89 + return dev; 90 + } 91 + EXPORT_SYMBOL_GPL(driver_find_device); 92 + 93 + /** 59 94 * driver_create_file - create sysfs file for driver. 60 95 * @drv: driver. 61 96 * @attr: driver attribute descriptor.
+1 -1
drivers/char/tpm/tpm.c
··· 464 464 465 465 pci_set_drvdata(pci_dev, NULL); 466 466 misc_deregister(&chip->vendor->miscdev); 467 - kfree(&chip->vendor->miscdev.name); 467 + kfree(chip->vendor->miscdev.name); 468 468 469 469 sysfs_remove_group(&pci_dev->dev.kobj, chip->vendor->attr_group); 470 470
-1
drivers/ide/Makefile
··· 20 20 # Core IDE code - must come before legacy 21 21 ide-core-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o 22 22 ide-core-$(CONFIG_BLK_DEV_IDEDMA) += ide-dma.o 23 - ide-core-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o 24 23 ide-core-$(CONFIG_PROC_FS) += ide-proc.o 25 24 ide-core-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o 26 25
+5 -8
drivers/ide/ide-lib.c
··· 487 487 u8 err = 0; 488 488 489 489 local_irq_set(flags); 490 - printk("%s: %s: status=0x%02x", drive->name, msg, stat); 491 - printk(" { "); 490 + printk("%s: %s: status=0x%02x { ", drive->name, msg, stat); 492 491 if (stat & BUSY_STAT) 493 492 printk("Busy "); 494 493 else { ··· 499 500 if (stat & INDEX_STAT) printk("Index "); 500 501 if (stat & ERR_STAT) printk("Error "); 501 502 } 502 - printk("}"); 503 - printk("\n"); 503 + printk("}\n"); 504 504 if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) { 505 505 err = hwif->INB(IDE_ERROR_REG); 506 - printk("%s: %s: error=0x%02x", drive->name, msg, err); 507 - printk(" { "); 506 + printk("%s: %s: error=0x%02x { ", drive->name, msg, err); 508 507 if (err & ABRT_ERR) printk("DriveStatusError "); 509 508 if (err & ICRC_ERR) 510 - printk("Bad%s ", (err & ABRT_ERR) ? "CRC" : "Sector"); 509 + printk((err & ABRT_ERR) ? "BadCRC " : "BadSector "); 511 510 if (err & ECC_ERR) printk("UncorrectableError "); 512 511 if (err & ID_ERR) printk("SectorIdNotFound "); 513 512 if (err & TRK0_ERR) printk("TrackZeroNotFound "); ··· 543 546 printk(", sector=%llu", 544 547 (unsigned long long)HWGROUP(drive)->rq->sector); 545 548 } 549 + printk("\n"); 546 550 } 547 - printk("\n"); 548 551 ide_dump_opcode(drive); 549 552 local_irq_restore(flags); 550 553 return err;
+3 -1
drivers/ide/legacy/hd.c
··· 156 156 157 157 158 158 #if (HD_DELAY > 0) 159 + 160 + #include <asm/i8253.h> 161 + 159 162 unsigned long last_req; 160 163 161 164 unsigned long read_timer(void) 162 165 { 163 - extern spinlock_t i8253_lock; 164 166 unsigned long t, flags; 165 167 int i; 166 168
+5 -5
drivers/ide/pci/alim15x3.c
··· 583 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 588 unsigned long flags; 589 589 u8 tmpbyte; ··· 677 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 682 struct pci_dev *dev = hwif->pci_dev; 683 683 unsigned int ata66 = 0; ··· 748 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 753 hwif->autodma = 0; 754 754 hwif->tuneproc = &ali15x3_tune_drive; ··· 794 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 799 u8 ideic, inmir; 800 800 s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, ··· 847 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 852 if (m5229_revision < 0x20) 853 853 return;
+5 -2
drivers/ide/pci/amd74xx.c
··· 73 73 { PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, 0x50, AMD_UDMA_133 }, 74 74 { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, 0x50, AMD_UDMA_133 }, 75 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 77 { 0 } 77 78 }; 78 79 ··· 310 309 * and initialize its drive independent registers. 311 310 */ 312 311 313 - static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char *name) 312 + static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, const char *name) 314 313 { 315 314 unsigned char t; 316 315 unsigned int u; ··· 414 413 return dev->irq; 415 414 } 416 415 417 - static void __init init_hwif_amd74xx(ide_hwif_t *hwif) 416 + static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) 418 417 { 419 418 int i; 420 419 ··· 490 489 /* 13 */ DECLARE_NV_DEV("NFORCE-CK804"), 491 490 /* 14 */ DECLARE_NV_DEV("NFORCE-MCP04"), 492 491 /* 15 */ DECLARE_NV_DEV("NFORCE-MCP51"), 492 + /* 16 */ DECLARE_NV_DEV("NFORCE-MCP55"), 493 493 }; 494 494 495 495 static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id) ··· 526 524 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13 }, 527 525 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 }, 528 526 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15 }, 527 + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 }, 529 528 { 0, }, 530 529 }; 531 530 MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl);
+2 -2
drivers/ide/pci/cs5530.c
··· 217 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 222 struct pci_dev *master_0 = NULL, *cs5530_0 = NULL; 223 223 unsigned long flags; ··· 308 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 313 unsigned long basereg; 314 314 u32 d0_timings;
+4 -4
drivers/ide/pci/cy82c693.c
··· 391 391 /* 392 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 396 if (PCI_FUNC(dev->devfn) != 1) 397 397 return 0; ··· 443 443 /* 444 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 448 hwif->autodma = 0; 449 449 ··· 467 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 474 if (PCI_FUNC(hwif->pci_dev->devfn) == 1) 475 475 primary = hwif;
+2 -2
drivers/ide/pci/it8172.c
··· 216 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 221 unsigned char progif; 222 222 ··· 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 235 struct pci_dev* dev = hwif->pci_dev; 236 236 unsigned long cmdBase, ctrlBase;
+1 -1
drivers/ide/pci/ns87415.c
··· 195 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 200 struct pci_dev *dev = hwif->pci_dev; 201 201 unsigned int ctrl, using_inta;
+1 -1
drivers/ide/pci/opti621.c
··· 326 326 /* 327 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 331 hwif->autodma = 0; 332 332 hwif->drives[0].drive_data = PIO_DONT_KNOW;
+1 -1
drivers/ide/pci/sc1200.c
··· 459 459 * This gets invoked by the IDE driver once for each channel, 460 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 464 if (hwif->mate) 465 465 hwif->serialized = hwif->mate->serialized = 1;
+3 -3
drivers/ide/pci/sl82c105.c
··· 386 386 * channel 0 here at least, but channel 1 has to be enabled by 387 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 391 u32 val; 392 392 ··· 399 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 404 unsigned int rev; 405 405 u8 dma_state; ··· 431 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 436 struct pci_dev *dev = hwif->pci_dev; 437 437 u32 val;
+1 -1
drivers/ide/pci/slc90e66.c
··· 196 196 } 197 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 201 u8 reg47 = 0; 202 202 u8 mask = hwif->channel ? 0x01 : 0x02; /* bit0:Primary */
+1 -1
drivers/ide/pci/triflex.c
··· 130 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 135 hwif->tuneproc = &triflex_tune_drive; 136 136 hwif->speedproc = &triflex_tune_chipset;
+2 -2
drivers/ide/pci/via82cxxx.c
··· 415 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 420 struct pci_dev *isa = NULL; 421 421 u8 t, v; ··· 576 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 581 int i; 582 582
+2 -1
drivers/input/gameport/gameport.c
··· 60 60 61 61 #if defined(__i386__) 62 62 63 + #include <asm/i8253.h> 64 + 63 65 #define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0)) 64 66 #define GET_TIME(x) do { x = get_time_pit(); } while (0) 65 67 66 68 static unsigned int get_time_pit(void) 67 69 { 68 - extern spinlock_t i8253_lock; 69 70 unsigned long flags; 70 71 unsigned int count; 71 72
+3 -1
drivers/input/joystick/analog.c
··· 140 140 */ 141 141 142 142 #ifdef __i386__ 143 + 144 + #include <asm/i8253.h> 145 + 143 146 #define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0) 144 147 #define DELTA(x,y) (cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0))) 145 148 #define TIME_NAME (cpu_has_tsc?"TSC":"PIT") 146 149 static unsigned int get_time_pit(void) 147 150 { 148 - extern spinlock_t i8253_lock; 149 151 unsigned long flags; 150 152 unsigned int count; 151 153
+6 -3
drivers/mmc/mmci.c
··· 20 20 #include <linux/mmc/host.h> 21 21 #include <linux/mmc/protocol.h> 22 22 23 + #include <asm/div64.h> 23 24 #include <asm/io.h> 24 25 #include <asm/irq.h> 25 26 #include <asm/scatterlist.h> ··· 71 70 static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) 72 71 { 73 72 unsigned int datactrl, timeout, irqmask; 73 + unsigned long long clks; 74 74 void __iomem *base; 75 75 76 76 DBG(host, "blksz %04x blks %04x flags %08x\n", ··· 83 81 84 82 mmci_init_sg(host, data); 85 83 86 - timeout = data->timeout_clks + 87 - ((unsigned long long)data->timeout_ns * host->cclk) / 88 - 1000000000ULL; 84 + clks = (unsigned long long)data->timeout_ns * host->cclk; 85 + do_div(clks, 1000000000UL); 86 + 87 + timeout = data->timeout_clks + (unsigned int)clks; 89 88 90 89 base = host->base; 91 90 writel(timeout, base + MMCIDATATIMER);
+48 -32
drivers/mmc/wbsd.c
··· 54 54 #define DBGF(x...) do { } while (0) 55 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 58 * Device resources 81 59 */ ··· 69 91 MODULE_DEVICE_TABLE(pnp, pnp_dev_table); 70 92 71 93 #endif /* CONFIG_PNP */ 94 + 95 + static const int config_ports[] = { 0x2E, 0x4E }; 96 + static const int unlock_codes[] = { 0x83, 0x87 }; 97 + 98 + static const int valid_ids[] = { 99 + 0x7112, 100 + }; 72 101 73 102 #ifdef CONFIG_PNP 74 103 static unsigned int nopnp = 0; ··· 1036 1051 \*****************************************************************************/ 1037 1052 1038 1053 /* 1054 + * Helper function for card detection 1055 + */ 1056 + static void wbsd_detect_card(unsigned long data) 1057 + { 1058 + struct wbsd_host *host = (struct wbsd_host*)data; 1059 + 1060 + BUG_ON(host == NULL); 1061 + 1062 + DBG("Executing card detection\n"); 1063 + 1064 + mmc_detect_change(host->mmc); 1065 + } 1066 + 1067 + /* 1039 1068 * Tasklets 1040 1069 */ 1041 1070 ··· 1074 1075 { 1075 1076 struct wbsd_host* host = (struct wbsd_host*)param; 1076 1077 u8 csr; 1077 - int change = 0; 1078 1078 1079 1079 spin_lock(&host->lock); 1080 1080 ··· 1092 1094 { 1093 1095 DBG("Card inserted\n"); 1094 1096 host->flags |= WBSD_FCARD_PRESENT; 1095 - change = 1; 1097 + 1098 + /* 1099 + * Delay card detection to allow electrical connections 1100 + * to stabilise. 1101 + */ 1102 + mod_timer(&host->timer, jiffies + HZ/2); 1096 1103 } 1104 + 1105 + spin_unlock(&host->lock); 1097 1106 } 1098 1107 else if (host->flags & WBSD_FCARD_PRESENT) 1099 1108 { 1100 1109 DBG("Card removed\n"); 1101 1110 host->flags &= ~WBSD_FCARD_PRESENT; 1102 - change = 1; 1103 1111 1104 1112 if (host->mrq) 1105 1113 { ··· 1116 1112 host->mrq->cmd->error = MMC_ERR_FAILED; 1117 1113 tasklet_schedule(&host->finish_tasklet); 1118 1114 } 1119 - } 1120 - 1121 - /* 1122 - * Unlock first since we might get a call back. 1123 - */ 1124 - spin_unlock(&host->lock); 1115 + 1116 + /* 1117 + * Unlock first since we might get a call back. 1118 + */ 1119 + spin_unlock(&host->lock); 1125 1120 1126 - if (change) 1127 1121 mmc_detect_change(host->mmc); 1122 + } 1128 1123 } 1129 1124 1130 1125 static void wbsd_tasklet_fifo(unsigned long param) ··· 1328 1325 spin_lock_init(&host->lock); 1329 1326 1330 1327 /* 1328 + * Set up detection timer 1329 + */ 1330 + init_timer(&host->timer); 1331 + host->timer.data = (unsigned long)host; 1332 + host->timer.function = wbsd_detect_card; 1333 + 1334 + /* 1331 1335 * Maximum number of segments. Worst case is one sector per segment 1332 1336 * so this will be 64kB/512. 1333 1337 */ ··· 1361 1351 static void __devexit wbsd_free_mmc(struct device* dev) 1362 1352 { 1363 1353 struct mmc_host* mmc; 1354 + struct wbsd_host* host; 1364 1355 1365 1356 mmc = dev_get_drvdata(dev); 1366 1357 if (!mmc) 1367 1358 return; 1359 + 1360 + host = mmc_priv(mmc); 1361 + BUG_ON(host == NULL); 1362 + 1363 + del_timer_sync(&host->timer); 1368 1364 1369 1365 mmc_free_host(mmc); 1370 1366
+2 -7
drivers/mmc/wbsd.h
··· 8 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 11 #define LOCK_CODE 0xAA 19 12 20 13 #define WBSD_CONF_SWRST 0x02 ··· 180 187 struct tasklet_struct timeout_tasklet; 181 188 struct tasklet_struct finish_tasklet; 182 189 struct tasklet_struct block_tasklet; 190 + 191 + struct timer_list timer; /* Card detection timer */ 183 192 };
+2 -14
drivers/mtd/afs.c
··· 219 219 */ 220 220 for (idx = off = 0; off < mtd->size; off += mtd->erasesize) { 221 221 struct image_info_struct iis; 222 - u_int iis_ptr, img_ptr, size; 222 + u_int iis_ptr, img_ptr; 223 223 224 224 /* Read the footer. */ 225 225 ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask); ··· 236 236 continue; 237 237 238 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 240 parts[idx].name = str; 253 - parts[idx].size = size; 241 + parts[idx].size = (iis.length + mtd->erasesize - 1) & ~(mtd->erasesize - 1); 254 242 parts[idx].offset = img_ptr; 255 243 parts[idx].mask_flags = 0; 256 244
+1 -1
drivers/pcmcia/ds.c
··· 847 847 pcmcia_device_stringattr(prod_id3, prod_id[2]); 848 848 pcmcia_device_stringattr(prod_id4, prod_id[3]); 849 849 850 - static ssize_t modalias_show(struct device *dev, char *buf) 850 + static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) 851 851 { 852 852 struct pcmcia_device *p_dev = to_pcmcia_dev(dev); 853 853 int i;
+2 -1
drivers/serial/8250.c
··· 2061 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 2066 i++, up++) { 2066 2067 up->port.iobase = old_serial_port[i].port; 2067 2068 up->port.irq = irq_canonicalize(old_serial_port[i].irq);
-5
drivers/serial/s3c2410.c
··· 522 522 static int s3c24xx_serial_startup(struct uart_port *port) 523 523 { 524 524 struct s3c24xx_uart_port *ourport = to_ourport(port); 525 - unsigned long flags; 526 525 int ret; 527 526 528 527 dbg("s3c24xx_serial_startup: port=%p (%08lx,%p)\n", 529 528 port->mapbase, port->membase); 530 - 531 - local_irq_save(flags); 532 529 533 530 rx_enabled(port) = 1; 534 531 ··· 560 563 /* the port reset code should have done the correct 561 564 * register setup for the port controls */ 562 565 563 - local_irq_restore(flags); 564 566 return ret; 565 567 566 568 err: 567 569 s3c24xx_serial_shutdown(port); 568 - local_irq_restore(flags); 569 570 return ret; 570 571 } 571 572
+13 -1
drivers/serial/serial_core.c
··· 1808 1808 struct termios termios; 1809 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 1817 memset(&termios, 0, sizeof(struct termios)); 1812 1818 1813 1819 termios.c_cflag = CREAD | HUPCL | CLOCAL; ··· 2202 2196 2203 2197 state->port = port; 2204 2198 2205 - spin_lock_init(&port->lock); 2206 2199 port->cons = drv->cons; 2207 2200 port->info = state->info; 2201 + 2202 + /* 2203 + * If this port is a console, then the spinlock is already 2204 + * initialised. 2205 + */ 2206 + if (!uart_console(port)) 2207 + spin_lock_init(&port->lock); 2208 2208 2209 2209 uart_configure_port(drv, state, port); 2210 2210
+1 -7
drivers/video/console/fbcon.c
··· 142 142 #define CURSOR_DRAW_DELAY (1) 143 143 144 144 /* # VBL ints between cursor state changes */ 145 - #define ARM_CURSOR_BLINK_RATE (10) 146 145 #define ATARI_CURSOR_BLINK_RATE (42) 147 146 #define MAC_CURSOR_BLINK_RATE (32) 148 147 #define DEFAULT_CURSOR_BLINK_RATE (20) ··· 287 288 release_console_sem(); 288 289 } 289 290 290 - #if (defined(__arm__) && defined(IRQ_VSYNCPULSE)) || defined(CONFIG_ATARI) || defined(CONFIG_MAC) 291 + #if defined(CONFIG_ATARI) || defined(CONFIG_MAC) 291 292 static int cursor_blink_rate; 292 293 static irqreturn_t fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp) 293 294 { ··· 877 878 } 878 879 #endif /* CONFIG_MAC */ 879 880 880 - #if defined(__arm__) && defined(IRQ_VSYNCPULSE) 881 - cursor_blink_rate = ARM_CURSOR_BLINK_RATE; 882 - irqres = request_irq(IRQ_VSYNCPULSE, fb_vbl_handler, SA_SHIRQ, 883 - "framebuffer vbl", info); 884 - #endif 885 881 /* Initialize the work queue. If the driver provides its 886 882 * own work queue this means it will use something besides 887 883 * default timer to flash the cursor. */
+1 -1
fs/fat/cache.c
··· 56 56 return 0; 57 57 } 58 58 59 - void __exit fat_cache_destroy(void) 59 + void fat_cache_destroy(void) 60 60 { 61 61 if (kmem_cache_destroy(fat_cache_cachep)) 62 62 printk(KERN_INFO "fat_cache: not all structures were freed\n");
+15 -6
fs/fat/inode.c
··· 1327 1327 EXPORT_SYMBOL(fat_fill_super); 1328 1328 1329 1329 int __init fat_cache_init(void); 1330 - void __exit fat_cache_destroy(void); 1330 + void fat_cache_destroy(void); 1331 1331 1332 1332 static int __init init_fat_fs(void) 1333 1333 { 1334 - int ret; 1334 + int err; 1335 1335 1336 - ret = fat_cache_init(); 1337 - if (ret < 0) 1338 - return ret; 1339 - return fat_init_inodecache(); 1336 + err = fat_cache_init(); 1337 + if (err) 1338 + return err; 1339 + 1340 + err = fat_init_inodecache(); 1341 + if (err) 1342 + goto failed; 1343 + 1344 + return 0; 1345 + 1346 + failed: 1347 + fat_cache_destroy(); 1348 + return err; 1340 1349 } 1341 1350 1342 1351 static void __exit exit_fat_fs(void)
-1
fs/freevxfs/vxfs.h
··· 37 37 * superblocks of the Veritas Filesystem. 38 38 */ 39 39 #include <linux/types.h> 40 - #include "vxfs_kcompat.h" 41 40 42 41 43 42 /*
+1 -1
fs/freevxfs/vxfs_bmap.c
··· 101 101 return 0; 102 102 103 103 fail_size: 104 - printk("vxfs: indirect extent to big!\n"); 104 + printk("vxfs: indirect extent too big!\n"); 105 105 fail_buf: 106 106 return 0; 107 107 }
+6 -5
fs/freevxfs/vxfs_fshead.c
··· 78 78 struct buffer_head *bp; 79 79 80 80 bp = vxfs_bread(ip, which); 81 - if (buffer_mapped(bp)) { 81 + if (bp) { 82 82 struct vxfs_fsh *fhp; 83 83 84 - if (!(fhp = kmalloc(sizeof(*fhp), SLAB_KERNEL))) 85 - return NULL; 84 + if (!(fhp = kmalloc(sizeof(*fhp), GFP_KERNEL))) 85 + goto out; 86 86 memcpy(fhp, bp->b_data, sizeof(*fhp)); 87 87 88 - brelse(bp); 88 + put_bh(bp); 89 89 return (fhp); 90 90 } 91 - 91 + out: 92 + brelse(bp); 92 93 return NULL; 93 94 } 94 95
-49
fs/freevxfs/vxfs_kcompat.h
··· 1 - #ifndef _VXFS_KCOMPAT_H 2 - #define _VXFS_KCOMPAT_H 3 - 4 - #include <linux/version.h> 5 - 6 - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) 7 - 8 - #include <linux/blkdev.h> 9 - 10 - typedef long sector_t; 11 - 12 - /* From include/linux/fs.h (Linux 2.5.2-pre3) */ 13 - static inline struct buffer_head * sb_bread(struct super_block *sb, int block) 14 - { 15 - return bread(sb->s_dev, block, sb->s_blocksize); 16 - } 17 - 18 - /* Dito. */ 19 - static inline void map_bh(struct buffer_head *bh, struct super_block *sb, int block) 20 - { 21 - bh->b_state |= 1 << BH_Mapped; 22 - bh->b_dev = sb->s_dev; 23 - bh->b_blocknr = block; 24 - } 25 - 26 - /* From fs/block_dev.c (Linux 2.5.2-pre2) */ 27 - static inline int sb_set_blocksize(struct super_block *sb, int size) 28 - { 29 - int bits; 30 - if (set_blocksize(sb->s_dev, size) < 0) 31 - return 0; 32 - sb->s_blocksize = size; 33 - for (bits = 9, size >>= 9; size >>= 1; bits++) 34 - ; 35 - sb->s_blocksize_bits = bits; 36 - return sb->s_blocksize; 37 - } 38 - 39 - /* Dito. */ 40 - static inline int sb_min_blocksize(struct super_block *sb, int size) 41 - { 42 - int minsize = get_hardsect_size(sb->s_dev); 43 - if (size < minsize) 44 - size = minsize; 45 - return sb_set_blocksize(sb, size); 46 - } 47 - 48 - #endif /* Kernel 2.4 */ 49 - #endif /* _VXFS_KCOMPAT_H */
+4 -4
fs/freevxfs/vxfs_lookup.c
··· 61 61 }; 62 62 63 63 64 - static __inline__ u_long 64 + static inline u_long 65 65 dir_pages(struct inode *inode) 66 66 { 67 67 return (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; 68 68 } 69 69 70 - static __inline__ u_long 70 + static inline u_long 71 71 dir_blocks(struct inode *ip) 72 72 { 73 73 u_long bsize = ip->i_sb->s_blocksize; ··· 79 79 * 80 80 * len <= VXFS_NAMELEN and de != NULL are guaranteed by caller. 81 81 */ 82 - static __inline__ int 82 + static inline int 83 83 vxfs_match(int len, const char * const name, struct vxfs_direct *de) 84 84 { 85 85 if (len != de->d_namelen) ··· 89 89 return !memcmp(name, de->d_name, len); 90 90 } 91 91 92 - static __inline__ struct vxfs_direct * 92 + static inline struct vxfs_direct * 93 93 vxfs_next_entry(struct vxfs_direct *de) 94 94 { 95 95 return ((struct vxfs_direct *)((char*)de + de->d_reclen));
+5 -5
fs/freevxfs/vxfs_olt.c
··· 38 38 #include "vxfs_olt.h" 39 39 40 40 41 - static __inline__ void 41 + static inline void 42 42 vxfs_get_fshead(struct vxfs_oltfshead *fshp, struct vxfs_sb_info *infp) 43 43 { 44 44 if (infp->vsi_fshino) ··· 46 46 infp->vsi_fshino = fshp->olt_fsino[0]; 47 47 } 48 48 49 - static __inline__ void 49 + static inline void 50 50 vxfs_get_ilist(struct vxfs_oltilist *ilistp, struct vxfs_sb_info *infp) 51 51 { 52 52 if (infp->vsi_iext) ··· 54 54 infp->vsi_iext = ilistp->olt_iext[0]; 55 55 } 56 56 57 - static __inline__ u_long 57 + static inline u_long 58 58 vxfs_oblock(struct super_block *sbp, daddr_t block, u_long bsize) 59 59 { 60 60 if (sbp->s_blocksize % bsize) ··· 104 104 goto fail; 105 105 } 106 106 107 - oaddr = (char *)bp->b_data + op->olt_size; 108 - eaddr = (char *)bp->b_data + (infp->vsi_oltsize * sbp->s_blocksize); 107 + oaddr = bp->b_data + op->olt_size; 108 + eaddr = bp->b_data + (infp->vsi_oltsize * sbp->s_blocksize); 109 109 110 110 while (oaddr < eaddr) { 111 111 struct vxfs_oltcommon *ocp =
-1
fs/freevxfs/vxfs_subr.c
··· 36 36 #include <linux/slab.h> 37 37 #include <linux/pagemap.h> 38 38 39 - #include "vxfs_kcompat.h" 40 39 #include "vxfs_extern.h" 41 40 42 41
+3 -4
fs/freevxfs/vxfs_super.c
··· 155 155 156 156 sbp->s_flags |= MS_RDONLY; 157 157 158 - infp = kmalloc(sizeof(*infp), GFP_KERNEL); 158 + infp = kcalloc(1, sizeof(*infp), GFP_KERNEL); 159 159 if (!infp) { 160 160 printk(KERN_WARNING "vxfs: unable to allocate incore superblock\n"); 161 161 return -ENOMEM; 162 162 } 163 - memset(infp, 0, sizeof(*infp)); 164 163 165 164 bsize = sb_min_blocksize(sbp, BLOCK_SIZE); 166 165 if (!bsize) { ··· 195 196 #endif 196 197 197 198 sbp->s_magic = rsbp->vs_magic; 198 - sbp->s_fs_info = (void *)infp; 199 + sbp->s_fs_info = infp; 199 200 200 201 infp->vsi_raw = rsbp; 201 202 infp->vsi_bp = bp; ··· 262 263 sizeof(struct vxfs_inode_info), 0, 263 264 SLAB_RECLAIM_ACCOUNT, NULL, NULL); 264 265 if (vxfs_inode_cachep) 265 - return (register_filesystem(&vxfs_fs_type)); 266 + return register_filesystem(&vxfs_fs_type); 266 267 return -ENOMEM; 267 268 } 268 269
+1 -2
fs/reiserfs/super.c
··· 1053 1053 1054 1054 static void handle_attrs( struct super_block *s ) 1055 1055 { 1056 - struct reiserfs_super_block * rs; 1056 + struct reiserfs_super_block * rs = SB_DISK_SUPER_BLOCK (s); 1057 1057 1058 1058 if( reiserfs_attrs( s ) ) { 1059 - rs = SB_DISK_SUPER_BLOCK (s); 1060 1059 if( old_format_only(s) ) { 1061 1060 reiserfs_warning(s, "reiserfs: cannot support attributes on 3.5.x disk format" ); 1062 1061 REISERFS_SB(s) -> s_mount_opt &= ~ ( 1 << REISERFS_ATTRS );
-4
fs/udf/namei.c
··· 164 164 uint32_t extoffset, elen, offset; 165 165 struct buffer_head *bh = NULL; 166 166 167 - if (!dir) 168 - return NULL; 169 - 170 167 size = (udf_ext0_offset(dir) + dir->i_size) >> 2; 171 - 172 168 f_pos = (udf_ext0_offset(dir) >> 2); 173 169 174 170 fibh->soffset = fibh->eoffset = (f_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2;
+2
include/asm-arm/arch-pxa/pxa-regs.h
··· 1505 1505 #define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */ 1506 1506 #define PSSR_RDH (1 << 5) /* Read Disable Hold */ 1507 1507 #define PSSR_PH (1 << 4) /* Peripheral Control Hold */ 1508 + #define PSSR_STS (1 << 3) /* Standby Mode Status */ 1508 1509 #define PSSR_VFS (1 << 2) /* VDD Fault Status */ 1509 1510 #define PSSR_BFS (1 << 1) /* Battery Fault Status */ 1510 1511 #define PSSR_SSS (1 << 0) /* Software Sleep Status */ ··· 1966 1965 #define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */ 1967 1966 #define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */ 1968 1967 1968 + #define MDREFR_K0DB4 (1 << 29) /* SDCLK0 Divide by 4 Control/Status */ 1969 1969 #define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */ 1970 1970 #define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */ 1971 1971 #define MDREFR_K0FREE (1 << 23) /* SDRAM Free-Running Control */
-32
include/asm-arm/mach/arch.h
··· 54 54 .nr = MACH_TYPE_##_type, \ 55 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 57 #define MACHINE_END \ 90 58 }; 91 59
+3 -1
include/asm-arm/system.h
··· 85 85 void die(const char *msg, struct pt_regs *regs, int err) 86 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 92 void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, 91 93 struct pt_regs *),
+6
include/asm-i386/i8253.h
··· 1 + #ifndef __ASM_I8253_H__ 2 + #define __ASM_I8253_H__ 3 + 4 + extern spinlock_t i8253_lock; 5 + 6 + #endif /* __ASM_I8253_H__ */
+1
include/asm-i386/mach-default/do_timer.h
··· 1 1 /* defines for inline arch setup functions */ 2 2 3 3 #include <asm/apic.h> 4 + #include <asm/i8259.h> 4 5 5 6 /** 6 7 * do_timer_interrupt_hook - hook into timer tick
+6 -9
include/asm-ppc64/iSeries/ItLpQueue.h
··· 41 41 #define LpEventMaxSize 256 42 42 #define LpEventAlign 64 43 43 44 - struct ItLpQueue { 44 + struct hvlpevent_queue { 45 45 /* 46 46 * The xSlicCurEventPtr is the pointer to the next event stack entry 47 47 * that will become valid. The OS must peek at this entry to determine ··· 69 69 char *xSlicEventStackPtr; // 0x20 70 70 u8 xIndex; // 0x28 unique sequential index. 71 71 u8 xSlicRsvd[3]; // 0x29-2b 72 - u32 xInUseWord; // 0x2C 73 - u64 xLpIntCount; // 0x30 Total Lp Int msgs processed 74 - u64 xLpIntCountByType[9]; // 0x38-0x7F Event counts by type 72 + spinlock_t lock; 75 73 }; 76 74 77 - extern struct ItLpQueue xItLpQueue; 75 + extern struct hvlpevent_queue hvlpevent_queue; 78 76 79 - extern struct HvLpEvent *ItLpQueue_getNextLpEvent(struct ItLpQueue *); 80 - extern int ItLpQueue_isLpIntPending(struct ItLpQueue *); 81 - extern unsigned ItLpQueue_process(struct ItLpQueue *, struct pt_regs *); 82 - extern void ItLpQueue_clearValid(struct HvLpEvent *); 77 + extern int hvlpevent_is_pending(void); 78 + extern void process_hvlpevents(struct pt_regs *); 79 + extern void setup_hvlpevent_queue(void); 83 80 84 81 #endif /* _ITLPQUEUE_H */
-3
include/asm-ppc64/paca.h
··· 20 20 #include <asm/types.h> 21 21 #include <asm/lppaca.h> 22 22 #include <asm/iSeries/ItLpRegSave.h> 23 - #include <asm/iSeries/ItLpQueue.h> 24 23 #include <asm/mmu.h> 25 24 26 25 register struct paca_struct *local_paca asm("r13"); ··· 61 62 u16 paca_index; /* Logical processor number */ 62 63 63 64 u32 default_decr; /* Default decrementer value */ 64 - struct ItLpQueue *lpqueue_ptr; /* LpQueue handled by this CPU */ 65 65 u64 kernel_toc; /* Kernel TOC address */ 66 66 u64 stab_real; /* Absolute address of segment table */ 67 67 u64 stab_addr; /* Virtual address of segment table */ ··· 89 91 u64 next_jiffy_update_tb; /* TB value for next jiffy update */ 90 92 u64 saved_r1; /* r1 save for RTAS calls */ 91 93 u64 saved_msr; /* MSR saved here by enter_rtas */ 92 - u32 lpevent_count; /* lpevents processed */ 93 94 u8 proc_enabled; /* irq soft-enable flag */ 94 95 95 96 /* not yet used */
+1 -3
include/asm-s390/system.h
··· 107 107 #ifdef CONFIG_VIRT_CPU_ACCOUNTING 108 108 extern void account_user_vtime(struct task_struct *); 109 109 extern void account_system_vtime(struct task_struct *); 110 - #else 111 - #define account_system_vtime(prev) do { } while (0) 112 110 #endif 113 111 114 - #define finish_arch_switch(rq, prev) do { \ 112 + #define finish_arch_switch(prev) do { \ 115 113 set_fs(current->thread.mm_segment); \ 116 114 account_system_vtime(prev); \ 117 115 } while (0)
+2
include/asm-x86_64/io_apic.h
··· 217 217 218 218 void enable_NMI_through_LVT0 (void * dummy); 219 219 220 + extern spinlock_t i8259A_lock; 221 + 220 222 #endif
+1 -1
include/asm-xtensa/delay.h
··· 21 21 extern __inline__ void __delay(unsigned long loops) 22 22 { 23 23 /* 2 cycles per loop. */ 24 - __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 1, 1b" 24 + __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b" 25 25 : "=r" (loops) : "0" (loops)); 26 26 } 27 27
+1 -127
include/asm-xtensa/errno.h
··· 11 11 #ifndef _XTENSA_ERRNO_H 12 12 #define _XTENSA_ERRNO_H 13 13 14 - #define EPERM 1 /* Operation not permitted */ 15 - #define ENOENT 2 /* No such file or directory */ 16 - #define ESRCH 3 /* No such process */ 17 - #define EINTR 4 /* Interrupted system call */ 18 - #define EIO 5 /* I/O error */ 19 - #define ENXIO 6 /* No such device or address */ 20 - #define E2BIG 7 /* Arg list too long */ 21 - #define ENOEXEC 8 /* Exec format error */ 22 - #define EBADF 9 /* Bad file number */ 23 - #define ECHILD 10 /* No child processes */ 24 - #define EAGAIN 11 /* Try again */ 25 - #define ENOMEM 12 /* Out of memory */ 26 - #define EACCES 13 /* Permission denied */ 27 - #define EFAULT 14 /* Bad address */ 28 - #define ENOTBLK 15 /* Block device required */ 29 - #define EBUSY 16 /* Device or resource busy */ 30 - #define EEXIST 17 /* File exists */ 31 - #define EXDEV 18 /* Cross-device link */ 32 - #define ENODEV 19 /* No such device */ 33 - #define ENOTDIR 20 /* Not a directory */ 34 - #define EISDIR 21 /* Is a directory */ 35 - #define EINVAL 22 /* Invalid argument */ 36 - #define ENFILE 23 /* File table overflow */ 37 - #define EMFILE 24 /* Too many open files */ 38 - #define ENOTTY 25 /* Not a typewriter */ 39 - #define ETXTBSY 26 /* Text file busy */ 40 - #define EFBIG 27 /* File too large */ 41 - #define ENOSPC 28 /* No space left on device */ 42 - #define ESPIPE 29 /* Illegal seek */ 43 - #define EROFS 30 /* Read-only file system */ 44 - #define EMLINK 31 /* Too many links */ 45 - #define EPIPE 32 /* Broken pipe */ 46 - #define EDOM 33 /* Math argument out of domain of func */ 47 - #define ERANGE 34 /* Math result not representable */ 48 - #define EDEADLK 35 /* Resource deadlock would occur */ 49 - #define ENAMETOOLONG 36 /* File name too long */ 50 - #define ENOLCK 37 /* No record locks available */ 51 - #define ENOSYS 38 /* Function not implemented */ 52 - #define ENOTEMPTY 39 /* Directory not empty */ 53 - #define ELOOP 40 /* Too many symbolic links encountered */ 54 - #define EWOULDBLOCK EAGAIN /* Operation would block */ 55 - #define ENOMSG 42 /* No message of desired type */ 56 - #define EIDRM 43 /* Identifier removed */ 57 - #define ECHRNG 44 /* Channel number out of range */ 58 - #define EL2NSYNC 45 /* Level 2 not synchronized */ 59 - #define EL3HLT 46 /* Level 3 halted */ 60 - #define EL3RST 47 /* Level 3 reset */ 61 - #define ELNRNG 48 /* Link number out of range */ 62 - #define EUNATCH 49 /* Protocol driver not attached */ 63 - #define ENOCSI 50 /* No CSI structure available */ 64 - #define EL2HLT 51 /* Level 2 halted */ 65 - #define EBADE 52 /* Invalid exchange */ 66 - #define EBADR 53 /* Invalid request descriptor */ 67 - #define EXFULL 54 /* Exchange full */ 68 - #define ENOANO 55 /* No anode */ 69 - #define EBADRQC 56 /* Invalid request code */ 70 - #define EBADSLT 57 /* Invalid slot */ 71 - 72 - #define EDEADLOCK EDEADLK 73 - 74 - #define EBFONT 59 /* Bad font file format */ 75 - #define ENOSTR 60 /* Device not a stream */ 76 - #define ENODATA 61 /* No data available */ 77 - #define ETIME 62 /* Timer expired */ 78 - #define ENOSR 63 /* Out of streams resources */ 79 - #define ENONET 64 /* Machine is not on the network */ 80 - #define ENOPKG 65 /* Package not installed */ 81 - #define EREMOTE 66 /* Object is remote */ 82 - #define ENOLINK 67 /* Link has been severed */ 83 - #define EADV 68 /* Advertise error */ 84 - #define ESRMNT 69 /* Srmount error */ 85 - #define ECOMM 70 /* Communication error on send */ 86 - #define EPROTO 71 /* Protocol error */ 87 - #define EMULTIHOP 72 /* Multihop attempted */ 88 - #define EDOTDOT 73 /* RFS specific error */ 89 - #define EBADMSG 74 /* Not a data message */ 90 - #define EOVERFLOW 75 /* Value too large for defined data type */ 91 - #define ENOTUNIQ 76 /* Name not unique on network */ 92 - #define EBADFD 77 /* File descriptor in bad state */ 93 - #define EREMCHG 78 /* Remote address changed */ 94 - #define ELIBACC 79 /* Can not access a needed shared library */ 95 - #define ELIBBAD 80 /* Accessing a corrupted shared library */ 96 - #define ELIBSCN 81 /* .lib section in a.out corrupted */ 97 - #define ELIBMAX 82 /* Attempting to link in too many shared libraries */ 98 - #define ELIBEXEC 83 /* Cannot exec a shared library directly */ 99 - #define EILSEQ 84 /* Illegal byte sequence */ 100 - #define ERESTART 85 /* Interrupted system call should be restarted */ 101 - #define ESTRPIPE 86 /* Streams pipe error */ 102 - #define EUSERS 87 /* Too many users */ 103 - #define ENOTSOCK 88 /* Socket operation on non-socket */ 104 - #define EDESTADDRREQ 89 /* Destination address required */ 105 - #define EMSGSIZE 90 /* Message too long */ 106 - #define EPROTOTYPE 91 /* Protocol wrong type for socket */ 107 - #define ENOPROTOOPT 92 /* Protocol not available */ 108 - #define EPROTONOSUPPORT 93 /* Protocol not supported */ 109 - #define ESOCKTNOSUPPORT 94 /* Socket type not supported */ 110 - #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ 111 - #define EPFNOSUPPORT 96 /* Protocol family not supported */ 112 - #define EAFNOSUPPORT 97 /* Address family not supported by protocol */ 113 - #define EADDRINUSE 98 /* Address already in use */ 114 - #define EADDRNOTAVAIL 99 /* Cannot assign requested address */ 115 - #define ENETDOWN 100 /* Network is down */ 116 - #define ENETUNREACH 101 /* Network is unreachable */ 117 - #define ENETRESET 102 /* Network dropped connection because of reset */ 118 - #define ECONNABORTED 103 /* Software caused connection abort */ 119 - #define ECONNRESET 104 /* Connection reset by peer */ 120 - #define ENOBUFS 105 /* No buffer space available */ 121 - #define EISCONN 106 /* Transport endpoint is already connected */ 122 - #define ENOTCONN 107 /* Transport endpoint is not connected */ 123 - #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ 124 - #define ETOOMANYREFS 109 /* Too many references: cannot splice */ 125 - #define ETIMEDOUT 110 /* Connection timed out */ 126 - #define ECONNREFUSED 111 /* Connection refused */ 127 - #define EHOSTDOWN 112 /* Host is down */ 128 - #define EHOSTUNREACH 113 /* No route to host */ 129 - #define EALREADY 114 /* Operation already in progress */ 130 - #define EINPROGRESS 115 /* Operation now in progress */ 131 - #define ESTALE 116 /* Stale NFS file handle */ 132 - #define EUCLEAN 117 /* Structure needs cleaning */ 133 - #define ENOTNAM 118 /* Not a XENIX named type file */ 134 - #define ENAVAIL 119 /* No XENIX semaphores available */ 135 - #define EISNAM 120 /* Is a named type file */ 136 - #define EREMOTEIO 121 /* Remote I/O error */ 137 - #define EDQUOT 122 /* Quota exceeded */ 138 - 139 - #define ENOMEDIUM 123 /* No medium found */ 140 - #define EMEDIUMTYPE 124 /* Wrong medium type */ 14 + #include <asm-generic/errno.h> 141 15 142 16 #endif /* _XTENSA_ERRNO_H */
+1 -19
include/asm-xtensa/ipc.h
··· 11 11 #ifndef _XTENSA_IPC_H 12 12 #define _XTENSA_IPC_H 13 13 14 - struct ipc_kludge { 15 - struct msgbuf __user *msgp; 16 - long msgtyp; 17 - }; 18 - 19 - #define SEMOP 1 20 - #define SEMGET 2 21 - #define SEMCTL 3 22 - #define SEMTIMEDOP 4 23 - #define MSGSND 11 24 - #define MSGRCV 12 25 - #define MSGGET 13 26 - #define MSGCTL 14 27 - #define SHMAT 21 28 - #define SHMDT 22 29 - #define SHMGET 23 30 - #define SHMCTL 24 31 - 32 - #define IPCCALL(version,op) ((version)<<16 | (op)) 14 + #include <asm-generic/ipc.h> 33 15 34 16 #endif /* _XTENSA_IPC_H */
+6 -1
include/linux/device.h
··· 69 69 extern int bus_register(struct bus_type * bus); 70 70 extern void bus_unregister(struct bus_type * bus); 71 71 72 - extern int bus_rescan_devices(struct bus_type * bus); 72 + extern void bus_rescan_devices(struct bus_type * bus); 73 73 74 74 extern struct bus_type * get_bus(struct bus_type * bus); 75 75 extern void put_bus(struct bus_type * bus); ··· 80 80 81 81 int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, 82 82 int (*fn)(struct device *, void *)); 83 + struct device * bus_find_device(struct bus_type *bus, struct device *start, 84 + void *data, int (*match)(struct device *, void *)); 83 85 84 86 int bus_for_each_drv(struct bus_type * bus, struct device_driver * start, 85 87 void * data, int (*fn)(struct device_driver *, void *)); ··· 144 142 145 143 extern int driver_for_each_device(struct device_driver * drv, struct device * start, 146 144 void * data, int (*fn)(struct device *, void *)); 145 + struct device * driver_find_device(struct device_driver *drv, 146 + struct device *start, void *data, 147 + int (*match)(struct device *, void *)); 147 148 148 149 149 150 /*
+1
include/linux/pci_ids.h
··· 1238 1238 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 1239 1239 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 1240 1240 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 1241 + #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E 1241 1242 #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 1242 1243 #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 1243 1244 #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B
+4 -1
init/do_mounts_initrd.c
··· 86 86 printk("okay\n"); 87 87 else { 88 88 int fd = sys_open("/dev/root.old", O_RDWR, 0); 89 - printk("failed\n"); 89 + if (error == -ENOENT) 90 + printk("/initrd does not exist. Ignored.\n"); 91 + else 92 + printk("failed\n"); 90 93 printk(KERN_NOTICE "Unmounting old root\n"); 91 94 sys_umount("/old", MNT_DETACH); 92 95 printk(KERN_NOTICE "Trying to free ramdisk memory ... ");
+2 -1
security/selinux/hooks.c
··· 68 68 #include <linux/personality.h> 69 69 #include <linux/sysctl.h> 70 70 #include <linux/audit.h> 71 + #include <linux/string.h> 71 72 72 73 #include "avc.h" 73 74 #include "objsec.h" ··· 1944 1943 } 1945 1944 } while (*in_end++); 1946 1945 1947 - copy_page(in_save, nosec_save); 1946 + strcpy(in_save, nosec_save); 1948 1947 free_page((unsigned long)nosec_save); 1949 1948 out: 1950 1949 return rc;