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

Merge branch 'master'

+351 -340
+1 -1
arch/arm/kernel/sys_arm.c
··· 305 305 "Ir" (THREAD_START_SP - sizeof(regs)), 306 306 "r" (&regs), 307 307 "Ir" (sizeof(regs)) 308 - : "r0", "r1", "r2", "r3", "ip", "memory"); 308 + : "r0", "r1", "r2", "r3", "ip", "lr", "memory"); 309 309 310 310 out: 311 311 return ret;
+1 -1
arch/arm/kernel/traps.c
··· 504 504 505 505 bad_access: 506 506 spin_unlock(&mm->page_table_lock); 507 - /* simulate a read access fault */ 507 + /* simulate a write access fault */ 508 508 do_DataAbort(addr, 15 + (1 << 11), regs); 509 509 return -1; 510 510 }
+12 -11
arch/arm/mach-imx/generic.c
··· 28 28 #include <linux/module.h> 29 29 #include <asm/arch/imxfb.h> 30 30 #include <asm/hardware.h> 31 + #include <asm/arch/imx-regs.h> 31 32 32 33 #include <asm/mach/map.h> 33 34 34 35 void imx_gpio_mode(int gpio_mode) 35 36 { 36 37 unsigned int pin = gpio_mode & GPIO_PIN_MASK; 37 - unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> 5; 38 - unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> 10; 38 + unsigned int port = (gpio_mode & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT; 39 + unsigned int ocr = (gpio_mode & GPIO_OCR_MASK) >> GPIO_OCR_SHIFT; 39 40 unsigned int tmp; 40 41 41 42 /* Pullup enable */ ··· 58 57 GPR(port) &= ~(1<<pin); 59 58 60 59 /* use as gpio? */ 61 - if( ocr == 3 ) 60 + if(gpio_mode & GPIO_GIUS) 62 61 GIUS(port) |= (1<<pin); 63 62 else 64 63 GIUS(port) &= ~(1<<pin); ··· 73 72 tmp |= (ocr << (pin*2)); 74 73 OCR1(port) = tmp; 75 74 76 - if( gpio_mode & GPIO_AOUT ) 77 - ICONFA1(port) &= ~( 3<<(pin*2)); 78 - if( gpio_mode & GPIO_BOUT ) 79 - ICONFB1(port) &= ~( 3<<(pin*2)); 75 + ICONFA1(port) &= ~( 3<<(pin*2)); 76 + ICONFA1(port) |= ((gpio_mode >> GPIO_AOUT_SHIFT) & 3) << (pin * 2); 77 + ICONFB1(port) &= ~( 3<<(pin*2)); 78 + ICONFB1(port) |= ((gpio_mode >> GPIO_BOUT_SHIFT) & 3) << (pin * 2); 80 79 } else { 81 80 tmp = OCR2(port); 82 81 tmp &= ~( 3<<((pin-16)*2)); 83 82 tmp |= (ocr << ((pin-16)*2)); 84 83 OCR2(port) = tmp; 85 84 86 - if( gpio_mode & GPIO_AOUT ) 87 - ICONFA2(port) &= ~( 3<<((pin-16)*2)); 88 - if( gpio_mode & GPIO_BOUT ) 89 - ICONFB2(port) &= ~( 3<<((pin-16)*2)); 85 + ICONFA2(port) &= ~( 3<<((pin-16)*2)); 86 + ICONFA2(port) |= ((gpio_mode >> GPIO_AOUT_SHIFT) & 3) << ((pin-16) * 2); 87 + ICONFB2(port) &= ~( 3<<((pin-16)*2)); 88 + ICONFB2(port) |= ((gpio_mode >> GPIO_BOUT_SHIFT) & 3) << ((pin-16) * 2); 90 89 } 91 90 } 92 91
+1 -1
arch/arm/mach-imx/mx1ads.c
··· 55 55 mx1ads_init(void) 56 56 { 57 57 #ifdef CONFIG_LEDS 58 - imx_gpio_mode(GPIO_PORTA | GPIO_OUT | GPIO_GPIO | 2); 58 + imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2); 59 59 #endif 60 60 platform_add_devices(devices, ARRAY_SIZE(devices)); 61 61 }
+1 -1
arch/sparc/kernel/time.c
··· 457 457 sbus_time_init(); 458 458 } 459 459 460 - extern __inline__ unsigned long do_gettimeoffset(void) 460 + static inline unsigned long do_gettimeoffset(void) 461 461 { 462 462 return (*master_l10_counter >> 10) & 0x1fffff; 463 463 }
+1 -1
arch/sparc/mm/srmmu.c
··· 260 260 { return __pte((pte_val(pte) & SRMMU_CHG_MASK) | pgprot_val(newprot)); } 261 261 262 262 /* to find an entry in a top-level page table... */ 263 - extern inline pgd_t *srmmu_pgd_offset(struct mm_struct * mm, unsigned long address) 263 + static inline pgd_t *srmmu_pgd_offset(struct mm_struct * mm, unsigned long address) 264 264 { return mm->pgd + (address >> SRMMU_PGDIR_SHIFT); } 265 265 266 266 /* Find an entry in the second-level page table.. */
+1 -11
arch/um/include/registers.h
··· 15 15 extern void restore_registers(int pid, union uml_pt_regs *regs); 16 16 extern void init_registers(int pid); 17 17 extern void get_safe_registers(unsigned long * regs); 18 + extern void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer); 18 19 19 20 #endif 20 - 21 - /* 22 - * Overrides for Emacs so that we follow Linus's tabbing style. 23 - * Emacs will notice this stuff at the end of the file and automatically 24 - * adjust the settings for this buffer only. This must remain at the end 25 - * of the file. 26 - * --------------------------------------------------------------------------- 27 - * Local variables: 28 - * c-file-style: "linux" 29 - * End: 30 - */
-4
arch/um/include/sysdep-x86_64/ptrace.h
··· 218 218 case RBP: UPT_RBP(regs) = __upt_val; break; \ 219 219 case ORIG_RAX: UPT_ORIG_RAX(regs) = __upt_val; break; \ 220 220 case CS: UPT_CS(regs) = __upt_val; break; \ 221 - case DS: UPT_DS(regs) = __upt_val; break; \ 222 - case ES: UPT_ES(regs) = __upt_val; break; \ 223 - case FS: UPT_FS(regs) = __upt_val; break; \ 224 - case GS: UPT_GS(regs) = __upt_val; break; \ 225 221 case EFLAGS: UPT_EFLAGS(regs) = __upt_val; break; \ 226 222 default : \ 227 223 panic("Bad register in UPT_SET : %d\n", reg); \
+1 -7
arch/um/kernel/sysrq.c
··· 62 62 63 63 if (esp == NULL) { 64 64 if (task != current && task != NULL) { 65 - /* XXX: Isn't this bogus? I.e. isn't this the 66 - * *userspace* stack of this task? If not so, use this 67 - * even when task == current (as in i386). 68 - */ 69 65 esp = (unsigned long *) KSTK_ESP(task); 70 - /* Which one? No actual difference - just coding style.*/ 71 - //esp = (unsigned long *) PT_REGS_IP(&task->thread.regs); 72 66 } else { 73 67 esp = (unsigned long *) &esp; 74 68 } ··· 78 84 } 79 85 80 86 printk("Call Trace: \n"); 81 - show_trace(current, esp); 87 + show_trace(task, esp); 82 88 }
+9 -10
arch/um/os-Linux/sys-i386/registers.c
··· 5 5 6 6 #include <errno.h> 7 7 #include <string.h> 8 + #include <setjmp.h> 8 9 #include "sysdep/ptrace_user.h" 9 10 #include "sysdep/ptrace.h" 10 11 #include "uml-config.h" ··· 127 126 memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long)); 128 127 } 129 128 130 - /* 131 - * Overrides for Emacs so that we follow Linus's tabbing style. 132 - * Emacs will notice this stuff at the end of the file and automatically 133 - * adjust the settings for this buffer only. This must remain at the end 134 - * of the file. 135 - * --------------------------------------------------------------------------- 136 - * Local variables: 137 - * c-file-style: "linux" 138 - * End: 139 - */ 129 + void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer) 130 + { 131 + struct __jmp_buf_tag *jmpbuf = buffer; 132 + 133 + UPT_SET(uml_regs, EIP, jmpbuf->__jmpbuf[JB_PC]); 134 + UPT_SET(uml_regs, UESP, jmpbuf->__jmpbuf[JB_SP]); 135 + UPT_SET(uml_regs, EBP, jmpbuf->__jmpbuf[JB_BP]); 136 + }
+9 -10
arch/um/os-Linux/sys-x86_64/registers.c
··· 5 5 6 6 #include <errno.h> 7 7 #include <string.h> 8 + #include <setjmp.h> 8 9 #include "ptrace_user.h" 9 10 #include "uml-config.h" 10 11 #include "skas_ptregs.h" ··· 75 74 memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long)); 76 75 } 77 76 78 - /* 79 - * Overrides for Emacs so that we follow Linus's tabbing style. 80 - * Emacs will notice this stuff at the end of the file and automatically 81 - * adjust the settings for this buffer only. This must remain at the end 82 - * of the file. 83 - * --------------------------------------------------------------------------- 84 - * Local variables: 85 - * c-file-style: "linux" 86 - * End: 87 - */ 77 + void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer) 78 + { 79 + struct __jmp_buf_tag *jmpbuf = buffer; 80 + 81 + UPT_SET(uml_regs, RIP, jmpbuf->__jmpbuf[JB_PC]); 82 + UPT_SET(uml_regs, RSP, jmpbuf->__jmpbuf[JB_RSP]); 83 + UPT_SET(uml_regs, RBP, jmpbuf->__jmpbuf[JB_RBP]); 84 + }
+1 -12
arch/um/sys-i386/sysrq.c
··· 88 88 task = current; 89 89 90 90 if (task != current) { 91 - //ebp = (unsigned long) KSTK_EBP(task); 92 - /* Which one? No actual difference - just coding style.*/ 93 - ebp = (unsigned long) PT_REGS_EBP(&task->thread.regs); 91 + ebp = (unsigned long) KSTK_EBP(task); 94 92 } else { 95 93 asm ("movl %%ebp, %0" : "=r" (ebp) : ); 96 94 } ··· 97 99 ((unsigned long)stack & (~(THREAD_SIZE - 1))); 98 100 print_context_stack(context, stack, ebp); 99 101 100 - /*while (((long) stack & (THREAD_SIZE-1)) != 0) { 101 - addr = *stack; 102 - if (__kernel_text_address(addr)) { 103 - printk("%08lx: [<%08lx>]", (unsigned long) stack, addr); 104 - print_symbol(" %s", addr); 105 - printk("\n"); 106 - } 107 - stack++; 108 - }*/ 109 102 printk("\n"); 110 103 } 111 104
+1 -1
arch/um/sys-i386/user-offsets.c
··· 46 46 OFFSET(HOST_SC_FP_ST, _fpstate, _st); 47 47 OFFSET(HOST_SC_FXSR_ENV, _fpstate, _fxsr_env); 48 48 49 - DEFINE_LONGS(HOST_FRAME_SIZE, FRAME_SIZE); 49 + DEFINE(HOST_FRAME_SIZE, FRAME_SIZE); 50 50 DEFINE_LONGS(HOST_FP_SIZE, sizeof(struct user_i387_struct)); 51 51 DEFINE_LONGS(HOST_XFP_SIZE, sizeof(struct user_fxsr_struct)); 52 52
+20 -20
arch/x86_64/kernel/head.S
··· 270 270 .org 0x4000 271 271 ENTRY(level2_ident_pgt) 272 272 /* 40MB for bootup. */ 273 - .quad 0x0000000000000183 274 - .quad 0x0000000000200183 275 - .quad 0x0000000000400183 276 - .quad 0x0000000000600183 277 - .quad 0x0000000000800183 278 - .quad 0x0000000000A00183 279 - .quad 0x0000000000C00183 280 - .quad 0x0000000000E00183 281 - .quad 0x0000000001000183 282 - .quad 0x0000000001200183 283 - .quad 0x0000000001400183 284 - .quad 0x0000000001600183 285 - .quad 0x0000000001800183 286 - .quad 0x0000000001A00183 287 - .quad 0x0000000001C00183 288 - .quad 0x0000000001E00183 289 - .quad 0x0000000002000183 290 - .quad 0x0000000002200183 291 - .quad 0x0000000002400183 292 - .quad 0x0000000002600183 273 + .quad 0x0000000000000083 274 + .quad 0x0000000000200083 275 + .quad 0x0000000000400083 276 + .quad 0x0000000000600083 277 + .quad 0x0000000000800083 278 + .quad 0x0000000000A00083 279 + .quad 0x0000000000C00083 280 + .quad 0x0000000000E00083 281 + .quad 0x0000000001000083 282 + .quad 0x0000000001200083 283 + .quad 0x0000000001400083 284 + .quad 0x0000000001600083 285 + .quad 0x0000000001800083 286 + .quad 0x0000000001A00083 287 + .quad 0x0000000001C00083 288 + .quad 0x0000000001E00083 289 + .quad 0x0000000002000083 290 + .quad 0x0000000002200083 291 + .quad 0x0000000002400083 292 + .quad 0x0000000002600083 293 293 /* Temporary mappings for the super early allocator in arch/x86_64/mm/init.c */ 294 294 .globl temp_boot_pmds 295 295 temp_boot_pmds:
+21 -24
drivers/infiniband/hw/mthca/mthca_main.c
··· 503 503 return err; 504 504 } 505 505 506 + static void mthca_free_icms(struct mthca_dev *mdev) 507 + { 508 + u8 status; 509 + 510 + mthca_free_icm_table(mdev, mdev->mcg_table.table); 511 + if (mdev->mthca_flags & MTHCA_FLAG_SRQ) 512 + mthca_free_icm_table(mdev, mdev->srq_table.table); 513 + mthca_free_icm_table(mdev, mdev->cq_table.table); 514 + mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); 515 + mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); 516 + mthca_free_icm_table(mdev, mdev->qp_table.qp_table); 517 + mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); 518 + mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); 519 + mthca_unmap_eq_icm(mdev); 520 + 521 + mthca_UNMAP_ICM_AUX(mdev, &status); 522 + mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); 523 + } 524 + 506 525 static int __devinit mthca_init_arbel(struct mthca_dev *mdev) 507 526 { 508 527 struct mthca_dev_lim dev_lim; ··· 599 580 return 0; 600 581 601 582 err_free_icm: 602 - if (mdev->mthca_flags & MTHCA_FLAG_SRQ) 603 - mthca_free_icm_table(mdev, mdev->srq_table.table); 604 - mthca_free_icm_table(mdev, mdev->cq_table.table); 605 - mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); 606 - mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); 607 - mthca_free_icm_table(mdev, mdev->qp_table.qp_table); 608 - mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); 609 - mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); 610 - mthca_unmap_eq_icm(mdev); 611 - 612 - mthca_UNMAP_ICM_AUX(mdev, &status); 613 - mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); 583 + mthca_free_icms(mdev); 614 584 615 585 err_stop_fw: 616 586 mthca_UNMAP_FA(mdev, &status); ··· 619 611 mthca_CLOSE_HCA(mdev, 0, &status); 620 612 621 613 if (mthca_is_memfree(mdev)) { 622 - if (mdev->mthca_flags & MTHCA_FLAG_SRQ) 623 - mthca_free_icm_table(mdev, mdev->srq_table.table); 624 - mthca_free_icm_table(mdev, mdev->cq_table.table); 625 - mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); 626 - mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); 627 - mthca_free_icm_table(mdev, mdev->qp_table.qp_table); 628 - mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); 629 - mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); 630 - mthca_unmap_eq_icm(mdev); 631 - 632 - mthca_UNMAP_ICM_AUX(mdev, &status); 633 - mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); 614 + mthca_free_icms(mdev); 634 615 635 616 mthca_UNMAP_FA(mdev, &status); 636 617 mthca_free_icm(mdev, mdev->fw.arbel.fw_icm);
+2 -2
drivers/infiniband/ulp/ipoib/ipoib_main.c
··· 474 474 spin_unlock(&priv->lock); 475 475 } 476 476 477 - static void path_lookup(struct sk_buff *skb, struct net_device *dev) 477 + static void ipoib_path_lookup(struct sk_buff *skb, struct net_device *dev) 478 478 { 479 479 struct ipoib_dev_priv *priv = netdev_priv(skb->dev); 480 480 ··· 569 569 570 570 if (skb->dst && skb->dst->neighbour) { 571 571 if (unlikely(!*to_ipoib_neigh(skb->dst->neighbour))) { 572 - path_lookup(skb, dev); 572 + ipoib_path_lookup(skb, dev); 573 573 goto out; 574 574 } 575 575
-5
drivers/net/tokenring/ibmtr.c
··· 531 531 if (!time_after(jiffies, timeout)) continue; 532 532 DPRINTK( "Hardware timeout during initialization.\n"); 533 533 iounmap(t_mmio); 534 - kfree(ti); 535 534 return -ENODEV; 536 535 } 537 536 ti->sram_phys = ··· 644 645 DPRINTK("Unknown shared ram paging info %01X\n", 645 646 ti->shared_ram_paging); 646 647 iounmap(t_mmio); 647 - kfree(ti); 648 648 return -ENODEV; 649 649 break; 650 650 } /*end switch shared_ram_paging */ ··· 673 675 "driver limit (%05x), adapter not started.\n", 674 676 chk_base, ibmtr_mem_base + IBMTR_SHARED_RAM_SIZE); 675 677 iounmap(t_mmio); 676 - kfree(ti); 677 678 return -ENODEV; 678 679 } else { /* seems cool, record what we have figured out */ 679 680 ti->sram_base = new_base >> 12; ··· 687 690 DPRINTK("Could not grab irq %d. Halting Token Ring driver.\n", 688 691 irq); 689 692 iounmap(t_mmio); 690 - kfree(ti); 691 693 return -ENODEV; 692 694 } 693 695 /*?? Now, allocate some of the PIO PORTs for this driver.. */ ··· 695 699 DPRINTK("Could not grab PIO range. Halting driver.\n"); 696 700 free_irq(dev->irq, dev); 697 701 iounmap(t_mmio); 698 - kfree(ti); 699 702 return -EBUSY; 700 703 } 701 704
+9 -5
drivers/net/wireless/orinoco.c
··· 490 490 return 0; 491 491 } 492 492 493 - /* Length of the packet body */ 494 - /* FIXME: what if the skb is smaller than this? */ 495 - len = max_t(int,skb->len - ETH_HLEN, ETH_ZLEN - ETH_HLEN); 493 + /* Check packet length, pad short packets, round up odd length */ 494 + len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN); 495 + if (skb->len < len) { 496 + skb = skb_padto(skb, len); 497 + if (skb == NULL) 498 + goto fail; 499 + } 500 + len -= ETH_HLEN; 496 501 497 502 eh = (struct ethhdr *)skb->data; 498 503 ··· 549 544 p = skb->data; 550 545 } 551 546 552 - /* Round up for odd length packets */ 553 - err = hermes_bap_pwrite(hw, USER_BAP, p, ALIGN(data_len, 2), 547 + err = hermes_bap_pwrite(hw, USER_BAP, p, data_len, 554 548 txfid, data_off); 555 549 if (err) { 556 550 printk(KERN_ERR "%s: Error %d writing packet to BAP\n",
+1
drivers/scsi/megaraid/megaraid_sas.c
··· 34 34 #include <linux/delay.h> 35 35 #include <linux/uio.h> 36 36 #include <asm/uaccess.h> 37 + #include <linux/fs.h> 37 38 #include <linux/compat.h> 38 39 39 40 #include <scsi/scsi.h>
-4
drivers/serial/sunsu.c
··· 518 518 519 519 quot = up->port.uartclk / (16 * new_baud); 520 520 521 - spin_unlock(&up->port.lock); 522 - 523 521 sunsu_change_speed(&up->port, up->cflag, 0, quot); 524 - 525 - spin_lock(&up->port.lock); 526 522 } 527 523 528 524 static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *regs, int is_break)
+1 -1
fs/bfs/dir.c
··· 108 108 inode->i_mapping->a_ops = &bfs_aops; 109 109 inode->i_mode = mode; 110 110 inode->i_ino = ino; 111 - BFS_I(inode)->i_dsk_ino = cpu_to_le16(ino); 111 + BFS_I(inode)->i_dsk_ino = ino; 112 112 BFS_I(inode)->i_sblock = 0; 113 113 BFS_I(inode)->i_eblock = 0; 114 114 insert_inode_hash(inode);
+32 -14
fs/bfs/inode.c
··· 357 357 } 358 358 359 359 info->si_blocks = (le32_to_cpu(bfs_sb->s_end) + 1)>>BFS_BSIZE_BITS; /* for statfs(2) */ 360 - info->si_freeb = (le32_to_cpu(bfs_sb->s_end) + 1 - cpu_to_le32(bfs_sb->s_start))>>BFS_BSIZE_BITS; 360 + info->si_freeb = (le32_to_cpu(bfs_sb->s_end) + 1 - le32_to_cpu(bfs_sb->s_start))>>BFS_BSIZE_BITS; 361 361 info->si_freei = 0; 362 362 info->si_lf_eblk = 0; 363 363 info->si_lf_sblk = 0; 364 364 info->si_lf_ioff = 0; 365 + bh = NULL; 365 366 for (i=BFS_ROOT_INO; i<=info->si_lasti; i++) { 366 - inode = iget(s,i); 367 - if (BFS_I(inode)->i_dsk_ino == 0) 368 - info->si_freei++; 369 - else { 370 - set_bit(i, info->si_imap); 371 - info->si_freeb -= inode->i_blocks; 372 - if (BFS_I(inode)->i_eblock > info->si_lf_eblk) { 373 - info->si_lf_eblk = BFS_I(inode)->i_eblock; 374 - info->si_lf_sblk = BFS_I(inode)->i_sblock; 375 - info->si_lf_ioff = BFS_INO2OFF(i); 376 - } 367 + struct bfs_inode *di; 368 + int block = (i - BFS_ROOT_INO)/BFS_INODES_PER_BLOCK + 1; 369 + int off = (i - BFS_ROOT_INO) % BFS_INODES_PER_BLOCK; 370 + unsigned long sblock, eblock; 371 + 372 + if (!off) { 373 + brelse(bh); 374 + bh = sb_bread(s, block); 377 375 } 378 - iput(inode); 376 + 377 + if (!bh) 378 + continue; 379 + 380 + di = (struct bfs_inode *)bh->b_data + off; 381 + 382 + if (!di->i_ino) { 383 + info->si_freei++; 384 + continue; 385 + } 386 + set_bit(i, info->si_imap); 387 + info->si_freeb -= BFS_FILEBLOCKS(di); 388 + 389 + sblock = le32_to_cpu(di->i_sblock); 390 + eblock = le32_to_cpu(di->i_eblock); 391 + if (eblock > info->si_lf_eblk) { 392 + info->si_lf_eblk = eblock; 393 + info->si_lf_sblk = sblock; 394 + info->si_lf_ioff = BFS_INO2OFF(i); 395 + } 379 396 } 397 + brelse(bh); 380 398 if (!(s->s_flags & MS_RDONLY)) { 381 - mark_buffer_dirty(bh); 399 + mark_buffer_dirty(info->si_sbh); 382 400 s->s_dirt = 1; 383 401 } 384 402 dump_imap("read_super", s);
+3
fs/ntfs/ChangeLog
··· 102 102 inode instead of a vfs inode as parameter. 103 103 - Fix the definition of the CHKD ntfs record magic. It had an off by 104 104 two error causing it to be CHKB instead of CHKD. 105 + - Fix a stupid bug in __ntfs_bitmap_set_bits_in_run() which caused the 106 + count to become negative and hence we had a wild memset() scribbling 107 + all over the system's ram. 105 108 106 109 2.1.23 - Implement extension of resident files and make writing safe as well as 107 110 many bug fixes, cleanups, and enhancements...
+3 -2
fs/ntfs/bitmap.c
··· 1 1 /* 2 2 * bitmap.c - NTFS kernel bitmap handling. Part of the Linux-NTFS project. 3 3 * 4 - * Copyright (c) 2004 Anton Altaparmakov 4 + * Copyright (c) 2004-2005 Anton Altaparmakov 5 5 * 6 6 * This program/include file is free software; you can redistribute it and/or 7 7 * modify it under the terms of the GNU General Public License as published ··· 90 90 /* If the first byte is partial, modify the appropriate bits in it. */ 91 91 if (bit) { 92 92 u8 *byte = kaddr + pos; 93 - while ((bit & 7) && cnt--) { 93 + while ((bit & 7) && cnt) { 94 + cnt--; 94 95 if (value) 95 96 *byte |= 1 << bit++; 96 97 else
+1 -1
fs/ntfs/layout.h
··· 309 309 * Note: The _LE versions will return a CPU endian formatted value! 310 310 */ 311 311 #define MFT_REF_MASK_CPU 0x0000ffffffffffffULL 312 - #define MFT_REF_MASK_LE const_cpu_to_le64(0x0000ffffffffffffULL) 312 + #define MFT_REF_MASK_LE const_cpu_to_le64(MFT_REF_MASK_CPU) 313 313 314 314 typedef u64 MFT_REF; 315 315 typedef le64 leMFT_REF;
+2 -1
fs/ntfs/mft.c
··· 58 58 * overflowing the unsigned long, but I don't think we would ever get 59 59 * here if the volume was that big... 60 60 */ 61 - index = ni->mft_no << vol->mft_record_size_bits >> PAGE_CACHE_SHIFT; 61 + index = (u64)ni->mft_no << vol->mft_record_size_bits >> 62 + PAGE_CACHE_SHIFT; 62 63 ofs = (ni->mft_no << vol->mft_record_size_bits) & ~PAGE_CACHE_MASK; 63 64 64 65 i_size = i_size_read(mft_vi);
+1 -1
fs/ntfs/unistr.c
··· 1 1 /* 2 2 * unistr.c - NTFS Unicode string handling. Part of the Linux-NTFS project. 3 3 * 4 - * Copyright (c) 2001-2004 Anton Altaparmakov 4 + * Copyright (c) 2001-2005 Anton Altaparmakov 5 5 * 6 6 * This program/include file is free software; you can redistribute it and/or 7 7 * modify it under the terms of the GNU General Public License as published
+5 -3
include/asm-arm/arch-h720x/system.h
··· 17 17 static void arch_idle(void) 18 18 { 19 19 CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE; 20 - __asm__ __volatile__( 21 - "mov r0, r0\n\t" 22 - "mov r0, r0"); 20 + nop(); 21 + nop(); 22 + CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN; 23 + nop(); 24 + nop(); 23 25 } 24 26 25 27
+34 -12
include/asm-arm/arch-imx/imx-regs.h
··· 76 76 #define GPIO_PIN_MASK 0x1f 77 77 #define GPIO_PORT_MASK (0x3 << 5) 78 78 79 + #define GPIO_PORT_SHIFT 5 79 80 #define GPIO_PORTA (0<<5) 80 81 #define GPIO_PORTB (1<<5) 81 82 #define GPIO_PORTC (2<<5) ··· 89 88 #define GPIO_PF (0<<9) 90 89 #define GPIO_AF (1<<9) 91 90 91 + #define GPIO_OCR_SHIFT 10 92 92 #define GPIO_OCR_MASK (3<<10) 93 93 #define GPIO_AIN (0<<10) 94 94 #define GPIO_BIN (1<<10) 95 95 #define GPIO_CIN (2<<10) 96 - #define GPIO_GPIO (3<<10) 96 + #define GPIO_DR (3<<10) 97 97 98 - #define GPIO_AOUT (1<<12) 99 - #define GPIO_BOUT (1<<13) 98 + #define GPIO_AOUT_SHIFT 12 99 + #define GPIO_AOUT_MASK (3<<12) 100 + #define GPIO_AOUT (0<<12) 101 + #define GPIO_AOUT_ISR (1<<12) 102 + #define GPIO_AOUT_0 (2<<12) 103 + #define GPIO_AOUT_1 (3<<12) 104 + 105 + #define GPIO_BOUT_SHIFT 14 106 + #define GPIO_BOUT_MASK (3<<14) 107 + #define GPIO_BOUT (0<<14) 108 + #define GPIO_BOUT_ISR (1<<14) 109 + #define GPIO_BOUT_0 (2<<14) 110 + #define GPIO_BOUT_1 (3<<14) 111 + 112 + #define GPIO_GIUS (1<<16) 100 113 101 114 /* assignements for GPIO alternate/primary functions */ 102 115 103 116 /* FIXME: This list is not completed. The correct directions are 104 117 * missing on some (many) pins 105 118 */ 106 - #define PA0_PF_A24 ( GPIO_PORTA | GPIO_PF | 0 ) 107 - #define PA0_AIN_SPI2_CLK ( GPIO_PORTA | GPIO_OUT | GPIO_AIN | 0 ) 119 + #define PA0_AIN_SPI2_CLK ( GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 0 ) 108 120 #define PA0_AF_ETMTRACESYNC ( GPIO_PORTA | GPIO_AF | 0 ) 109 - #define PA1_AOUT_SPI2_RXD ( GPIO_PORTA | GPIO_IN | GPIO_AOUT | 1 ) 121 + #define PA1_AOUT_SPI2_RXD ( GPIO_GIUS | GPIO_PORTA | GPIO_IN | 1 ) 110 122 #define PA1_PF_TIN ( GPIO_PORTA | GPIO_PF | 1 ) 111 123 #define PA2_PF_PWM0 ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 2 ) 112 124 #define PA3_PF_CSI_MCLK ( GPIO_PORTA | GPIO_PF | 3 ) ··· 137 123 #define PA15_PF_I2C_SDA ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 15 ) 138 124 #define PA16_PF_I2C_SCL ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 16 ) 139 125 #define PA17_AF_ETMTRACEPKT4 ( GPIO_PORTA | GPIO_AF | 17 ) 140 - #define PA17_AIN_SPI2_SS ( GPIO_PORTA | GPIO_AIN | 17 ) 126 + #define PA17_AIN_SPI2_SS ( GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 17 ) 141 127 #define PA18_AF_ETMTRACEPKT5 ( GPIO_PORTA | GPIO_AF | 18 ) 142 128 #define PA19_AF_ETMTRACEPKT6 ( GPIO_PORTA | GPIO_AF | 19 ) 143 129 #define PA20_AF_ETMTRACEPKT7 ( GPIO_PORTA | GPIO_AF | 20 ) ··· 205 191 #define PC15_PF_SPI1_SS ( GPIO_PORTC | GPIO_PF | 15 ) 206 192 #define PC16_PF_SPI1_MISO ( GPIO_PORTC | GPIO_PF | 16 ) 207 193 #define PC17_PF_SPI1_MOSI ( GPIO_PORTC | GPIO_PF | 17 ) 194 + #define PC24_BIN_UART3_RI ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 24 ) 195 + #define PC25_BIN_UART3_DSR ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 25 ) 196 + #define PC26_AOUT_UART3_DTR ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 26 ) 197 + #define PC27_BIN_UART3_DCD ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 27 ) 198 + #define PC28_BIN_UART3_CTS ( GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 28 ) 199 + #define PC29_AOUT_UART3_RTS ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 29 ) 200 + #define PC30_BIN_UART3_TX ( GPIO_GIUS | GPIO_PORTC | GPIO_BIN | 30 ) 201 + #define PC31_AOUT_UART3_RX ( GPIO_GIUS | GPIO_PORTC | GPIO_IN | 31) 208 202 #define PD6_PF_LSCLK ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 6 ) 209 203 #define PD7_PF_REV ( GPIO_PORTD | GPIO_PF | 7 ) 210 204 #define PD7_AF_UART2_DTR ( GPIO_PORTD | GPIO_IN | GPIO_AF | 7 ) 211 - #define PD7_AIN_SPI2_SCLK ( GPIO_PORTD | GPIO_AIN | 7 ) 205 + #define PD7_AIN_SPI2_SCLK ( GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 7 ) 212 206 #define PD8_PF_CLS ( GPIO_PORTD | GPIO_PF | 8 ) 213 207 #define PD8_AF_UART2_DCD ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 8 ) 214 - #define PD8_AIN_SPI2_SS ( GPIO_PORTD | GPIO_AIN | 8 ) 208 + #define PD8_AIN_SPI2_SS ( GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 8 ) 215 209 #define PD9_PF_PS ( GPIO_PORTD | GPIO_PF | 9 ) 216 210 #define PD9_AF_UART2_RI ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 9 ) 217 - #define PD9_AOUT_SPI2_RXD ( GPIO_PORTD | GPIO_IN | GPIO_AOUT | 9 ) 211 + #define PD9_AOUT_SPI2_RXD ( GPIO_GIUS | GPIO_PORTD | GPIO_IN | 9 ) 218 212 #define PD10_PF_SPL_SPR ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 10 ) 219 213 #define PD10_AF_UART2_DSR ( GPIO_PORTD | GPIO_OUT | GPIO_AF | 10 ) 220 - #define PD10_AIN_SPI2_TXD ( GPIO_PORTD | GPIO_OUT | GPIO_AIN | 10 ) 214 + #define PD10_AIN_SPI2_TXD ( GPIO_GIUS | GPIO_PORTD | GPIO_OUT | 10 ) 221 215 #define PD11_PF_CONTRAST ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 11 ) 222 216 #define PD12_PF_ACD_OE ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 12 ) 223 217 #define PD13_PF_LP_HSYNC ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 13 ) ··· 247 225 #define PD29_PF_LD14 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 29 ) 248 226 #define PD30_PF_LD15 ( GPIO_PORTD | GPIO_OUT | GPIO_PF | 30 ) 249 227 #define PD31_PF_TMR2OUT ( GPIO_PORTD | GPIO_PF | 31 ) 250 - #define PD31_BIN_SPI2_TXD ( GPIO_PORTD | GPIO_BIN | 31 ) 228 + #define PD31_BIN_SPI2_TXD ( GPIO_GIUS | GPIO_PORTD | GPIO_BIN | 31 ) 251 229 252 230 /* 253 231 * PWM controller
+1 -1
include/asm-arm/arch-ixp4xx/platform.h
··· 93 93 94 94 static inline void gpio_line_config(u8 line, u32 direction) 95 95 { 96 - if (direction == IXP4XX_GPIO_OUT) 96 + if (direction == IXP4XX_GPIO_IN) 97 97 *IXP4XX_GPIO_GPOER |= (1 << line); 98 98 else 99 99 *IXP4XX_GPIO_GPOER &= ~(1 << line);
+6 -6
include/asm-sparc/btfixup.h
··· 51 51 #define BTFIXUPDEF_SIMM13(__name) \ 52 52 extern unsigned int ___sf_##__name(void) __attribute_const__; \ 53 53 extern unsigned ___ss_##__name[2]; \ 54 - extern __inline__ unsigned int ___sf_##__name(void) { \ 54 + static inline unsigned int ___sf_##__name(void) { \ 55 55 unsigned int ret; \ 56 56 __asm__ ("or %%g0, ___s_" #__name ", %0" : "=r"(ret)); \ 57 57 return ret; \ ··· 59 59 #define BTFIXUPDEF_SIMM13_INIT(__name,__val) \ 60 60 extern unsigned int ___sf_##__name(void) __attribute_const__; \ 61 61 extern unsigned ___ss_##__name[2]; \ 62 - extern __inline__ unsigned int ___sf_##__name(void) { \ 62 + static inline unsigned int ___sf_##__name(void) { \ 63 63 unsigned int ret; \ 64 64 __asm__ ("or %%g0, ___s_" #__name "__btset_" #__val ", %0" : "=r"(ret));\ 65 65 return ret; \ ··· 73 73 #define BTFIXUPDEF_HALF(__name) \ 74 74 extern unsigned int ___af_##__name(void) __attribute_const__; \ 75 75 extern unsigned ___as_##__name[2]; \ 76 - extern __inline__ unsigned int ___af_##__name(void) { \ 76 + static inline unsigned int ___af_##__name(void) { \ 77 77 unsigned int ret; \ 78 78 __asm__ ("or %%g0, ___a_" #__name ", %0" : "=r"(ret)); \ 79 79 return ret; \ ··· 81 81 #define BTFIXUPDEF_HALF_INIT(__name,__val) \ 82 82 extern unsigned int ___af_##__name(void) __attribute_const__; \ 83 83 extern unsigned ___as_##__name[2]; \ 84 - extern __inline__ unsigned int ___af_##__name(void) { \ 84 + static inline unsigned int ___af_##__name(void) { \ 85 85 unsigned int ret; \ 86 86 __asm__ ("or %%g0, ___a_" #__name "__btset_" #__val ", %0" : "=r"(ret));\ 87 87 return ret; \ ··· 92 92 #define BTFIXUPDEF_SETHI(__name) \ 93 93 extern unsigned int ___hf_##__name(void) __attribute_const__; \ 94 94 extern unsigned ___hs_##__name[2]; \ 95 - extern __inline__ unsigned int ___hf_##__name(void) { \ 95 + static inline unsigned int ___hf_##__name(void) { \ 96 96 unsigned int ret; \ 97 97 __asm__ ("sethi %%hi(___h_" #__name "), %0" : "=r"(ret)); \ 98 98 return ret; \ ··· 100 100 #define BTFIXUPDEF_SETHI_INIT(__name,__val) \ 101 101 extern unsigned int ___hf_##__name(void) __attribute_const__; \ 102 102 extern unsigned ___hs_##__name[2]; \ 103 - extern __inline__ unsigned int ___hf_##__name(void) { \ 103 + static inline unsigned int ___hf_##__name(void) { \ 104 104 unsigned int ret; \ 105 105 __asm__ ("sethi %%hi(___h_" #__name "__btset_" #__val "), %0" : \ 106 106 "=r"(ret)); \
+9 -9
include/asm-sparc/cache.h
··· 27 27 */ 28 28 29 29 /* First, cache-tag access. */ 30 - extern __inline__ unsigned int get_icache_tag(int setnum, int tagnum) 30 + static inline unsigned int get_icache_tag(int setnum, int tagnum) 31 31 { 32 32 unsigned int vaddr, retval; 33 33 ··· 38 38 return retval; 39 39 } 40 40 41 - extern __inline__ void put_icache_tag(int setnum, int tagnum, unsigned int entry) 41 + static inline void put_icache_tag(int setnum, int tagnum, unsigned int entry) 42 42 { 43 43 unsigned int vaddr; 44 44 ··· 51 51 /* Second cache-data access. The data is returned two-32bit quantities 52 52 * at a time. 53 53 */ 54 - extern __inline__ void get_icache_data(int setnum, int tagnum, int subblock, 54 + static inline void get_icache_data(int setnum, int tagnum, int subblock, 55 55 unsigned int *data) 56 56 { 57 57 unsigned int value1, value2, vaddr; ··· 67 67 data[0] = value1; data[1] = value2; 68 68 } 69 69 70 - extern __inline__ void put_icache_data(int setnum, int tagnum, int subblock, 70 + static inline void put_icache_data(int setnum, int tagnum, int subblock, 71 71 unsigned int *data) 72 72 { 73 73 unsigned int value1, value2, vaddr; ··· 92 92 */ 93 93 94 94 /* Flushes which clear out both the on-chip and external caches */ 95 - extern __inline__ void flush_ei_page(unsigned int addr) 95 + static inline void flush_ei_page(unsigned int addr) 96 96 { 97 97 __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : 98 98 "r" (addr), "i" (ASI_M_FLUSH_PAGE) : 99 99 "memory"); 100 100 } 101 101 102 - extern __inline__ void flush_ei_seg(unsigned int addr) 102 + static inline void flush_ei_seg(unsigned int addr) 103 103 { 104 104 __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : 105 105 "r" (addr), "i" (ASI_M_FLUSH_SEG) : 106 106 "memory"); 107 107 } 108 108 109 - extern __inline__ void flush_ei_region(unsigned int addr) 109 + static inline void flush_ei_region(unsigned int addr) 110 110 { 111 111 __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : 112 112 "r" (addr), "i" (ASI_M_FLUSH_REGION) : 113 113 "memory"); 114 114 } 115 115 116 - extern __inline__ void flush_ei_ctx(unsigned int addr) 116 + static inline void flush_ei_ctx(unsigned int addr) 117 117 { 118 118 __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : 119 119 "r" (addr), "i" (ASI_M_FLUSH_CTX) : 120 120 "memory"); 121 121 } 122 122 123 - extern __inline__ void flush_ei_user(unsigned int addr) 123 + static inline void flush_ei_user(unsigned int addr) 124 124 { 125 125 __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : 126 126 "r" (addr), "i" (ASI_M_FLUSH_USER) :
+4 -4
include/asm-sparc/cypress.h
··· 48 48 #define CYPRESS_NFAULT 0x00000002 49 49 #define CYPRESS_MENABLE 0x00000001 50 50 51 - extern __inline__ void cypress_flush_page(unsigned long page) 51 + static inline void cypress_flush_page(unsigned long page) 52 52 { 53 53 __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : 54 54 "r" (page), "i" (ASI_M_FLUSH_PAGE)); 55 55 } 56 56 57 - extern __inline__ void cypress_flush_segment(unsigned long addr) 57 + static inline void cypress_flush_segment(unsigned long addr) 58 58 { 59 59 __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : 60 60 "r" (addr), "i" (ASI_M_FLUSH_SEG)); 61 61 } 62 62 63 - extern __inline__ void cypress_flush_region(unsigned long addr) 63 + static inline void cypress_flush_region(unsigned long addr) 64 64 { 65 65 __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : 66 66 "r" (addr), "i" (ASI_M_FLUSH_REGION)); 67 67 } 68 68 69 - extern __inline__ void cypress_flush_context(void) 69 + static inline void cypress_flush_context(void) 70 70 { 71 71 __asm__ __volatile__("sta %%g0, [%%g0] %0\n\t" : : 72 72 "i" (ASI_M_FLUSH_CTX));
+1 -1
include/asm-sparc/delay.h
··· 10 10 #include <linux/config.h> 11 11 #include <asm/cpudata.h> 12 12 13 - extern __inline__ void __delay(unsigned long loops) 13 + static inline void __delay(unsigned long loops) 14 14 { 15 15 __asm__ __volatile__("cmp %0, 0\n\t" 16 16 "1: bne 1b\n\t"
+1 -1
include/asm-sparc/dma.h
··· 198 198 /* Pause until counter runs out or BIT isn't set in the DMA condition 199 199 * register. 200 200 */ 201 - extern __inline__ void sparc_dma_pause(struct sparc_dma_registers *regs, 201 + static inline void sparc_dma_pause(struct sparc_dma_registers *regs, 202 202 unsigned long bit) 203 203 { 204 204 int ctr = 50000; /* Let's find some bugs ;) */
+2 -2
include/asm-sparc/iommu.h
··· 108 108 struct bit_map usemap; 109 109 }; 110 110 111 - extern __inline__ void iommu_invalidate(struct iommu_regs *regs) 111 + static inline void iommu_invalidate(struct iommu_regs *regs) 112 112 { 113 113 regs->tlbflush = 0; 114 114 } 115 115 116 - extern __inline__ void iommu_invalidate_page(struct iommu_regs *regs, unsigned long ba) 116 + static inline void iommu_invalidate_page(struct iommu_regs *regs, unsigned long ba) 117 117 { 118 118 regs->pageflush = (ba & PAGE_MASK); 119 119 }
+1 -1
include/asm-sparc/kdebug.h
··· 46 46 extern struct kernel_debug *linux_dbvec; 47 47 48 48 /* Use this macro in C-code to enter the debugger. */ 49 - extern __inline__ void sp_enter_debugger(void) 49 + static inline void sp_enter_debugger(void) 50 50 { 51 51 __asm__ __volatile__("jmpl %0, %%o7\n\t" 52 52 "nop\n\t" : :
+2 -2
include/asm-sparc/mbus.h
··· 83 83 */ 84 84 #define TBR_ID_SHIFT 20 85 85 86 - extern __inline__ int get_cpuid(void) 86 + static inline int get_cpuid(void) 87 87 { 88 88 register int retval; 89 89 __asm__ __volatile__("rd %%tbr, %0\n\t" ··· 93 93 return (retval & 3); 94 94 } 95 95 96 - extern __inline__ int get_modid(void) 96 + static inline int get_modid(void) 97 97 { 98 98 return (get_cpuid() | 0x8); 99 99 }
+1 -1
include/asm-sparc/msi.h
··· 19 19 #define MSI_ASYNC_MODE 0x80000000 /* Operate the MSI asynchronously */ 20 20 21 21 22 - extern __inline__ void msi_set_sync(void) 22 + static inline void msi_set_sync(void) 23 23 { 24 24 __asm__ __volatile__ ("lda [%0] %1, %%g3\n\t" 25 25 "andn %%g3, %2, %%g3\n\t"
+4 -4
include/asm-sparc/mxcc.h
··· 85 85 86 86 #ifndef __ASSEMBLY__ 87 87 88 - extern __inline__ void mxcc_set_stream_src(unsigned long *paddr) 88 + static inline void mxcc_set_stream_src(unsigned long *paddr) 89 89 { 90 90 unsigned long data0 = paddr[0]; 91 91 unsigned long data1 = paddr[1]; ··· 98 98 "i" (ASI_M_MXCC) : "g2", "g3"); 99 99 } 100 100 101 - extern __inline__ void mxcc_set_stream_dst(unsigned long *paddr) 101 + static inline void mxcc_set_stream_dst(unsigned long *paddr) 102 102 { 103 103 unsigned long data0 = paddr[0]; 104 104 unsigned long data1 = paddr[1]; ··· 111 111 "i" (ASI_M_MXCC) : "g2", "g3"); 112 112 } 113 113 114 - extern __inline__ unsigned long mxcc_get_creg(void) 114 + static inline unsigned long mxcc_get_creg(void) 115 115 { 116 116 unsigned long mxcc_control; 117 117 ··· 125 125 return mxcc_control; 126 126 } 127 127 128 - extern __inline__ void mxcc_set_creg(unsigned long mxcc_control) 128 + static inline void mxcc_set_creg(unsigned long mxcc_control) 129 129 { 130 130 __asm__ __volatile__("sta %0, [%1] %2\n\t" : : 131 131 "r" (mxcc_control), "r" (MXCC_CREG),
+15 -15
include/asm-sparc/obio.h
··· 98 98 99 99 #ifndef __ASSEMBLY__ 100 100 101 - extern __inline__ int bw_get_intr_mask(int sbus_level) 101 + static inline int bw_get_intr_mask(int sbus_level) 102 102 { 103 103 int mask; 104 104 ··· 109 109 return mask; 110 110 } 111 111 112 - extern __inline__ void bw_clear_intr_mask(int sbus_level, int mask) 112 + static inline void bw_clear_intr_mask(int sbus_level, int mask) 113 113 { 114 114 __asm__ __volatile__ ("stha %0, [%1] %2" : : 115 115 "r" (mask), ··· 117 117 "i" (ASI_M_CTL)); 118 118 } 119 119 120 - extern __inline__ unsigned bw_get_prof_limit(int cpu) 120 + static inline unsigned bw_get_prof_limit(int cpu) 121 121 { 122 122 unsigned limit; 123 123 ··· 128 128 return limit; 129 129 } 130 130 131 - extern __inline__ void bw_set_prof_limit(int cpu, unsigned limit) 131 + static inline void bw_set_prof_limit(int cpu, unsigned limit) 132 132 { 133 133 __asm__ __volatile__ ("sta %0, [%1] %2" : : 134 134 "r" (limit), ··· 136 136 "i" (ASI_M_CTL)); 137 137 } 138 138 139 - extern __inline__ unsigned bw_get_ctrl(int cpu) 139 + static inline unsigned bw_get_ctrl(int cpu) 140 140 { 141 141 unsigned ctrl; 142 142 ··· 147 147 return ctrl; 148 148 } 149 149 150 - extern __inline__ void bw_set_ctrl(int cpu, unsigned ctrl) 150 + static inline void bw_set_ctrl(int cpu, unsigned ctrl) 151 151 { 152 152 __asm__ __volatile__ ("sta %0, [%1] %2" : : 153 153 "r" (ctrl), ··· 157 157 158 158 extern unsigned char cpu_leds[32]; 159 159 160 - extern __inline__ void show_leds(int cpuid) 160 + static inline void show_leds(int cpuid) 161 161 { 162 162 cpuid &= 0x1e; 163 163 __asm__ __volatile__ ("stba %0, [%1] %2" : : ··· 166 166 "i" (ASI_M_CTL)); 167 167 } 168 168 169 - extern __inline__ unsigned cc_get_ipen(void) 169 + static inline unsigned cc_get_ipen(void) 170 170 { 171 171 unsigned pending; 172 172 ··· 177 177 return pending; 178 178 } 179 179 180 - extern __inline__ void cc_set_iclr(unsigned clear) 180 + static inline void cc_set_iclr(unsigned clear) 181 181 { 182 182 __asm__ __volatile__ ("stha %0, [%1] %2" : : 183 183 "r" (clear), ··· 185 185 "i" (ASI_M_MXCC)); 186 186 } 187 187 188 - extern __inline__ unsigned cc_get_imsk(void) 188 + static inline unsigned cc_get_imsk(void) 189 189 { 190 190 unsigned mask; 191 191 ··· 196 196 return mask; 197 197 } 198 198 199 - extern __inline__ void cc_set_imsk(unsigned mask) 199 + static inline void cc_set_imsk(unsigned mask) 200 200 { 201 201 __asm__ __volatile__ ("stha %0, [%1] %2" : : 202 202 "r" (mask), ··· 204 204 "i" (ASI_M_MXCC)); 205 205 } 206 206 207 - extern __inline__ unsigned cc_get_imsk_other(int cpuid) 207 + static inline unsigned cc_get_imsk_other(int cpuid) 208 208 { 209 209 unsigned mask; 210 210 ··· 215 215 return mask; 216 216 } 217 217 218 - extern __inline__ void cc_set_imsk_other(int cpuid, unsigned mask) 218 + static inline void cc_set_imsk_other(int cpuid, unsigned mask) 219 219 { 220 220 __asm__ __volatile__ ("stha %0, [%1] %2" : : 221 221 "r" (mask), ··· 223 223 "i" (ASI_M_CTL)); 224 224 } 225 225 226 - extern __inline__ void cc_set_igen(unsigned gen) 226 + static inline void cc_set_igen(unsigned gen) 227 227 { 228 228 __asm__ __volatile__ ("sta %0, [%1] %2" : : 229 229 "r" (gen), ··· 239 239 #define IGEN_MESSAGE(bcast, devid, sid, levels) \ 240 240 (((bcast) << 31) | ((devid) << 23) | ((sid) << 15) | (levels)) 241 241 242 - extern __inline__ void sun4d_send_ipi(int cpu, int level) 242 + static inline void sun4d_send_ipi(int cpu, int level) 243 243 { 244 244 cc_set_igen(IGEN_MESSAGE(0, cpu << 3, 6 + ((level >> 1) & 7), 1 << (level - 1))); 245 245 }
+3 -3
include/asm-sparc/pci.h
··· 15 15 16 16 #define PCI_IRQ_NONE 0xffffffff 17 17 18 - extern inline void pcibios_set_master(struct pci_dev *dev) 18 + static inline void pcibios_set_master(struct pci_dev *dev) 19 19 { 20 20 /* No special bus mastering setup handling */ 21 21 } 22 22 23 - extern inline void pcibios_penalize_isa_irq(int irq, int active) 23 + static inline void pcibios_penalize_isa_irq(int irq, int active) 24 24 { 25 25 /* We don't do dynamic PCI IRQ allocation */ 26 26 } ··· 137 137 * only drive the low 24-bits during PCI bus mastering, then 138 138 * you would pass 0x00ffffff as the mask to this function. 139 139 */ 140 - extern inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask) 140 + static inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask) 141 141 { 142 142 return 1; 143 143 }
+14 -14
include/asm-sparc/pgtable.h
··· 154 154 BTFIXUPDEF_CALL(void, pte_clear, pte_t *) 155 155 BTFIXUPDEF_CALL(int, pte_read, pte_t) 156 156 157 - extern __inline__ int pte_none(pte_t pte) 157 + static inline int pte_none(pte_t pte) 158 158 { 159 159 return !(pte_val(pte) & ~BTFIXUP_SETHI(none_mask)); 160 160 } ··· 167 167 BTFIXUPDEF_CALL_CONST(int, pmd_present, pmd_t) 168 168 BTFIXUPDEF_CALL(void, pmd_clear, pmd_t *) 169 169 170 - extern __inline__ int pmd_none(pmd_t pmd) 170 + static inline int pmd_none(pmd_t pmd) 171 171 { 172 172 return !(pmd_val(pmd) & ~BTFIXUP_SETHI(none_mask)); 173 173 } ··· 195 195 BTFIXUPDEF_HALF(pte_youngi) 196 196 197 197 extern int pte_write(pte_t pte) __attribute_const__; 198 - extern __inline__ int pte_write(pte_t pte) 198 + static inline int pte_write(pte_t pte) 199 199 { 200 200 return pte_val(pte) & BTFIXUP_HALF(pte_writei); 201 201 } 202 202 203 203 extern int pte_dirty(pte_t pte) __attribute_const__; 204 - extern __inline__ int pte_dirty(pte_t pte) 204 + static inline int pte_dirty(pte_t pte) 205 205 { 206 206 return pte_val(pte) & BTFIXUP_HALF(pte_dirtyi); 207 207 } 208 208 209 209 extern int pte_young(pte_t pte) __attribute_const__; 210 - extern __inline__ int pte_young(pte_t pte) 210 + static inline int pte_young(pte_t pte) 211 211 { 212 212 return pte_val(pte) & BTFIXUP_HALF(pte_youngi); 213 213 } ··· 218 218 BTFIXUPDEF_HALF(pte_filei) 219 219 220 220 extern int pte_file(pte_t pte) __attribute_const__; 221 - extern __inline__ int pte_file(pte_t pte) 221 + static inline int pte_file(pte_t pte) 222 222 { 223 223 return pte_val(pte) & BTFIXUP_HALF(pte_filei); 224 224 } ··· 230 230 BTFIXUPDEF_HALF(pte_mkoldi) 231 231 232 232 extern pte_t pte_wrprotect(pte_t pte) __attribute_const__; 233 - extern __inline__ pte_t pte_wrprotect(pte_t pte) 233 + static inline pte_t pte_wrprotect(pte_t pte) 234 234 { 235 235 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_wrprotecti)); 236 236 } 237 237 238 238 extern pte_t pte_mkclean(pte_t pte) __attribute_const__; 239 - extern __inline__ pte_t pte_mkclean(pte_t pte) 239 + static inline pte_t pte_mkclean(pte_t pte) 240 240 { 241 241 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkcleani)); 242 242 } 243 243 244 244 extern pte_t pte_mkold(pte_t pte) __attribute_const__; 245 - extern __inline__ pte_t pte_mkold(pte_t pte) 245 + static inline pte_t pte_mkold(pte_t pte) 246 246 { 247 247 return __pte(pte_val(pte) & ~BTFIXUP_HALF(pte_mkoldi)); 248 248 } ··· 279 279 BTFIXUPDEF_INT(pte_modify_mask) 280 280 281 281 extern pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; 282 - extern __inline__ pte_t pte_modify(pte_t pte, pgprot_t newprot) 282 + static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 283 283 { 284 284 return __pte((pte_val(pte) & BTFIXUP_INT(pte_modify_mask)) | 285 285 pgprot_val(newprot)); ··· 386 386 387 387 #define NO_CONTEXT -1 388 388 389 - extern __inline__ void remove_from_ctx_list(struct ctx_list *entry) 389 + static inline void remove_from_ctx_list(struct ctx_list *entry) 390 390 { 391 391 entry->next->prev = entry->prev; 392 392 entry->prev->next = entry->next; 393 393 } 394 394 395 - extern __inline__ void add_to_ctx_list(struct ctx_list *head, struct ctx_list *entry) 395 + static inline void add_to_ctx_list(struct ctx_list *head, struct ctx_list *entry) 396 396 { 397 397 entry->next = head; 398 398 (entry->prev = head->prev)->next = entry; ··· 401 401 #define add_to_free_ctxlist(entry) add_to_ctx_list(&ctx_free, entry) 402 402 #define add_to_used_ctxlist(entry) add_to_ctx_list(&ctx_used, entry) 403 403 404 - extern __inline__ unsigned long 404 + static inline unsigned long 405 405 __get_phys (unsigned long addr) 406 406 { 407 407 switch (sparc_cpu_model){ ··· 416 416 } 417 417 } 418 418 419 - extern __inline__ int 419 + static inline int 420 420 __get_iospace (unsigned long addr) 421 421 { 422 422 switch (sparc_cpu_model){
+15 -15
include/asm-sparc/pgtsrmmu.h
··· 148 148 #define __nocache_fix(VADDR) __va(__nocache_pa(VADDR)) 149 149 150 150 /* Accessing the MMU control register. */ 151 - extern __inline__ unsigned int srmmu_get_mmureg(void) 151 + static inline unsigned int srmmu_get_mmureg(void) 152 152 { 153 153 unsigned int retval; 154 154 __asm__ __volatile__("lda [%%g0] %1, %0\n\t" : ··· 157 157 return retval; 158 158 } 159 159 160 - extern __inline__ void srmmu_set_mmureg(unsigned long regval) 160 + static inline void srmmu_set_mmureg(unsigned long regval) 161 161 { 162 162 __asm__ __volatile__("sta %0, [%%g0] %1\n\t" : : 163 163 "r" (regval), "i" (ASI_M_MMUREGS) : "memory"); 164 164 165 165 } 166 166 167 - extern __inline__ void srmmu_set_ctable_ptr(unsigned long paddr) 167 + static inline void srmmu_set_ctable_ptr(unsigned long paddr) 168 168 { 169 169 paddr = ((paddr >> 4) & SRMMU_CTX_PMASK); 170 170 __asm__ __volatile__("sta %0, [%1] %2\n\t" : : ··· 173 173 "memory"); 174 174 } 175 175 176 - extern __inline__ unsigned long srmmu_get_ctable_ptr(void) 176 + static inline unsigned long srmmu_get_ctable_ptr(void) 177 177 { 178 178 unsigned int retval; 179 179 ··· 184 184 return (retval & SRMMU_CTX_PMASK) << 4; 185 185 } 186 186 187 - extern __inline__ void srmmu_set_context(int context) 187 + static inline void srmmu_set_context(int context) 188 188 { 189 189 __asm__ __volatile__("sta %0, [%1] %2\n\t" : : 190 190 "r" (context), "r" (SRMMU_CTX_REG), 191 191 "i" (ASI_M_MMUREGS) : "memory"); 192 192 } 193 193 194 - extern __inline__ int srmmu_get_context(void) 194 + static inline int srmmu_get_context(void) 195 195 { 196 196 register int retval; 197 197 __asm__ __volatile__("lda [%1] %2, %0\n\t" : ··· 201 201 return retval; 202 202 } 203 203 204 - extern __inline__ unsigned int srmmu_get_fstatus(void) 204 + static inline unsigned int srmmu_get_fstatus(void) 205 205 { 206 206 unsigned int retval; 207 207 ··· 211 211 return retval; 212 212 } 213 213 214 - extern __inline__ unsigned int srmmu_get_faddr(void) 214 + static inline unsigned int srmmu_get_faddr(void) 215 215 { 216 216 unsigned int retval; 217 217 ··· 222 222 } 223 223 224 224 /* This is guaranteed on all SRMMU's. */ 225 - extern __inline__ void srmmu_flush_whole_tlb(void) 225 + static inline void srmmu_flush_whole_tlb(void) 226 226 { 227 227 __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : 228 228 "r" (0x400), /* Flush entire TLB!! */ ··· 231 231 } 232 232 233 233 /* These flush types are not available on all chips... */ 234 - extern __inline__ void srmmu_flush_tlb_ctx(void) 234 + static inline void srmmu_flush_tlb_ctx(void) 235 235 { 236 236 __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : 237 237 "r" (0x300), /* Flush TLB ctx.. */ ··· 239 239 240 240 } 241 241 242 - extern __inline__ void srmmu_flush_tlb_region(unsigned long addr) 242 + static inline void srmmu_flush_tlb_region(unsigned long addr) 243 243 { 244 244 addr &= SRMMU_PGDIR_MASK; 245 245 __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : ··· 249 249 } 250 250 251 251 252 - extern __inline__ void srmmu_flush_tlb_segment(unsigned long addr) 252 + static inline void srmmu_flush_tlb_segment(unsigned long addr) 253 253 { 254 254 addr &= SRMMU_REAL_PMD_MASK; 255 255 __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : ··· 258 258 259 259 } 260 260 261 - extern __inline__ void srmmu_flush_tlb_page(unsigned long page) 261 + static inline void srmmu_flush_tlb_page(unsigned long page) 262 262 { 263 263 page &= PAGE_MASK; 264 264 __asm__ __volatile__("sta %%g0, [%0] %1\n\t": : ··· 267 267 268 268 } 269 269 270 - extern __inline__ unsigned long srmmu_hwprobe(unsigned long vaddr) 270 + static inline unsigned long srmmu_hwprobe(unsigned long vaddr) 271 271 { 272 272 unsigned long retval; 273 273 ··· 279 279 return retval; 280 280 } 281 281 282 - extern __inline__ int 282 + static inline int 283 283 srmmu_get_pte (unsigned long addr) 284 284 { 285 285 register unsigned long entry;
+1 -1
include/asm-sparc/processor.h
··· 79 79 extern unsigned long thread_saved_pc(struct task_struct *t); 80 80 81 81 /* Do necessary setup to start up a newly executed thread. */ 82 - extern __inline__ void start_thread(struct pt_regs * regs, unsigned long pc, 82 + static inline void start_thread(struct pt_regs * regs, unsigned long pc, 83 83 unsigned long sp) 84 84 { 85 85 register unsigned long zero asm("g1");
+3 -3
include/asm-sparc/psr.h
··· 38 38 39 39 #ifndef __ASSEMBLY__ 40 40 /* Get the %psr register. */ 41 - extern __inline__ unsigned int get_psr(void) 41 + static inline unsigned int get_psr(void) 42 42 { 43 43 unsigned int psr; 44 44 __asm__ __volatile__( ··· 53 53 return psr; 54 54 } 55 55 56 - extern __inline__ void put_psr(unsigned int new_psr) 56 + static inline void put_psr(unsigned int new_psr) 57 57 { 58 58 __asm__ __volatile__( 59 59 "wr %0, 0x0, %%psr\n\t" ··· 72 72 73 73 extern unsigned int fsr_storage; 74 74 75 - extern __inline__ unsigned int get_fsr(void) 75 + static inline unsigned int get_fsr(void) 76 76 { 77 77 unsigned int fsr = 0; 78 78
+5 -5
include/asm-sparc/sbi.h
··· 65 65 66 66 #ifndef __ASSEMBLY__ 67 67 68 - extern __inline__ int acquire_sbi(int devid, int mask) 68 + static inline int acquire_sbi(int devid, int mask) 69 69 { 70 70 __asm__ __volatile__ ("swapa [%2] %3, %0" : 71 71 "=r" (mask) : ··· 75 75 return mask; 76 76 } 77 77 78 - extern __inline__ void release_sbi(int devid, int mask) 78 + static inline void release_sbi(int devid, int mask) 79 79 { 80 80 __asm__ __volatile__ ("sta %0, [%1] %2" : : 81 81 "r" (mask), ··· 83 83 "i" (ASI_M_CTL)); 84 84 } 85 85 86 - extern __inline__ void set_sbi_tid(int devid, int targetid) 86 + static inline void set_sbi_tid(int devid, int targetid) 87 87 { 88 88 __asm__ __volatile__ ("sta %0, [%1] %2" : : 89 89 "r" (targetid), ··· 91 91 "i" (ASI_M_CTL)); 92 92 } 93 93 94 - extern __inline__ int get_sbi_ctl(int devid, int cfgno) 94 + static inline int get_sbi_ctl(int devid, int cfgno) 95 95 { 96 96 int cfg; 97 97 ··· 102 102 return cfg; 103 103 } 104 104 105 - extern __inline__ void set_sbi_ctl(int devid, int cfgno, int cfg) 105 + static inline void set_sbi_ctl(int devid, int cfgno, int cfg) 106 106 { 107 107 __asm__ __volatile__ ("sta %0, [%1] %2" : : 108 108 "r" (cfg),
+3 -3
include/asm-sparc/sbus.h
··· 28 28 * numbers + offsets, and vice versa. 29 29 */ 30 30 31 - extern __inline__ unsigned long sbus_devaddr(int slotnum, unsigned long offset) 31 + static inline unsigned long sbus_devaddr(int slotnum, unsigned long offset) 32 32 { 33 33 return (unsigned long) (SUN_SBUS_BVADDR+((slotnum)<<25)+(offset)); 34 34 } 35 35 36 - extern __inline__ int sbus_dev_slot(unsigned long dev_addr) 36 + static inline int sbus_dev_slot(unsigned long dev_addr) 37 37 { 38 38 return (int) (((dev_addr)-SUN_SBUS_BVADDR)>>25); 39 39 } ··· 80 80 81 81 extern struct sbus_bus *sbus_root; 82 82 83 - extern __inline__ int 83 + static inline int 84 84 sbus_is_slave(struct sbus_dev *dev) 85 85 { 86 86 /* XXX Have to write this for sun4c's */
+13 -13
include/asm-sparc/smp.h
··· 60 60 #define smp_cross_call(func,arg1,arg2,arg3,arg4,arg5) BTFIXUP_CALL(smp_cross_call)(func,arg1,arg2,arg3,arg4,arg5) 61 61 #define smp_message_pass(target,msg,data,wait) BTFIXUP_CALL(smp_message_pass)(target,msg,data,wait) 62 62 63 - extern __inline__ void xc0(smpfunc_t func) { smp_cross_call(func, 0, 0, 0, 0, 0); } 64 - extern __inline__ void xc1(smpfunc_t func, unsigned long arg1) 63 + static inline void xc0(smpfunc_t func) { smp_cross_call(func, 0, 0, 0, 0, 0); } 64 + static inline void xc1(smpfunc_t func, unsigned long arg1) 65 65 { smp_cross_call(func, arg1, 0, 0, 0, 0); } 66 - extern __inline__ void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) 66 + static inline void xc2(smpfunc_t func, unsigned long arg1, unsigned long arg2) 67 67 { smp_cross_call(func, arg1, arg2, 0, 0, 0); } 68 - extern __inline__ void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, 68 + static inline void xc3(smpfunc_t func, unsigned long arg1, unsigned long arg2, 69 69 unsigned long arg3) 70 70 { smp_cross_call(func, arg1, arg2, arg3, 0, 0); } 71 - extern __inline__ void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, 71 + static inline void xc4(smpfunc_t func, unsigned long arg1, unsigned long arg2, 72 72 unsigned long arg3, unsigned long arg4) 73 73 { smp_cross_call(func, arg1, arg2, arg3, arg4, 0); } 74 - extern __inline__ void xc5(smpfunc_t func, unsigned long arg1, unsigned long arg2, 74 + static inline void xc5(smpfunc_t func, unsigned long arg1, unsigned long arg2, 75 75 unsigned long arg3, unsigned long arg4, unsigned long arg5) 76 76 { smp_cross_call(func, arg1, arg2, arg3, arg4, arg5); } 77 77 78 - extern __inline__ int smp_call_function(void (*func)(void *info), void *info, int nonatomic, int wait) 78 + static inline int smp_call_function(void (*func)(void *info), void *info, int nonatomic, int wait) 79 79 { 80 80 xc1((smpfunc_t)func, (unsigned long)info); 81 81 return 0; ··· 84 84 extern __volatile__ int __cpu_number_map[NR_CPUS]; 85 85 extern __volatile__ int __cpu_logical_map[NR_CPUS]; 86 86 87 - extern __inline__ int cpu_logical_map(int cpu) 87 + static inline int cpu_logical_map(int cpu) 88 88 { 89 89 return __cpu_logical_map[cpu]; 90 90 } 91 - extern __inline__ int cpu_number_map(int cpu) 91 + static inline int cpu_number_map(int cpu) 92 92 { 93 93 return __cpu_number_map[cpu]; 94 94 } 95 95 96 - extern __inline__ int hard_smp4m_processor_id(void) 96 + static inline int hard_smp4m_processor_id(void) 97 97 { 98 98 int cpuid; 99 99 ··· 104 104 return cpuid; 105 105 } 106 106 107 - extern __inline__ int hard_smp4d_processor_id(void) 107 + static inline int hard_smp4d_processor_id(void) 108 108 { 109 109 int cpuid; 110 110 ··· 114 114 } 115 115 116 116 #ifndef MODULE 117 - extern __inline__ int hard_smp_processor_id(void) 117 + static inline int hard_smp_processor_id(void) 118 118 { 119 119 int cpuid; 120 120 ··· 136 136 return cpuid; 137 137 } 138 138 #else 139 - extern __inline__ int hard_smp_processor_id(void) 139 + static inline int hard_smp_processor_id(void) 140 140 { 141 141 int cpuid; 142 142
+4 -4
include/asm-sparc/smpprim.h
··· 15 15 * atomic. 16 16 */ 17 17 18 - extern __inline__ __volatile__ char test_and_set(void *addr) 18 + static inline __volatile__ char test_and_set(void *addr) 19 19 { 20 20 char state = 0; 21 21 ··· 27 27 } 28 28 29 29 /* Initialize a spin-lock. */ 30 - extern __inline__ __volatile__ smp_initlock(void *spinlock) 30 + static inline __volatile__ smp_initlock(void *spinlock) 31 31 { 32 32 /* Unset the lock. */ 33 33 *((unsigned char *) spinlock) = 0; ··· 36 36 } 37 37 38 38 /* This routine spins until it acquires the lock at ADDR. */ 39 - extern __inline__ __volatile__ smp_lock(void *addr) 39 + static inline __volatile__ smp_lock(void *addr) 40 40 { 41 41 while(test_and_set(addr) == 0xff) 42 42 ; ··· 46 46 } 47 47 48 48 /* This routine releases the lock at ADDR. */ 49 - extern __inline__ __volatile__ smp_unlock(void *addr) 49 + static inline __volatile__ smp_unlock(void *addr) 50 50 { 51 51 *((unsigned char *) addr) = 0; 52 52 }
+5 -5
include/asm-sparc/spinlock.h
··· 17 17 #define __raw_spin_unlock_wait(lock) \ 18 18 do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) 19 19 20 - extern __inline__ void __raw_spin_lock(raw_spinlock_t *lock) 20 + static inline void __raw_spin_lock(raw_spinlock_t *lock) 21 21 { 22 22 __asm__ __volatile__( 23 23 "\n1:\n\t" ··· 37 37 : "g2", "memory", "cc"); 38 38 } 39 39 40 - extern __inline__ int __raw_spin_trylock(raw_spinlock_t *lock) 40 + static inline int __raw_spin_trylock(raw_spinlock_t *lock) 41 41 { 42 42 unsigned int result; 43 43 __asm__ __volatile__("ldstub [%1], %0" ··· 47 47 return (result == 0); 48 48 } 49 49 50 - extern __inline__ void __raw_spin_unlock(raw_spinlock_t *lock) 50 + static inline void __raw_spin_unlock(raw_spinlock_t *lock) 51 51 { 52 52 __asm__ __volatile__("stb %%g0, [%0]" : : "r" (lock) : "memory"); 53 53 } ··· 78 78 * 79 79 * Unfortunately this scheme limits us to ~16,000,000 cpus. 80 80 */ 81 - extern __inline__ void __read_lock(raw_rwlock_t *rw) 81 + static inline void __read_lock(raw_rwlock_t *rw) 82 82 { 83 83 register raw_rwlock_t *lp asm("g1"); 84 84 lp = rw; ··· 98 98 local_irq_restore(flags); \ 99 99 } while(0) 100 100 101 - extern __inline__ void __read_unlock(raw_rwlock_t *rw) 101 + static inline void __read_unlock(raw_rwlock_t *rw) 102 102 { 103 103 register raw_rwlock_t *lp asm("g1"); 104 104 lp = rw;
+1 -1
include/asm-sparc/system.h
··· 204 204 BTFIXUPDEF_CALL(void, ___xchg32, void) 205 205 #endif 206 206 207 - extern __inline__ unsigned long xchg_u32(__volatile__ unsigned long *m, unsigned long val) 207 + static inline unsigned long xchg_u32(__volatile__ unsigned long *m, unsigned long val) 208 208 { 209 209 #ifdef CONFIG_SMP 210 210 __asm__ __volatile__("swap [%2], %0"
+1 -1
include/asm-sparc/traps.h
··· 22 22 /* We set this to _start in system setup. */ 23 23 extern struct tt_entry *sparc_ttable; 24 24 25 - extern __inline__ unsigned long get_tbr(void) 25 + static inline unsigned long get_tbr(void) 26 26 { 27 27 unsigned long tbr; 28 28
+10 -13
include/asm-um/processor-generic.h
··· 13 13 #include "linux/config.h" 14 14 #include "asm/ptrace.h" 15 15 #include "choose-mode.h" 16 + #include "registers.h" 16 17 17 18 struct mm_struct; 18 19 ··· 137 136 #define current_cpu_data boot_cpu_data 138 137 #endif 139 138 140 - #define KSTK_EIP(tsk) (PT_REGS_IP(&tsk->thread.regs)) 141 - #define KSTK_ESP(tsk) (PT_REGS_SP(&tsk->thread.regs)) 139 + 140 + #ifdef CONFIG_MODE_SKAS 141 + #define KSTK_REG(tsk, reg) \ 142 + ({ union uml_pt_regs regs; \ 143 + get_thread_regs(&regs, tsk->thread.mode.skas.switch_buf); \ 144 + UPT_REG(&regs, reg); }) 145 + #else 146 + #define KSTK_REG(tsk, reg) (0xbadbabe) 147 + #endif 142 148 #define get_wchan(p) (0) 143 149 144 150 #endif 145 - 146 - /* 147 - * Overrides for Emacs so that we follow Linus's tabbing style. 148 - * Emacs will notice this stuff at the end of the file and automatically 149 - * adjust the settings for this buffer only. This must remain at the end 150 - * of the file. 151 - * --------------------------------------------------------------------------- 152 - * Local variables: 153 - * c-file-style: "linux" 154 - * End: 155 - */
+4 -11
include/asm-um/processor-i386.h
··· 43 43 #define ARCH_IS_STACKGROW(address) \ 44 44 (address + 32 >= UPT_SP(&current->thread.regs.regs)) 45 45 46 + #define KSTK_EIP(tsk) KSTK_REG(tsk, EIP) 47 + #define KSTK_ESP(tsk) KSTK_REG(tsk, UESP) 48 + #define KSTK_EBP(tsk) KSTK_REG(tsk, EBP) 49 + 46 50 #include "asm/processor-generic.h" 47 51 48 52 #endif 49 - 50 - /* 51 - * Overrides for Emacs so that we follow Linus's tabbing style. 52 - * Emacs will notice this stuff at the end of the file and automatically 53 - * adjust the settings for this buffer only. This must remain at the end 54 - * of the file. 55 - * --------------------------------------------------------------------------- 56 - * Local variables: 57 - * c-file-style: "linux" 58 - * End: 59 - */
+3 -11
include/asm-um/processor-x86_64.h
··· 36 36 #define ARCH_IS_STACKGROW(address) \ 37 37 (address + 128 >= UPT_SP(&current->thread.regs.regs)) 38 38 39 + #define KSTK_EIP(tsk) KSTK_REG(tsk, RIP) 40 + #define KSTK_ESP(tsk) KSTK_REG(tsk, RSP) 41 + 39 42 #include "asm/processor-generic.h" 40 43 41 44 #endif 42 - 43 - /* 44 - * Overrides for Emacs so that we follow Linus's tabbing style. 45 - * Emacs will notice this stuff at the end of the file and automatically 46 - * adjust the settings for this buffer only. This must remain at the end 47 - * of the file. 48 - * --------------------------------------------------------------------------- 49 - * Local variables: 50 - * c-file-style: "linux" 51 - * End: 52 - */
+21 -21
include/linux/bfs_fs.h
··· 20 20 21 21 /* BFS inode layout on disk */ 22 22 struct bfs_inode { 23 - __u16 i_ino; 23 + __le16 i_ino; 24 24 __u16 i_unused; 25 - __u32 i_sblock; 26 - __u32 i_eblock; 27 - __u32 i_eoffset; 28 - __u32 i_vtype; 29 - __u32 i_mode; 30 - __s32 i_uid; 31 - __s32 i_gid; 32 - __u32 i_nlink; 33 - __u32 i_atime; 34 - __u32 i_mtime; 35 - __u32 i_ctime; 25 + __le32 i_sblock; 26 + __le32 i_eblock; 27 + __le32 i_eoffset; 28 + __le32 i_vtype; 29 + __le32 i_mode; 30 + __le32 i_uid; 31 + __le32 i_gid; 32 + __le32 i_nlink; 33 + __le32 i_atime; 34 + __le32 i_mtime; 35 + __le32 i_ctime; 36 36 __u32 i_padding[4]; 37 37 }; 38 38 ··· 41 41 #define BFS_DIRS_PER_BLOCK 32 42 42 43 43 struct bfs_dirent { 44 - __u16 ino; 44 + __le16 ino; 45 45 char name[BFS_NAMELEN]; 46 46 }; 47 47 48 48 /* BFS superblock layout on disk */ 49 49 struct bfs_super_block { 50 - __u32 s_magic; 51 - __u32 s_start; 52 - __u32 s_end; 53 - __s32 s_from; 54 - __s32 s_to; 50 + __le32 s_magic; 51 + __le32 s_start; 52 + __le32 s_end; 53 + __le32 s_from; 54 + __le32 s_to; 55 55 __s32 s_bfrom; 56 56 __s32 s_bto; 57 57 char s_fsname[6]; ··· 66 66 #define BFS_INO2OFF(ino) \ 67 67 ((__u32)(((ino) - BFS_ROOT_INO) * sizeof(struct bfs_inode)) + BFS_BSIZE) 68 68 #define BFS_NZFILESIZE(ip) \ 69 - ((cpu_to_le32((ip)->i_eoffset) + 1) - cpu_to_le32((ip)->i_sblock) * BFS_BSIZE) 69 + ((le32_to_cpu((ip)->i_eoffset) + 1) - le32_to_cpu((ip)->i_sblock) * BFS_BSIZE) 70 70 71 71 #define BFS_FILESIZE(ip) \ 72 72 ((ip)->i_sblock == 0 ? 0 : BFS_NZFILESIZE(ip)) 73 73 74 74 #define BFS_FILEBLOCKS(ip) \ 75 - ((ip)->i_sblock == 0 ? 0 : (cpu_to_le32((ip)->i_eblock) + 1) - cpu_to_le32((ip)->i_sblock)) 75 + ((ip)->i_sblock == 0 ? 0 : (le32_to_cpu((ip)->i_eblock) + 1) - le32_to_cpu((ip)->i_sblock)) 76 76 #define BFS_UNCLEAN(bfs_sb, sb) \ 77 - ((cpu_to_le32(bfs_sb->s_from) != -1) && (cpu_to_le32(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY)) 77 + ((le32_to_cpu(bfs_sb->s_from) != -1) && (le32_to_cpu(bfs_sb->s_to) != -1) && !(sb->s_flags & MS_RDONLY)) 78 78 79 79 80 80 #endif /* _LINUX_BFS_FS_H */
+21 -2
net/ipv4/fib_trie.c
··· 286 286 287 287 static int halve_threshold = 25; 288 288 static int inflate_threshold = 50; 289 + static int halve_threshold_root = 15; 290 + static int inflate_threshold_root = 25; 289 291 290 292 291 293 static void __alias_free_mem(struct rcu_head *head) ··· 451 449 int i; 452 450 int err = 0; 453 451 struct tnode *old_tn; 452 + int inflate_threshold_use; 453 + int halve_threshold_use; 454 454 455 455 if (!tn) 456 456 return NULL; ··· 545 541 546 542 check_tnode(tn); 547 543 544 + /* Keep root node larger */ 545 + 546 + if(!tn->parent) 547 + inflate_threshold_use = inflate_threshold_root; 548 + else 549 + inflate_threshold_use = inflate_threshold; 550 + 548 551 err = 0; 549 552 while ((tn->full_children > 0 && 550 553 50 * (tn->full_children + tnode_child_length(tn) - tn->empty_children) >= 551 - inflate_threshold * tnode_child_length(tn))) { 554 + inflate_threshold_use * tnode_child_length(tn))) { 552 555 553 556 old_tn = tn; 554 557 tn = inflate(t, tn); ··· 575 564 * node is above threshold. 576 565 */ 577 566 567 + 568 + /* Keep root node larger */ 569 + 570 + if(!tn->parent) 571 + halve_threshold_use = halve_threshold_root; 572 + else 573 + halve_threshold_use = halve_threshold; 574 + 578 575 err = 0; 579 576 while (tn->bits > 1 && 580 577 100 * (tnode_child_length(tn) - tn->empty_children) < 581 - halve_threshold * tnode_child_length(tn)) { 578 + halve_threshold_use * tnode_child_length(tn)) { 582 579 583 580 old_tn = tn; 584 581 tn = halve(t, tn);
+3 -1
net/ipv6/udp.c
··· 99 99 next:; 100 100 } 101 101 result = best; 102 - for(;; result += UDP_HTABLE_SIZE) { 102 + for(i = 0; i < (1 << 16) / UDP_HTABLE_SIZE; i++, result += UDP_HTABLE_SIZE) { 103 103 if (result > sysctl_local_port_range[1]) 104 104 result = sysctl_local_port_range[0] 105 105 + ((result - sysctl_local_port_range[0]) & ··· 107 107 if (!udp_lport_inuse(result)) 108 108 break; 109 109 } 110 + if (i >= (1 << 16) / UDP_HTABLE_SIZE) 111 + goto fail; 110 112 gotit: 111 113 udp_port_rover = snum = result; 112 114 } else {