M68k extern inline
Geert Uytterhoeven
maintainerPATCH 1/1 M68k extern inline
M68k core: Replace (variants of) extern inline' by static inline'
arch/m68k/kernel/traps.c +1 -1
@@ -447,7 +448,7 @@/* sun3 version of bus_error030 */ -extern inline void bus_error030 (struct frame *fp) +static inline void bus_error030 (struct frame *fp) {unsigned char buserr_type =sun3_get_buserr ();unsigned long addr, errorcode;
arch/m68k/math-emu/multi_arith.h +42 -45
301 lines not on this page · raw message
include/asm-m68k/atariints.h +4 -4
@@ -180,14 +180,14 @@* "stored" */ -extern inline void atari_turnon_irq (unsigned irq ) +static inline void atari_turnon_irq (unsigned irq ) {if (irq <STMFP_SOURCE_BASE || irq >=SCC_SOURCE_BASE )return ;set_mfp_bit ( irq,MFP_ENABLE ); } -extern inline void atari_turnoff_irq (unsigned irq ) +static inline void atari_turnoff_irq (unsigned irq ) {if (irq <STMFP_SOURCE_BASE || irq >=SCC_SOURCE_BASE )return ;
@@ -195,14 +195,14 @@clear_mfp_bit ( irq,MFP_PENDING ); } -extern inline void atari_clear_pending_irq (unsigned irq ) +static inline void atari_clear_pending_irq (unsigned irq ) {if (irq <STMFP_SOURCE_BASE || irq >=SCC_SOURCE_BASE )return ;clear_mfp_bit ( irq,MFP_PENDING ); } -extern inline int atari_irq_pending (unsigned irq ) +static inline int atari_irq_pending (unsigned irq ) {if (irq <STMFP_SOURCE_BASE || irq >=SCC_SOURCE_BASE )return (0 );
include/asm-m68k/bitops.h +34 -36
212 lines not on this page · raw message
include/asm-m68k/cacheflush.h +4 -4
@@ -83,7 +83,7 @@#define flush_cache_vmap (start, end) flush_cache_all()#define flush_cache_vunmap (start, end) flush_cache_all() -extern inline void flush_cache_mm (struct mm_struct *mm) +static inline void flush_cache_mm (struct mm_struct *mm) {if (mm == current->mm)__flush_cache_030 ();
@@ -91,7 +91,7 @@/* flush_cache_range/flush_cache_page must be macros to avoid a dependency on linux/mm.h, which includes this file... */ -extern inline void flush_cache_range (struct vm_area_struct *vma, +static inline void flush_cache_range (struct vm_area_struct *vma,unsigned long start,unsigned long end) {
@@ -99,7 +99,7 @@__flush_cache_030 (); } -extern inline void flush_cache_page (struct vm_area_struct *vma, +static inline void flush_cache_page (struct vm_area_struct *vma,unsigned long vmaddr) {if (vma->vm_mm == current->mm)
@@ -109,7 +109,7 @@/* Push the page at kernel virtual address and clear the icache */ /* RZ: use cpush %bc instead of cpush %dc, cinv %ic */ -extern inline void __flush_page_to_ram (void *vaddr) +static inline void __flush_page_to_ram (void *vaddr) {if (CPU_IS_040_OR_060 ) { __asm__ __volatile__("nop\n\t"
include/asm-m68k/delay.h +3 -2
@@ -9,7 +9,7 @@* Delay routines, using a pre-computed "loops_per_jiffy" value. */ -extern __inline__void __delay (unsigned long loops) +static inline void __delay (unsigned long loops) { __asm__ __volatile__ ("1: subql #1,%0; jcc 1b" :"=d" (loops) :"0" (loops));
@@ -43,7 +43,8 @@ ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 4295)) : \ __udelay(n)) -extern __inline__unsigned long muldiv (unsigned long a,unsigned long b,unsigned long c) +static inline unsigned long muldiv (unsigned long a,unsigned long b, +unsigned long c) {unsigned long tmp;
include/asm-m68k/dvma.h +2 -1
@@ -58,7 +58,8 @@#define dvma_vtob (x) dvma_vtop(x)#define dvma_btov (x) dvma_ptov(x) -extern inline int dvma_map_cpu (unsigned long kaddr,unsigned long vaddr,int len) +static inline int dvma_map_cpu (unsigned long kaddr,unsigned long vaddr, +int len) {return 0 ; }
include/asm-m68k/io.h +4 -4
@@ -285,20 +285,20 @@#endif /* CONFIG_PCI */ -extern inline void *ioremap (unsigned long physaddr,unsigned long size) +static inline void *ioremap (unsigned long physaddr,unsigned long size) {return __ioremap (physaddr, size,IOMAP_NOCACHE_SER ); } -extern inline void *ioremap_nocache (unsigned long physaddr,unsigned long size) +static inline void *ioremap_nocache (unsigned long physaddr,unsigned long size) {return __ioremap (physaddr, size,IOMAP_NOCACHE_SER ); } -extern inline void *ioremap_writethrough (unsigned long physaddr, +static inline void *ioremap_writethrough (unsigned long physaddr,unsigned long size) {return __ioremap (physaddr, size,IOMAP_WRITETHROUGH ); } -extern inline void *ioremap_fullcache (unsigned long physaddr, +static inline void *ioremap_fullcache (unsigned long physaddr,unsigned long size) {return __ioremap (physaddr, size,IOMAP_FULL_CACHING );
include/asm-m68k/mac_psc.h +6 -6
@@ -215,32 +215,32 @@* Access functions */ -extern inline void psc_write_byte (int offset,__u8 data) +static inline void psc_write_byte (int offset,__u8 data) { *((volatile __u8 *)(psc + offset)) = data; } -extern inline void psc_write_word (int offset,__u16 data) +static inline void psc_write_word (int offset,__u16 data) { *((volatile __u16 *)(psc + offset)) = data; } -extern inline void psc_write_long (int offset,__u32 data) +static inline void psc_write_long (int offset,__u32 data) { *((volatile __u32 *)(psc + offset)) = data; } -extern inline u8 psc_read_byte (int offset) +static inline u8 psc_read_byte (int offset) {return *((volatile __u8 *)(psc + offset)); } -extern inline u16 psc_read_word (int offset) +static inline u16 psc_read_word (int offset) {return *((volatile __u16 *)(psc + offset)); } -extern inline u32 psc_read_long (int offset) +static inline u32 psc_read_long (int offset) {return *((volatile __u32 *)(psc + offset)); }
include/asm-m68k/mac_via.h +2 -1
@@ -255,7 +255,8 @@extern int rbv_present,via_alt_mapping;extern __u8 rbv_clear; -extern __inline__int rbv_set_video_bpp (int bpp) { +static inline int rbv_set_video_bpp (int bpp) +{char val = (bpp==1 )?0 :(bpp==2 )?1 :(bpp==4 )?2 :(bpp==8 )?3 :-1 ;if (!rbv_present || val<0 )return -1 ; via2[rMonP] = (via2[rMonP] & ~RBV_DEPTH ) | val;
include/asm-m68k/mmu_context.h +6 -6
@@ -13,8 +13,8 @@#include <asm/page.h> #include <asm/pgalloc.h> -extern inline int -init_new_context (struct task_struct *tsk,struct mm_struct *mm) +static inline int init_new_context (struct task_struct *tsk, +struct mm_struct *mm) { mm->context =virt_to_phys (mm->pgd);return 0 ;
@@ -22,7 +22,7 @@#define destroy_context (mm) do { } while(0) -extern inline void switch_mm_0230 (struct mm_struct *mm) +static inline void switch_mm_0230 (struct mm_struct *mm) {unsigned long crp[2 ] = {0x80000000 | _PAGE_TABLE, mm->context
@@ -55,7 +55,7 @@ asmvolatile (".chip 68k" ); } -extern inline void switch_mm_0460 (struct mm_struct *mm) +static inline void switch_mm_0460 (struct mm_struct *mm) { asmvolatile (".chip 68040" );
@@ -91,7 +91,7 @@#define deactivate_mm (tsk,mm) do { } while (0) -extern inline void activate_mm (struct mm_struct *prev_mm, +static inline void activate_mm (struct mm_struct *prev_mm,struct mm_struct *next_mm) { next_mm->context =virt_to_phys (next_mm->pgd);
@@ -144,7 +144,7 @@#define deactivate_mm (tsk,mm) do { } while (0) -extern inline void activate_mm (struct mm_struct *prev_mm, +static inline void activate_mm (struct mm_struct *prev_mm,struct mm_struct *next_mm) {activate_context (next_mm);
include/asm-m68k/motorola_pgtable.h +35 -26
109 lines not on this page · raw message
include/asm-m68k/nubus.h +4 -4
@@ -15,25 +15,25 @@#define nubus_memcpy_fromio (a,b,c) memcpy((a),(void *)(b),(c))#define nubus_memcpy_toio (a,b,c) memcpy((void *)(a),(b),(c)) -extern inline void *nubus_remap_nocache_ser (unsigned long physaddr, +static inline void *nubus_remap_nocache_ser (unsigned long physaddr,unsigned long size) {return __ioremap (physaddr, size,IOMAP_NOCACHE_SER ); } -extern inline void *nubus_remap_nocache_nonser (unsigned long physaddr, +static inline void *nubus_remap_nocache_nonser (unsigned long physaddr,unsigned long size) {return __ioremap (physaddr, size,IOMAP_NOCACHE_NONSER ); } -extern inline void *nbus_remap_writethrough (unsigned long physaddr, +static inline void *nbus_remap_writethrough (unsigned long physaddr,unsigned long size) {return __ioremap (physaddr, size,IOMAP_WRITETHROUGH ); } -extern inline void *nubus_remap_fullcache (unsigned long physaddr, +static inline void *nubus_remap_fullcache (unsigned long physaddr,unsigned long size) {return __ioremap (physaddr, size,IOMAP_FULL_CACHING );
include/asm-m68k/page.h +1 -1
@@ -110,7 +110,7 @@#define PAGE_ALIGN (addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)/* Pure 2^n version of get_order */ -extern __inline__int get_order (unsigned long size) +static inline int get_order (unsigned long size) {int order;
include/asm-m68k/pci.h +2 -2
@@ -37,12 +37,12 @@#define pcibios_assign_all_busses () 0 -extern inline void pcibios_set_master (struct pci_dev *dev) +static inline void pcibios_set_master (struct pci_dev *dev) {/* No special bus mastering setup handling */ } -extern inline void pcibios_penalize_isa_irq (int irq) +static inline void pcibios_penalize_isa_irq (int irq) {/* We don't do dynamic PCI IRQ allocation */ }
include/asm-m68k/pgtable.h +3 -3
@@ -114,7 +114,7 @@* It makes no sense to consider whether we cross a memory boundary if * we support just one physical chunk of memory. */ -extern inline int mm_end_of_chunk (unsigned long addr,int len) +static inline int mm_end_of_chunk (unsigned long addr,int len) {return 0 ; }
@@ -129,8 +129,8 @@* tables contain all the necessary information. The Sun3 does, but * they are updated on demand. */ -extern inline void update_mmu_cache (struct vm_area_struct * vma, -unsigned long address,pte_t pte) +static inline void update_mmu_cache (struct vm_area_struct *vma, +unsigned long address,pte_t pte) { }
include/asm-m68k/processor.h +5 -3
@@ -19,14 +19,16 @@#include <asm/fpu.h> #include <asm/ptrace.h> -extern inline unsigned long rdusp (void ) { -unsigned long usp; +static inline unsigned long rdusp (void ) +{ +unsigned long usp; __asm__ __volatile__("move %/usp,%0" :"=a" (usp));return usp; } -extern inline void wrusp (unsigned long usp) { +static inline void wrusp (unsigned long usp) +{ __asm__ __volatile__("move %0,%/usp" : :"a" (usp)); }
include/asm-m68k/sbus.h +3 -3
@@ -20,17 +20,17 @@/* sbus IO functions stolen from include/asm-sparc/io.h for the serial driver */ /* No SBUS on the Sun3, kludge -- sam */ -extern inline void _sbus_writeb (unsigned char val,unsigned long addr) +static inline void _sbus_writeb (unsigned char val,unsigned long addr) { *(volatile unsigned char *)addr = val; } -extern inline unsigned char _sbus_readb (unsigned long addr) +static inline unsigned char _sbus_readb (unsigned long addr) {return *(volatile unsigned char *)addr; } -extern inline void _sbus_writel (unsigned long val,unsigned long addr) +static inline void _sbus_writel (unsigned long val,unsigned long addr) { *(volatile unsigned long *)addr = val;
include/asm-m68k/semaphore.h +5 -5
@@ -52,7 +52,7 @@#define DECLARE_MUTEX (name) __DECLARE_SEMAPHORE_GENERIC(name,1)#define DECLARE_MUTEX_LOCKED (name) __DECLARE_SEMAPHORE_GENERIC(name,0) -extern inline void sema_init (struct semaphore *sem,int val) +static inline void sema_init (struct semaphore *sem,int val) { *sem = (struct semaphore )__SEMAPHORE_INITIALIZER (*sem, val); }
@@ -82,7 +82,7 @@* "down_failed" is a special asm handler that calls the C * routine that actually waits. See arch/m68k/lib/semaphore.S */ -extern inline void down (struct semaphore * sem) +static inline void down (struct semaphore *sem) { register struct semaphore *sem1 __asm__ ("%a1") = sem;
@@ -104,7 +104,7 @@ : "memory"); } -extern inline int down_interruptible (struct semaphore * sem) +static inline int down_interruptible (struct semaphore *sem) { register struct semaphore *sem1 __asm__ ("%a1") = sem; registerint result __asm__ ("%d0" );
@@ -129,7 +129,7 @@return result; } -extern inline int down_trylock (struct semaphore * sem) +static inline int down_trylock (struct semaphore *sem) { register struct semaphore *sem1 __asm__ ("%a1") = sem; registerint result __asm__ ("%d0" );
@@ -160,7 +160,7 @@* The default case (no contention) will result in NO * jumps for both down() and up(). */ -extern inline void up (struct semaphore * sem) +static inline void up (struct semaphore *sem) { register struct semaphore *sem1 __asm__ ("%a1") = sem;
include/asm-m68k/signal.h +5 -5
@@ -176,25 +176,25 @@#define __HAVE_ARCH_SIG_BITOPS -extern __inline__void sigaddset (sigset_t *set,int _sig) +static inline void sigaddset (sigset_t *set,int _sig) { __asm__("bfset %0{%1,#1}" :"=m" (*set) :"id" ((_sig -1 ) ^31 ) :"cc" ); } -extern __inline__void sigdelset (sigset_t *set,int _sig) +static inline void sigdelset (sigset_t *set,int _sig) { __asm__("bfclr %0{%1,#1}" :"=m" (*set) :"id" ((_sig -1 ) ^31 ) :"cc" ); } -extern __inline__int __const_sigismember (sigset_t *set,int _sig) +static inline int __const_sigismember (sigset_t *set,int _sig) {unsigned long sig = _sig -1 ;return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW)); } -extern __inline__int __gen_sigismember (sigset_t *set,int _sig) +static inline int __gen_sigismember (sigset_t *set,int _sig) {int ret; __asm__("bfextu %1{%2,#1},%0"
@@ -207,7 +207,7 @@ __const_sigismember(set,sig) : \ __gen_sigismember(set,sig)) -extern __inline__int sigfindinword (unsigned long word) +static inline int sigfindinword (unsigned long word) { __asm__("bfffo %1{#0,#0},%0" :"=d" (word) :"d" (word & -word) :"cc" );return word ^31 ;
include/asm-m68k/string.h +3 -2
@@ -82,7 +82,7 @@#if 0 #define __HAVE_ARCH_STRPBRK -extern inline char *strpbrk (const char * cs,const char * ct) +static inline char *strpbrk (const char *cs,const char *ct) {const char *sc1,*sc2;
@@ -530,7 +530,8 @@ memcmp((cs),(ct),(n)))#define __HAVE_ARCH_MEMCHR -extern inline void *memchr (const void * cs,int c,size_t count) { +static inline void *memchr (const void *cs,int c,size_t count) +{/* Someone else can optimize this, I don't care - [email protected] */ unsigned char *ret = (unsigned char *)cs;for (;count>0 ;count--,ret++)
include/asm-m68k/sun3_pgtable.h +42 -37
119 lines not on this page · raw message
include/asm-m68k/sun3mmu.h +7 -7
@@ -69,7 +69,7 @@#ifndef __ASSEMBLY__/* Read bus error status register (implicitly clearing it). */ -extern __inline__unsigned char sun3_get_buserr (void ) +static inline unsigned char sun3_get_buserr (void ) {unsigned char sfc, c;
@@ -82,7 +82,7 @@ }/* Read segmap from hardware MMU. */ -extern __inline__unsigned long sun3_get_segmap (unsigned long addr) +static inline unsigned long sun3_get_segmap (unsigned long addr) { registerunsigned long entry;unsigned char c, sfc;
@@ -97,7 +97,7 @@ }/* Write segmap to hardware MMU. */ -extern __inline__void sun3_put_segmap (unsigned long addr,unsigned long entry) +static inline void sun3_put_segmap (unsigned long addr,unsigned long entry) {unsigned char sfc;
@@ -110,7 +110,7 @@ }/* Read PTE from hardware MMU. */ -extern __inline__unsigned long sun3_get_pte (unsigned long addr) +static inline unsigned long sun3_get_pte (unsigned long addr) { registerunsigned long entry;unsigned char sfc;
@@ -124,7 +124,7 @@ }/* Write PTE to hardware MMU. */ -extern __inline__void sun3_put_pte (unsigned long addr,unsigned long entry) +static inline void sun3_put_pte (unsigned long addr,unsigned long entry) {unsigned char sfc;
@@ -137,7 +137,7 @@ }/* get current context */ -extern __inline__unsigned char sun3_get_context (void ) +static inline unsigned char sun3_get_context (void ) {unsigned char sfc, c;
@@ -150,7 +150,7 @@ }/* set alternate context */ -extern __inline__void sun3_put_context (unsigned char c) +static inline void sun3_put_context (unsigned char c) {unsigned char dfc;GET_DFC (dfc);
include/asm-m68k/tlbflush.h +2 -2
@@ -87,7 +87,7 @@flush_tlb_all (); } -extern inline void flush_tlb_pgtables (struct mm_struct *mm, +static inline void flush_tlb_pgtables (struct mm_struct *mm,unsigned long start,unsigned long end) { }
@@ -214,7 +214,7 @@sun3_put_segmap (addr & ~(SUN3_PMEG_SIZE -1 ),SUN3_INVALID_PMEG ); } -extern inline void flush_tlb_pgtables (struct mm_struct *mm, +static inline void flush_tlb_pgtables (struct mm_struct *mm,unsigned long start,unsigned long end) { }
include/asm-m68k/uaccess.h +1 -1
@@ -14,7 +14,7 @@/* We let the MMU do all checking */ #define access_ok (type,addr,size) 1 -extern inline int verify_area (int type,const void * addr,unsigned long size) +static inline int verify_area (int type,const void *addr,unsigned long size) {return access_ok (type,addr,size)?0 :-EFAULT ; }
include/asm-m68k/virtconvert.h +2 -2
@@ -22,12 +22,12 @@extern unsigned long mm_vtop (unsigned long addr) __attribute__ ((const));extern unsigned long mm_ptov (unsigned long addr) __attribute__ ((const));#else -extern inline unsigned long mm_vtop (unsigned long vaddr) +static inline unsigned long mm_vtop (unsigned long vaddr) {return __pa (vaddr); } -extern inline unsigned long mm_ptov (unsigned long paddr) +static inline unsigned long mm_ptov (unsigned long paddr) {return (unsigned long )__va (paddr); }
include/asm-m68k/zorro.h +8 -8
@@ -15,25 +15,25 @@#define z_memcpy_fromio (a,b,c) memcpy((a),(void *)(b),(c))#define z_memcpy_toio (a,b,c) memcpy((void *)(a),(b),(c)) -extern inline void *z_remap_nocache_ser (unsigned long physaddr, -unsigned long size) +static inline void *z_remap_nocache_ser (unsigned long physaddr, +unsigned long size) {return __ioremap (physaddr, size,IOMAP_NOCACHE_SER ); } -extern inline void *z_remap_nocache_nonser (unsigned long physaddr, -unsigned long size) +static inline void *z_remap_nocache_nonser (unsigned long physaddr, +unsigned long size) {return __ioremap (physaddr, size,IOMAP_NOCACHE_NONSER ); } -extern inline void *z_remap_writethrough (unsigned long physaddr, -unsigned long size) +static inline void *z_remap_writethrough (unsigned long physaddr, +unsigned long size) {return __ioremap (physaddr, size,IOMAP_WRITETHROUGH ); } -extern inline void *z_remap_fullcache (unsigned long physaddr, -unsigned long size) +static inline void *z_remap_fullcache (unsigned long physaddr, +unsigned long size) {return __ioremap (physaddr, size,IOMAP_FULL_CACHING ); }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds