diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-m68k/checksum.h | 4 | ||||
| -rw-r--r-- | include/asm-m68k/dvma.h | 5 | ||||
| -rw-r--r-- | include/asm-m68k/floppy.h | 2 | ||||
| -rw-r--r-- | include/asm-m68k/hardirq.h | 81 | ||||
| -rw-r--r-- | include/asm-m68k/io.h | 12 | ||||
| -rw-r--r-- | include/asm-m68k/kmap_types.h | 21 | ||||
| -rw-r--r-- | include/asm-m68k/nubus.h | 2 | ||||
| -rw-r--r-- | include/asm-m68k/page.h | 1 | ||||
| -rw-r--r-- | include/asm-m68k/percpu.h | 6 | ||||
| -rw-r--r-- | include/asm-m68k/poll.h | 1 | ||||
| -rw-r--r-- | include/asm-m68k/q40_master.h | 30 | ||||
| -rw-r--r-- | include/asm-m68k/raw_io.h | 13 | ||||
| -rw-r--r-- | include/asm-m68k/rtc.h | 30 | ||||
| -rw-r--r-- | include/asm-m68k/softirq.h | 19 | ||||
| -rw-r--r-- | include/asm-m68k/sun3_pgalloc.h | 10 | ||||
| -rw-r--r-- | include/asm-m68k/sun3ints.h | 8 | ||||
| -rw-r--r-- | include/asm-m68k/sun3mmu.h | 4 | ||||
| -rw-r--r-- | include/asm-m68k/sun3xflop.h | 2 | ||||
| -rw-r--r-- | include/asm-m68k/system.h | 74 | ||||
| -rw-r--r-- | include/asm-m68k/thread_info.h | 10 | ||||
| -rw-r--r-- | include/asm-m68k/virtconvert.h | 30 | ||||
| -rw-r--r-- | include/asm-m68k/zorro.h | 2 | ||||
| -rw-r--r-- | include/linux/miscdevice.h | 4 | ||||
| -rw-r--r-- | include/linux/sem.h | 1 |
24 files changed, 241 insertions, 131 deletions
diff --git a/include/asm-m68k/checksum.h b/include/asm-m68k/checksum.h index f3fa10674a9e..25ef68a2109f 100644 --- a/include/asm-m68k/checksum.h +++ b/include/asm-m68k/checksum.h @@ -26,8 +26,8 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) extern unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *csum_err); -#define csum_partial_copy_nocheck(src, dst, len, sum) \ - csum_partial_copy((src), (dst), (len), (sum)) +extern unsigned int csum_partial_copy_nocheck(const char *src, char *dst, + int len, int sum); /* * This is a version of ip_compute_csum() optimized for IP headers, diff --git a/include/asm-m68k/dvma.h b/include/asm-m68k/dvma.h index f7a6dcfabc4e..7a1653507f82 100644 --- a/include/asm-m68k/dvma.h +++ b/include/asm-m68k/dvma.h @@ -22,7 +22,8 @@ extern int dvma_map_iommu(unsigned long kaddr, unsigned long baddr, #define dvma_malloc(x) dvma_malloc_align(x, 0) #define dvma_map(x, y) dvma_map_align(x, y, 0) - +#define dvma_map_vme(x, y) (dvma_map(x, y) & 0xfffff) +#define dvma_map_align_vme(x, y, z) (dvma_map_align (x, y, z) & 0xfffff) extern unsigned long dvma_map_align(unsigned long kaddr, int len, int align); extern void *dvma_malloc_align(unsigned long len, unsigned long align); @@ -52,6 +53,8 @@ extern void dvma_free(void *vaddr); /* virt <-> phys conversions */ #define dvma_vtop(x) ((unsigned long)(x) & 0xffffff) #define dvma_ptov(x) ((unsigned long)(x) | 0xf000000) +#define dvma_vtovme(x) ((unsigned long)(x) & 0x00fffff) +#define dvma_vmetov(x) ((unsigned long)(x) | 0xff00000) #define dvma_vtob(x) dvma_vtop(x) #define dvma_btov(x) dvma_ptov(x) diff --git a/include/asm-m68k/floppy.h b/include/asm-m68k/floppy.h index 57aac63d8892..1a9bb3b97a4f 100644 --- a/include/asm-m68k/floppy.h +++ b/include/asm-m68k/floppy.h @@ -9,7 +9,7 @@ * * Copyright (C) 1999, 2000, 2001 * - * Sun3x support added 2/4/2000 Sam Creasey (sammy@oh.verio.com) + * Sun3x support added 2/4/2000 Sam Creasey (sammy@sammy.net) * */ diff --git a/include/asm-m68k/hardirq.h b/include/asm-m68k/hardirq.h index 6b2248372f78..5a5db2a7718e 100644 --- a/include/asm-m68k/hardirq.h +++ b/include/asm-m68k/hardirq.h @@ -7,24 +7,87 @@ /* entry.S is sensitive to the offsets of these fields */ typedef struct { unsigned int __softirq_pending; - unsigned int __local_irq_count; - unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; } ____cacheline_aligned irq_cpustat_t; #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ -#define in_interrupt() (local_irq_count(smp_processor_id()) + local_bh_count(smp_processor_id()) != 0) +/* + * We put the hardirq and softirq counter into the preemption + * counter. The bitmask has the following meaning: + * + * - bits 0-7 are the preemption count (max preemption depth: 256) + * - bits 8-15 are the softirq count (max # of softirqs: 256) + * - bits 16-23 are the hardirq count (max # of hardirqs: 256) + * + * - ( bit 26 is the PREEMPT_ACTIVE flag. ) + * + * PREEMPT_MASK: 0x000000ff + * HARDIRQ_MASK: 0x0000ff00 + * SOFTIRQ_MASK: 0x00ff0000 + */ -#define in_irq() (local_irq_count(smp_processor_id()) != 0) +#define PREEMPT_BITS 8 +#define SOFTIRQ_BITS 8 +#define HARDIRQ_BITS 8 -#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0) -#define hardirq_endlock(cpu) do { } while (0) +#define PREEMPT_SHIFT 0 +#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) +#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) -#define irq_enter(cpu) (local_irq_count(cpu)++) -#define irq_exit(cpu) (local_irq_count(cpu)--) +#define __MASK(x) ((1UL << (x))-1) -#define synchronize_irq() barrier() +#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT) +#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT) +#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) + +#define hardirq_count() (preempt_count() & HARDIRQ_MASK) +#define softirq_count() (preempt_count() & SOFTIRQ_MASK) +#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK)) + +#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT) +#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT) +#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) + +/* + * The hardirq mask has to be large enough to have + * space for potentially all IRQ sources in the system + * nesting on a single CPU: + */ +#if (1 << HARDIRQ_BITS) < NR_IRQS +# error HARDIRQ_BITS is too low! +#endif + +/* + * Are we doing bottom half or hardware interrupt processing? + * Are we in a softirq context? Interrupt context? + */ +#define in_irq() (hardirq_count()) +#define in_softirq() (softirq_count()) +#define in_interrupt() (irq_count()) + + +#define hardirq_trylock() (!in_interrupt()) +#define hardirq_endlock() do { } while (0) + +#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) + +#if CONFIG_PREEMPT +# define in_atomic() (preempt_count() != kernel_locked()) +# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) +#else +# define in_atomic() (preempt_count() != 0) +# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET +#endif +#define irq_exit() \ +do { \ + preempt_count() -= IRQ_EXIT_OFFSET; \ + if (!in_interrupt() && softirq_pending(smp_processor_id())) \ + do_softirq(); \ + preempt_enable_no_resched(); \ +} while (0) + +#define synchronize_irq(irq) barrier() #endif diff --git a/include/asm-m68k/io.h b/include/asm-m68k/io.h index d6fb3074ab77..6acb7ffdde15 100644 --- a/include/asm-m68k/io.h +++ b/include/asm-m68k/io.h @@ -280,18 +280,6 @@ static inline void isa_delay(void) #endif /* CONFIG_PCI */ -/* Values for nocacheflag and cmode */ -#define IOMAP_FULL_CACHING 0 -#define IOMAP_NOCACHE_SER 1 -#define IOMAP_NOCACHE_NONSER 2 -#define IOMAP_WRITETHROUGH 3 - -extern void iounmap(void *addr); - -extern void *__ioremap(unsigned long physaddr, unsigned long size, - int cacheflag); -extern void __iounmap(void *addr, unsigned long size); - extern inline void *ioremap(unsigned long physaddr, unsigned long size) { return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); diff --git a/include/asm-m68k/kmap_types.h b/include/asm-m68k/kmap_types.h new file mode 100644 index 000000000000..3d43a7f936e8 --- /dev/null +++ b/include/asm-m68k/kmap_types.h @@ -0,0 +1,21 @@ +#ifndef __ASM_M68K_KMAP_TYPES_H +#define __ASM_M68K_KMAP_TYPES_H + +#include <linux/config.h> + +enum km_type { + KM_BOUNCE_READ, + KM_SKB_SUNRPC_DATA, + KM_SKB_DATA_SOFTIRQ, + KM_USER0, + KM_USER1, + KM_BIO_SRC_IRQ, + KM_BIO_DST_IRQ, + KM_PTE0, + KM_PTE1, + KM_IRQ0, + KM_IRQ1, + KM_TYPE_NR +}; + +#endif /* __ASM_M68K_KMAP_TYPES_H */ diff --git a/include/asm-m68k/nubus.h b/include/asm-m68k/nubus.h index b810d4c3bbe1..6f9ebbf07fc9 100644 --- a/include/asm-m68k/nubus.h +++ b/include/asm-m68k/nubus.h @@ -1,7 +1,7 @@ #ifndef _ASM_M68K_NUBUS_H #define _ASM_M68K_NUBUS_H -#include <asm/io.h> +#include <asm/raw_io.h> #define nubus_readb raw_inb #define nubus_readw raw_inw diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index be5a7869742a..7ca3578dfa8f 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h @@ -124,6 +124,7 @@ extern __inline__ int get_order(unsigned long size) #ifndef CONFIG_SUN3 +#define WANT_PAGE_VIRTUAL #ifdef CONFIG_SINGLE_MEMORY_CHUNK extern unsigned long m68k_memoffset; diff --git a/include/asm-m68k/percpu.h b/include/asm-m68k/percpu.h new file mode 100644 index 000000000000..0859d048faf5 --- /dev/null +++ b/include/asm-m68k/percpu.h @@ -0,0 +1,6 @@ +#ifndef __ASM_M68K_PERCPU_H +#define __ASM_M68K_PERCPU_H + +#include <asm-generic/percpu.h> + +#endif /* __ASM_M68K_PERCPU_H */ diff --git a/include/asm-m68k/poll.h b/include/asm-m68k/poll.h index 32dcf6490669..c4b69c4a87e1 100644 --- a/include/asm-m68k/poll.h +++ b/include/asm-m68k/poll.h @@ -12,6 +12,7 @@ #define POLLRDBAND 128 #define POLLWRBAND 256 #define POLLMSG 0x0400 +#define POLLREMOVE 0x1000 struct pollfd { int fd; diff --git a/include/asm-m68k/q40_master.h b/include/asm-m68k/q40_master.h index d44f30265717..9bce91505117 100644 --- a/include/asm-m68k/q40_master.h +++ b/include/asm-m68k/q40_master.h @@ -10,7 +10,6 @@ #define q40_master_addr 0xff000000 -#define q40_rtc_addr 0xff021ffc #define IIRQ_REG 0x0 /* internal IRQ reg */ #define EIRQ_REG 0x4 /* external ... */ @@ -43,28 +42,25 @@ #define master_inb(_reg_) in_8((unsigned char *)q40_master_addr+_reg_) #define master_outb(_b_,_reg_) out_8((unsigned char *)q40_master_addr+_reg_,_b_) - -/* define some Q40 specific ints */ -#include "q40ints.h" - /* RTC defines */ -#define Q40_RTC_BASE (q40_rtc_addr) - -#define RTC_YEAR (*(unsigned char *)(Q40_RTC_BASE+0)) -#define RTC_MNTH (*(unsigned char *)(Q40_RTC_BASE-4)) -#define RTC_DATE (*(unsigned char *)(Q40_RTC_BASE-8)) -#define RTC_DOW (*(unsigned char *)(Q40_RTC_BASE-12)) -#define RTC_HOUR (*(unsigned char *)(Q40_RTC_BASE-16)) -#define RTC_MINS (*(unsigned char *)(Q40_RTC_BASE-20)) -#define RTC_SECS (*(unsigned char *)(Q40_RTC_BASE-24)) -#define RTC_CTRL (*(unsigned char *)(Q40_RTC_BASE-28)) +#define Q40_RTC_BASE (0xff021ffc) +#define Q40_RTC_YEAR (*(volatile unsigned char *)(Q40_RTC_BASE+0)) +#define Q40_RTC_MNTH (*(volatile unsigned char *)(Q40_RTC_BASE-4)) +#define Q40_RTC_DATE (*(volatile unsigned char *)(Q40_RTC_BASE-8)) +#define Q40_RTC_DOW (*(volatile unsigned char *)(Q40_RTC_BASE-12)) +#define Q40_RTC_HOUR (*(volatile unsigned char *)(Q40_RTC_BASE-16)) +#define Q40_RTC_MINS (*(volatile unsigned char *)(Q40_RTC_BASE-20)) +#define Q40_RTC_SECS (*(volatile unsigned char *)(Q40_RTC_BASE-24)) +#define Q40_RTC_CTRL (*(volatile unsigned char *)(Q40_RTC_BASE-28)) /* some control bits */ -#define RTC_READ 64 /* prepare for reading */ -#define RTC_WRITE 128 +#define Q40_RTC_READ 64 /* prepare for reading */ +#define Q40_RTC_WRITE 128 +/* define some Q40 specific ints */ +#include "q40ints.h" /* misc defs */ #define DAC_LEFT ((unsigned char *)0xff008000) diff --git a/include/asm-m68k/raw_io.h b/include/asm-m68k/raw_io.h index d794d0f2e557..ca4868f1d42c 100644 --- a/include/asm-m68k/raw_io.h +++ b/include/asm-m68k/raw_io.h @@ -11,6 +11,19 @@ #ifdef __KERNEL__ +/* Values for nocacheflag and cmode */ +#define IOMAP_FULL_CACHING 0 +#define IOMAP_NOCACHE_SER 1 +#define IOMAP_NOCACHE_NONSER 2 +#define IOMAP_WRITETHROUGH 3 + +extern void iounmap(void *addr); + +extern void *__ioremap(unsigned long physaddr, unsigned long size, + int cacheflag); +extern void __iounmap(void *addr, unsigned long size); + + /* ++roman: The assignments to temp. vars avoid that gcc sometimes generates * two accesses to memory, which may be undesirable for some devices. */ diff --git a/include/asm-m68k/rtc.h b/include/asm-m68k/rtc.h index b28f54735a72..674d7ccf8001 100644 --- a/include/asm-m68k/rtc.h +++ b/include/asm-m68k/rtc.h @@ -33,6 +33,36 @@ extern void gen_rtc_interrupt(unsigned long); #define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */ #define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */ +static inline void get_rtc_time(struct rtc_time *time) +{ + /* + * Only the values that we read from the RTC are set. We leave + * tm_wday, tm_yday and tm_isdst untouched. Even though the + * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated + * by the RTC when initially set to a non-zero value. + */ + mach_hwclk(0, time); +} + +static inline int set_rtc_time(struct rtc_time *time) +{ + return mach_hwclk(1, time); +} + +static inline int get_rtc_pll(struct rtc_pll_info *pll) +{ + if (mach_get_rtc_pll) + return mach_get_rtc_pll(pll); + else + return -EINVAL; +} +static inline int set_rtc_pll(struct rtc_pll_info *pll) +{ + if (mach_set_rtc_pll) + return mach_set_rtc_pll(pll); + else + return -EINVAL; +} #endif /* __KERNEL__ */ diff --git a/include/asm-m68k/softirq.h b/include/asm-m68k/softirq.h index c35c800e3c0d..0c2f0e2044c6 100644 --- a/include/asm-m68k/softirq.h +++ b/include/asm-m68k/softirq.h @@ -6,14 +6,19 @@ */ #include <asm/atomic.h> +#include <asm/hardirq.h> -#define cpu_bh_disable(cpu) do { local_bh_count(cpu)++; barrier(); } while (0) -#define cpu_bh_enable(cpu) do { barrier(); local_bh_count(cpu)--; } while (0) +#define local_bh_disable() \ + do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0) +#define __local_bh_enable() \ + do { barrier(); preempt_count() -= SOFTIRQ_OFFSET; } while (0) -#define local_bh_disable() cpu_bh_disable(smp_processor_id()) -#define local_bh_enable() cpu_bh_enable(smp_processor_id()) -#define __local_bh_enable() local_bh_enable() - -#define in_softirq() (local_bh_count(smp_processor_id()) != 0) +#define local_bh_enable() \ +do { \ + __local_bh_enable(); \ + if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \ + do_softirq(); \ + preempt_check_resched(); \ +} while (0) #endif diff --git a/include/asm-m68k/sun3_pgalloc.h b/include/asm-m68k/sun3_pgalloc.h index c30e1b6a50cb..94f257d93c23 100644 --- a/include/asm-m68k/sun3_pgalloc.h +++ b/include/asm-m68k/sun3_pgalloc.h @@ -95,14 +95,4 @@ static inline pgd_t * pgd_alloc(struct mm_struct *mm) #define pgd_populate(mm, pmd, pte) BUG() - -/* Reserved PMEGs. */ -extern char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; -extern unsigned long pmeg_vaddr[SUN3_PMEGS_NUM]; -extern unsigned char pmeg_alloc[SUN3_PMEGS_NUM]; -extern unsigned char pmeg_ctx[SUN3_PMEGS_NUM]; - - -#define check_pgt_cache() do { } while (0) - #endif /* SUN3_PGALLOC_H */ diff --git a/include/asm-m68k/sun3ints.h b/include/asm-m68k/sun3ints.h index 408f33f9b440..5ce63422c57a 100644 --- a/include/asm-m68k/sun3ints.h +++ b/include/asm-m68k/sun3ints.h @@ -21,6 +21,8 @@ #include <asm/intersil.h> #include <asm/oplib.h> +#define SUN3_INT_VECS 192 + void sun3_enable_irq(unsigned int irq); void sun3_disable_irq(unsigned int irq); int sun3_request_irq(unsigned int irq, @@ -37,5 +39,11 @@ extern int show_sun3_interrupts(struct seq_file *, void *); extern void sun3_process_int(int, struct pt_regs *); extern volatile unsigned char* sun3_intreg; +/* master list of VME vectors -- don't fuck with this */ +#define SUN3_VEC_FLOPPY 0x40 +#define SUN3_VEC_VMESCSI0 0x40 +#define SUN3_VEC_VMESCSI1 0x41 +#define SUN3_VEC_CG 0xA8 + #endif /* SUN3INTS_H */ diff --git a/include/asm-m68k/sun3mmu.h b/include/asm-m68k/sun3mmu.h index 7277c2b77b1d..72e65f3ebe60 100644 --- a/include/asm-m68k/sun3mmu.h +++ b/include/asm-m68k/sun3mmu.h @@ -161,6 +161,10 @@ extern __inline__ void sun3_put_context(unsigned char c) return; } +extern void *sun3_ioremap(unsigned long phys, unsigned long size, + unsigned long type); + +extern int sun3_map_test(unsigned long addr, char *val); #endif /* !__ASSEMBLY__ */ diff --git a/include/asm-m68k/sun3xflop.h b/include/asm-m68k/sun3xflop.h index 015bc0abbc9c..10db3451f5c7 100644 --- a/include/asm-m68k/sun3xflop.h +++ b/include/asm-m68k/sun3xflop.h @@ -3,7 +3,7 @@ * Derived partially from asm-sparc/floppy.h, which is: * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * - * Sun3x version 2/4/2000 Sam Creasey (sammy@oh.verio.com) + * Sun3x version 2/4/2000 Sam Creasey (sammy@sammy.net) */ #ifndef __ASM_SUN3X_FLOPPY_H diff --git a/include/asm-m68k/system.h b/include/asm-m68k/system.h index 974db3b084b7..8fe94c6017fd 100644 --- a/include/asm-m68k/system.h +++ b/include/asm-m68k/system.h @@ -7,11 +7,6 @@ #include <asm/segment.h> #include <asm/entry.h> -#define prepare_arch_schedule(prev) do { } while(0) -#define finish_arch_schedule(prev) do { } while(0) -#define prepare_arch_switch(rq) do { } while(0) -#define finish_arch_switch(rq) spin_unlock_irq(&(rq)->lock) - /* * switch_to(n) should switch tasks to task ptr, first checking that * ptr isn't the current task, in which case it does nothing. This @@ -52,24 +47,25 @@ asmlinkage void resume(void); #define local_irq_enable() asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory") #else #include <asm/hardirq.h> -#define local_irq_enable() ({ \ - if (MACH_IS_Q40 || !local_irq_count(smp_processor_id())) \ - asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory"); \ +#define local_irq_enable() ({ \ + if (MACH_IS_Q40 || !hardirq_count()) \ + asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory"); \ }) #endif #define local_irq_disable() asm volatile ("oriw #0x0700,%%sr": : : "memory") #define local_save_flags(x) asm volatile ("movew %%sr,%0":"=d" (x) : : "memory") #define local_irq_restore(x) asm volatile ("movew %0,%%sr": :"d" (x) : "memory") +static inline int irqs_disabled(void) +{ + unsigned long flags; + local_save_flags(flags); + return flags & ~ALLOWINT; +} + /* For spinlocks etc */ #define local_irq_save(x) ({ local_save_flags(x); local_irq_disable(); }) -#define cli() local_irq_disable() -#define sti() local_irq_enable() -#define save_flags(x) local_save_flags(x) -#define restore_flags(x) local_irq_restore(x) -#define save_and_cli(flags) do { save_flags(flags); cli(); } while(0) - /* * Force strict CPU ordering. * Not really required on m68k... @@ -95,33 +91,29 @@ struct __xchg_dummy { unsigned long a[100]; }; #ifndef CONFIG_RMW_INSNS static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) { - unsigned long tmp, flags; - - save_flags(flags); - cli(); - - switch (size) { - case 1: - __asm__ __volatile__ - ("moveb %2,%0\n\t" - "moveb %1,%2" - : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory"); - break; - case 2: - __asm__ __volatile__ - ("movew %2,%0\n\t" - "movew %1,%2" - : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory"); - break; - case 4: - __asm__ __volatile__ - ("movel %2,%0\n\t" - "movel %1,%2" - : "=&d" (tmp) : "d" (x), "m" (*__xg(ptr)) : "memory"); - break; - } - restore_flags(flags); - return tmp; + unsigned long flags, tmp; + + local_irq_save(flags); + + switch (size) { + case 1: + tmp = *(u8 *)ptr; + *(u8 *)ptr = x; + break; + case 2: + tmp = *(u16 *)ptr; + *(u16 *)ptr = x; + break; + case 4: + tmp = *(u32 *)ptr; + *(u32 *)ptr = x; + break; + default: + BUG(); + } + + local_irq_restore(flags); + return tmp; } #else static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) diff --git a/include/asm-m68k/thread_info.h b/include/asm-m68k/thread_info.h index 64c9f51e0c63..55244ef06d37 100644 --- a/include/asm-m68k/thread_info.h +++ b/include/asm-m68k/thread_info.h @@ -18,8 +18,8 @@ struct thread_info { #define INIT_THREAD_INFO(tsk) \ { \ - task: &tsk, \ - exec_domain: &default_exec_domain, \ + .task = &tsk, \ + .exec_domain = &default_exec_domain, \ } /* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */ @@ -60,6 +60,9 @@ extern int thread_flag_fixme(void); case TIF_NEED_RESCHED: \ tsk->thread.work.need_resched = val; \ break; \ + case TIF_SYSCALL_TRACE: \ + tsk->thread.work.syscall_trace = val; \ + break; \ default: \ thread_flag_fixme(); \ } \ @@ -74,6 +77,9 @@ extern int thread_flag_fixme(void); case TIF_NEED_RESCHED: \ ___res = tsk->thread.work.need_resched; \ break; \ + case TIF_SYSCALL_TRACE: \ + ___res = tsk->thread.work.syscall_trace;\ + break; \ default: \ ___res = thread_flag_fixme(); \ } \ diff --git a/include/asm-m68k/virtconvert.h b/include/asm-m68k/virtconvert.h index 73a99d70a860..9bf9159327e5 100644 --- a/include/asm-m68k/virtconvert.h +++ b/include/asm-m68k/virtconvert.h @@ -20,7 +20,6 @@ */ #ifndef CONFIG_SUN3 extern unsigned long mm_vtop(unsigned long addr) __attribute__ ((const)); -extern unsigned long mm_vtop_fallback (unsigned long) __attribute__ ((const)); extern unsigned long mm_ptov(unsigned long addr) __attribute__ ((const)); #else extern inline unsigned long mm_vtop(unsigned long vaddr) @@ -35,39 +34,22 @@ extern inline unsigned long mm_ptov(unsigned long paddr) #endif #ifdef CONFIG_SINGLE_MEMORY_CHUNK -extern inline unsigned long virt_to_phys(volatile void *vaddr) +static inline unsigned long virt_to_phys(void *vaddr) { - unsigned long voff = (unsigned long)vaddr - PAGE_OFFSET; - - if (voff < m68k_memory[0].size) - return voff + m68k_memory[0].addr; - return mm_vtop_fallback((unsigned long)vaddr); + return (unsigned long)vaddr - PAGE_OFFSET + m68k_memory[0].addr; } -extern inline void * phys_to_virt(unsigned long paddr) +static inline void * phys_to_virt(unsigned long paddr) { - unsigned long poff = paddr - m68k_memory[0].addr; - - if (poff < m68k_memory[0].size) - return (void *)(poff + PAGE_OFFSET); - -#ifdef CONFIG_AMIGA - /* - * if on an amiga and address is in first 16M, move it - * to the ZTWO_VADDR range - */ - if (MACH_IS_AMIGA && paddr < 16*1024*1024) - return (void *)ZTWO_VADDR(paddr); -#endif - return (void *)paddr; + return (void *)(paddr - m68k_memory[0].addr + PAGE_OFFSET); } #else -extern inline unsigned long virt_to_phys(volatile void * address) +static inline unsigned long virt_to_phys(void *address) { return mm_vtop((unsigned long)address); } -extern inline void * phys_to_virt(unsigned long address) +static inline void *phys_to_virt(unsigned long address) { return (void *) mm_ptov(address); } diff --git a/include/asm-m68k/zorro.h b/include/asm-m68k/zorro.h index 69a200802019..31c26bf5007a 100644 --- a/include/asm-m68k/zorro.h +++ b/include/asm-m68k/zorro.h @@ -1,7 +1,7 @@ #ifndef _ASM_M68K_ZORRO_H #define _ASM_M68K_ZORRO_H -#include <asm/io.h> +#include <asm/raw_io.h> #define z_readb raw_inb #define z_readw raw_inw diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index cbf710c5572d..396d4178b14c 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -7,12 +7,12 @@ #define PSMOUSE_MINOR 1 #define MS_BUSMOUSE_MINOR 2 #define ATIXL_BUSMOUSE_MINOR 3 -#define AMIGAMOUSE_MINOR 4 +/*#define AMIGAMOUSE_MINOR 4 FIXME OBSOLETE */ #define ATARIMOUSE_MINOR 5 #define SUN_MOUSE_MINOR 6 #define APOLLO_MOUSE_MINOR 7 #define PC110PAD_MINOR 9 -#define ADB_MOUSE_MINOR 10 +/*#define ADB_MOUSE_MINOR 10 FIXME OBSOLETE */ #define WATCHDOG_MINOR 130 /* Watchdog timer */ #define TEMP_MINOR 131 /* Temperature Sensor */ #define RTC_MINOR 135 diff --git a/include/linux/sem.h b/include/linux/sem.h index 925920691a9b..429e72a2eadd 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h @@ -2,6 +2,7 @@ #define _LINUX_SEM_H #include <linux/ipc.h> +#include <asm/atomic.h> /* semop flags */ #define SEM_UNDO 0x1000 /* undo the operation on exit */ |
