From 3e414096429d55fbc8116171bba3487647bbe638 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 3 Jul 2000 21:46:06 +0000 Subject: Merge with Linux 2.4.0-test3-pre2. --- include/asm-arm/arch-arc/ide.h | 8 +++++--- include/asm-arm/arch-cl7500/ide.h | 5 +++-- include/asm-arm/arch-ebsa285/ide.h | 5 +++-- include/asm-arm/arch-l7200/ide.h | 2 +- include/asm-arm/arch-nexuspci/ide.h | 5 +++-- include/asm-arm/arch-rpc/ide.h | 8 +++++--- include/asm-arm/arch-sa1100/ide.h | 14 +++++++++----- include/asm-arm/arch-sa1100/irq.h | 3 ++- include/asm-arm/arch-shark/hardware.h | 2 +- include/asm-arm/arch-shark/ide.h | 8 +++++--- include/asm-arm/atomic.h | 28 ++++++++++++++-------------- include/asm-arm/cpu-multi26.h | 2 -- include/asm-arm/dma.h | 3 ++- include/asm-arm/floppy.h | 23 ++++++++++++----------- include/asm-arm/io.h | 21 +++------------------ include/asm-arm/memory.h | 31 +++++++++++++++++++++++++++++++ include/asm-arm/proc-armo/system.h | 26 ++------------------------ include/asm-arm/proc-armv/system.h | 26 ++------------------------ include/asm-arm/ptrace.h | 4 ++++ include/asm-arm/system.h | 19 ++++++++++++++++++- 20 files changed, 125 insertions(+), 118 deletions(-) create mode 100644 include/asm-arm/memory.h (limited to 'include/asm-arm') diff --git a/include/asm-arm/arch-arc/ide.h b/include/asm-arm/arch-arc/ide.h index bccbe3f50..39f91b60b 100644 --- a/include/asm-arm/arch-arc/ide.h +++ b/include/asm-arm/arch-arc/ide.h @@ -20,7 +20,7 @@ * This should follow whatever the default interface uses. */ static __inline__ void -ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) { ide_ioreg_t reg = (ide_ioreg_t) data_port; int i; @@ -30,7 +30,8 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) reg += 1; } hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; - hw->irq = irq; + if (irq) + *irq = 0; } /* @@ -44,7 +45,8 @@ static __inline__ void ide_init_default_hwifs(void) memset(&hw, 0, sizeof(hw)); - ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_HARDDISK); + ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL); + hw.irq = IRQ_HARDDISK; ide_register_hw(&hw, NULL); #endif } diff --git a/include/asm-arm/arch-cl7500/ide.h b/include/asm-arm/arch-cl7500/ide.h index 590579747..53daa0969 100644 --- a/include/asm-arm/arch-cl7500/ide.h +++ b/include/asm-arm/arch-cl7500/ide.h @@ -13,7 +13,7 @@ * This should follow whatever the default interface uses. */ static __inline__ void -ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) { ide_ioreg_t reg = (ide_ioreg_t) data_port; int i; @@ -25,7 +25,8 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) reg += 1; } hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; - hw->irq = irq; + if (irq) + *irq = 0; } /* diff --git a/include/asm-arm/arch-ebsa285/ide.h b/include/asm-arm/arch-ebsa285/ide.h index 1a09f1827..dbdeb1fab 100644 --- a/include/asm-arm/arch-ebsa285/ide.h +++ b/include/asm-arm/arch-ebsa285/ide.h @@ -13,7 +13,7 @@ * This should follow whatever the default interface uses. */ static __inline__ void -ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) { ide_ioreg_t reg = (ide_ioreg_t) data_port; int i; @@ -23,7 +23,8 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) reg += 1; } hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; - hw->irq = irq; + if (irq) + *irq = 0; } /* diff --git a/include/asm-arm/arch-l7200/ide.h b/include/asm-arm/arch-l7200/ide.h index 0cfcf3aac..aff8aaf9c 100644 --- a/include/asm-arm/arch-l7200/ide.h +++ b/include/asm-arm/arch-l7200/ide.h @@ -13,7 +13,7 @@ * This should follow whatever the default interface uses. */ static __inline__ void -ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) { } diff --git a/include/asm-arm/arch-nexuspci/ide.h b/include/asm-arm/arch-nexuspci/ide.h index cb1eac75a..4a4d1b20c 100644 --- a/include/asm-arm/arch-nexuspci/ide.h +++ b/include/asm-arm/arch-nexuspci/ide.h @@ -13,7 +13,7 @@ * This should follow whatever the default interface uses. */ static __inline__ void -ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) { ide_ioreg_t reg = (ide_ioreg_t) data_port; int i; @@ -23,7 +23,8 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) reg += 1; } hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; - hw->irq = irq; + if (irq) + *irq = 0; } /* diff --git a/include/asm-arm/arch-rpc/ide.h b/include/asm-arm/arch-rpc/ide.h index ccbc7cf76..827d81c2b 100644 --- a/include/asm-arm/arch-rpc/ide.h +++ b/include/asm-arm/arch-rpc/ide.h @@ -13,7 +13,7 @@ * This should follow whatever the default interface uses. */ static __inline__ void -ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) { ide_ioreg_t reg = (ide_ioreg_t) data_port; int i; @@ -25,7 +25,8 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) reg += 1; } hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; - hw->irq = irq; + if (irq) + *irq = 0; } /* @@ -37,6 +38,7 @@ ide_init_default_hwifs(void) { hw_regs_t hw; - ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_HARDDISK); + ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL); + hw.irq = IRQ_HARDDISK; ide_register_hw(&hw, NULL); } diff --git a/include/asm-arm/arch-sa1100/ide.h b/include/asm-arm/arch-sa1100/ide.h index 3a1f00e3d..3a9935c0b 100644 --- a/include/asm-arm/arch-sa1100/ide.h +++ b/include/asm-arm/arch-sa1100/ide.h @@ -17,7 +17,7 @@ * This should follow whatever the default interface uses. */ static __inline__ void -ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) { ide_ioreg_t reg; int i; @@ -37,7 +37,8 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) reg += (1 << IO_SHIFT); } hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) (ctrl_port << IO_SHIFT); - hw->irq = irq; + if (irq) + *irq = 0; } /* @@ -73,9 +74,11 @@ ide_init_default_hwifs(void) /* MAC 23/4/1999, swap these round so that the left hand hard disk is hda when viewed from the front. This doesn't match the silkscreen however. */ - ide_init_hwif_ports(&hw,0x10,0x1e,EMPEG_IRQ_IDE2); + ide_init_hwif_ports(&hw,0x10,0x1e,NULL); + hw.irq = EMPEG_IRQ_IDE2; ide_register_hw(&hw, NULL); - ide_init_hwif_ports(&hw,0x00,0x0e,EMPEG_IRQ_IDE1); + ide_init_hwif_ports(&hw,0x00,0x0e,NULL); + hw.irq = EMPEG_IRQ_IDE1; ide_register_hw(&hw, NULL); #elif defined( CONFIG_SA1100_VICTOR ) @@ -87,7 +90,8 @@ ide_init_default_hwifs(void) /* set the pcmcia interface timing */ MECR = 0x00060006; - ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, IRQ_GPIO7); + ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL); + hw.irq = IRQ_GPIO7; ide_register_hw(&hw, NULL); #else #error Missing IDE interface definition in include/asm/arch/ide.h diff --git a/include/asm-arm/arch-sa1100/irq.h b/include/asm-arm/arch-sa1100/irq.h index 6f447f497..2f1e63d82 100644 --- a/include/asm-arm/arch-sa1100/irq.h +++ b/include/asm-arm/arch-sa1100/irq.h @@ -15,6 +15,7 @@ * 26-05-2000 JD SA-1111 support added */ #include +#include #define fixup_irq(x) (x) @@ -73,7 +74,7 @@ static int GPIO_11_27_spurious; /* GPIOs that triggered when masked */ static void sa1100_GPIO11_27_demux(int irq, void *dev_id, struct pt_regs *regs) { - int i, irq, spurious; + int i, spurious; while( (irq = (GEDR & 0xfffff800)) ){ /* diff --git a/include/asm-arm/arch-shark/hardware.h b/include/asm-arm/arch-shark/hardware.h index 1fb25abd1..fc38d57aa 100644 --- a/include/asm-arm/arch-shark/hardware.h +++ b/include/asm-arm/arch-shark/hardware.h @@ -10,7 +10,7 @@ #ifndef __ASM_ARCH_HARDWARE_H #define __ASM_ARCH_HARDWARE_H -#ifndef __ASSEMBLER__ +#ifndef __ASSEMBLY__ /* * Mapping areas diff --git a/include/asm-arm/arch-shark/ide.h b/include/asm-arm/arch-shark/ide.h index a9e373e98..2ef90b558 100644 --- a/include/asm-arm/arch-shark/ide.h +++ b/include/asm-arm/arch-shark/ide.h @@ -15,7 +15,7 @@ * This should follow whatever the default interface uses. */ static __inline__ void -ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) +ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) { ide_ioreg_t reg = (ide_ioreg_t) data_port; int i; @@ -27,7 +27,8 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int irq) reg += 1; } hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; - hw->irq = irq; + if (irq) + *irq = 0; } /* @@ -39,7 +40,8 @@ ide_init_default_hwifs(void) { hw_regs_t hw; - ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, 14); + ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL); + hw.irq = 14; ide_register_hw(&hw, NULL); } diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h index d5dfe4f91..94fd17170 100644 --- a/include/asm-arm/atomic.h +++ b/include/asm-arm/atomic.h @@ -36,36 +36,36 @@ static __inline__ void atomic_add(int i, volatile atomic_t *v) { unsigned long flags; - save_flags_cli (flags); + __save_flags_cli(flags); v->counter += i; - restore_flags (flags); + __restore_flags(flags); } static __inline__ void atomic_sub(int i, volatile atomic_t *v) { unsigned long flags; - save_flags_cli (flags); + __save_flags_cli(flags); v->counter -= i; - restore_flags (flags); + __restore_flags(flags); } static __inline__ void atomic_inc(volatile atomic_t *v) { unsigned long flags; - save_flags_cli (flags); + __save_flags_cli(flags); v->counter += 1; - restore_flags (flags); + __restore_flags(flags); } static __inline__ void atomic_dec(volatile atomic_t *v) { unsigned long flags; - save_flags_cli (flags); + __save_flags_cli(flags); v->counter -= 1; - restore_flags (flags); + __restore_flags(flags); } static __inline__ int atomic_dec_and_test(volatile atomic_t *v) @@ -73,10 +73,10 @@ static __inline__ int atomic_dec_and_test(volatile atomic_t *v) unsigned long flags; int result; - save_flags_cli (flags); + __save_flags_cli(flags); v->counter -= 1; result = (v->counter == 0); - restore_flags (flags); + __restore_flags(flags); return result; } @@ -86,10 +86,10 @@ extern __inline__ int atomic_add_negative(int i, volatile atomic_t *v) unsigned long flags; int result; - save_flags_cli(flags); + __save_flags_cli(flags); v->counter += i; result = (v->counter < 0); - restore_flags(flags); + __restore_flags(flags); return result; } @@ -98,9 +98,9 @@ static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *addr { unsigned long flags; - save_flags_cli (flags); + __save_flags_cli(flags); *addr &= ~mask; - restore_flags (flags); + __restore_flags(flags); } #endif diff --git a/include/asm-arm/cpu-multi26.h b/include/asm-arm/cpu-multi26.h index c09edf8b1..50639037d 100644 --- a/include/asm-arm/cpu-multi26.h +++ b/include/asm-arm/cpu-multi26.h @@ -20,7 +20,6 @@ extern struct processor { void (*_set_pgd)(pgd_t *pgd); /* XCHG */ unsigned long (*_xchg_1)(unsigned long x, volatile void *ptr); - unsigned long (*_xchg_2)(unsigned long x, volatile void *ptr); unsigned long (*_xchg_4)(unsigned long x, volatile void *ptr); } processor; @@ -34,7 +33,6 @@ extern const struct processor arm3_processor_functions; #define cpu_do_idle() do { } while (0) #define cpu_switch_mm(pgd,tsk) processor._set_pgd(pgd) #define cpu_xchg_1(x,ptr) processor._xchg_1(x,ptr) -#define cpu_xchg_2(x,ptr) processor._xchg_2(x,ptr) #define cpu_xchg_4(x,ptr) processor._xchg_4(x,ptr) extern void cpu_memc_update_all(pgd_t *pgd); diff --git a/include/asm-arm/dma.h b/include/asm-arm/dma.h index b67e33a9d..67db9ab90 100644 --- a/include/asm-arm/dma.h +++ b/include/asm-arm/dma.h @@ -6,7 +6,8 @@ typedef unsigned int dmach_t; #include #include #include -#include +#include +#include #include /* diff --git a/include/asm-arm/floppy.h b/include/asm-arm/floppy.h index 9d9848644..05a94a2e6 100644 --- a/include/asm-arm/floppy.h +++ b/include/asm-arm/floppy.h @@ -1,7 +1,9 @@ /* * linux/include/asm-arm/floppy.h * - * (C) 1996 Russell King + * (C) 1996-2000 Russell King + * + * Note that we don't touch FLOPPY_DMA nor FLOPPY_IRQ here */ #ifndef __ASM_ARM_FLOPPY_H #define __ASM_ARM_FLOPPY_H @@ -24,14 +26,14 @@ #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) -#define fd_request_dma() request_dma(FLOPPY_DMA,"floppy") -#define fd_free_dma() free_dma(FLOPPY_DMA) -#define fd_disable_dma() disable_dma(FLOPPY_DMA) -#define fd_enable_dma() enable_dma(FLOPPY_DMA) -#define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) -#define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, (mode)) -#define fd_set_dma_addr(addr) set_dma_addr(FLOPPY_DMA, virt_to_bus((addr))) -#define fd_set_dma_count(len) set_dma_count(FLOPPY_DMA, (len)) +#define fd_request_dma() request_dma(DMA_FLOPPY,"floppy") +#define fd_free_dma() free_dma(DMA_FLOPPY) +#define fd_disable_dma() disable_dma(DMA_FLOPPY) +#define fd_enable_dma() enable_dma(DMA_FLOPPY) +#define fd_clear_dma_ff() clear_dma_ff(DMA_FLOPPY) +#define fd_set_dma_mode(mode) set_dma_mode(DMA_FLOPPY, (mode)) +#define fd_set_dma_addr(addr) set_dma_addr(DMA_FLOPPY, virt_to_bus((addr))) +#define fd_set_dma_count(len) set_dma_count(DMA_FLOPPY, (len)) #define fd_cacheflush(addr,sz) /* need to clean up dma.h */ @@ -109,13 +111,12 @@ extern __inline__ void fd_scandrives (void) } #define FDC1 (0x3f0) -static int FDC2 = -1; #define FLOPPY0_TYPE 4 #define FLOPPY1_TYPE 4 #define N_FDC 1 -#define N_DRIVE 8 +#define N_DRIVE 4 #define FLOPPY_MOTOR_MASK 0xf0 diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 871e50a65..fad9e7412 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h @@ -1,7 +1,7 @@ /* * linux/include/asm-arm/io.h * - * Copyright (C) 1996-1999 Russell King + * Copyright (C) 1996-2000 Russell King * * Modifications: * 16-Sep-1996 RMK Inlined the inx/outx functions & optimised for both @@ -11,6 +11,7 @@ * 27-Mar-1999 PJB Second parameter of memcpy_toio is const.. * 04-Apr-1999 PJB Added check_signature. * 12-Dec-1999 RMK More cleanups + * 18-Jun-2000 RMK Removed virt_to_* and friends definitions */ #ifndef __ASM_ARM_IO_H #define __ASM_ARM_IO_H @@ -43,23 +44,7 @@ extern void insl(unsigned int port, void *from, int len); #ifdef __KERNEL__ -#include - -extern __inline__ unsigned long virt_to_phys(volatile void *x) -{ - return __virt_to_phys((unsigned long)(x)); -} - -extern __inline__ void *phys_to_virt(unsigned long x) -{ - return (void *)(__phys_to_virt((unsigned long)(x))); -} - -/* - * Virtual <-> DMA view memory address translations - */ -#define virt_to_bus(x) (__virt_to_bus((unsigned long)(x))) -#define bus_to_virt(x) ((void *)(__bus_to_virt((unsigned long)(x)))) +#include /* the following macro is depreciated */ #define ioaddr(port) __ioaddr((port)) diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h new file mode 100644 index 000000000..837ea199a --- /dev/null +++ b/include/asm-arm/memory.h @@ -0,0 +1,31 @@ +/* + * linux/include/asm-arm/memory.h + * + * Copyright (C) 2000 Russell King + * + * Note: this file should not be included by non-asm/.h files + * + * Modifications: + */ +#ifndef __ASM_ARM_MEMORY_H +#define __ASM_ARM_MEMORY_H + +#include + +extern __inline__ unsigned long virt_to_phys(volatile void *x) +{ + return __virt_to_phys((unsigned long)(x)); +} + +extern __inline__ void *phys_to_virt(unsigned long x) +{ + return (void *)(__phys_to_virt((unsigned long)(x))); +} + +/* + * Virtual <-> DMA view memory address translations + */ +#define virt_to_bus(x) (__virt_to_bus((unsigned long)(x))) +#define bus_to_virt(x) ((void *)(__bus_to_virt((unsigned long)(x)))) + +#endif diff --git a/include/asm-arm/proc-armo/system.h b/include/asm-arm/proc-armo/system.h index bc113ae6e..36a3515e7 100644 --- a/include/asm-arm/proc-armo/system.h +++ b/include/asm-arm/proc-armo/system.h @@ -7,20 +7,16 @@ #ifndef __ASM_PROC_SYSTEM_H #define __ASM_PROC_SYSTEM_H -extern const char xchg_str[]; - -#include #include extern __inline__ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) { - extern void arm_invalidptr(const char *, int); + extern void __bad_xchg(volatile void *, int); switch (size) { case 1: return cpu_xchg_1(x, ptr); - case 2: return cpu_xchg_2(x, ptr); case 4: return cpu_xchg_4(x, ptr); - default: arm_invalidptr(xchg_str, size); + default: __bad_xchg(ptr, size); } return 0; } @@ -108,22 +104,4 @@ extern __inline__ unsigned long __xchg(unsigned long x, volatile void *ptr, int : "memory"); \ } while (0) -/* For spinlocks etc */ -#define local_irq_save(x) __save_flags_cli(x) -#define local_irq_restore(x) __restore_flags(x) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() - -#ifdef CONFIG_SMP -#error SMP not supported -#else - -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) -#define save_flags_cli(x) __save_flags_cli(x) - -#endif - #endif diff --git a/include/asm-arm/proc-armv/system.h b/include/asm-arm/proc-armv/system.h index 3b35be309..d9ef8ffd9 100644 --- a/include/asm-arm/proc-armv/system.h +++ b/include/asm-arm/proc-armv/system.h @@ -7,20 +7,16 @@ #ifndef __ASM_PROC_SYSTEM_H #define __ASM_PROC_SYSTEM_H -#include - -extern const char xchg_str[]; - extern __inline__ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) { - extern void arm_invalidptr(const char *, int); + extern void __bad_xchg(volatile void *, int); switch (size) { case 1: __asm__ __volatile__ ("swpb %0, %1, [%2]" : "=r" (x) : "r" (x), "r" (ptr) : "memory"); break; case 4: __asm__ __volatile__ ("swp %0, %1, [%2]" : "=r" (x) : "r" (x), "r" (ptr) : "memory"); break; - default: arm_invalidptr(xchg_str, size); + default: __bad_xchg(ptr, size); } return x; } @@ -102,22 +98,4 @@ extern unsigned long cr_alignment; /* defined in entry-armv.S */ : "r" (x) \ : "memory") -/* For spinlocks etc */ -#define local_irq_save(x) __save_flags_cli(x) -#define local_irq_restore(x) __restore_flags(x) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() - -#ifdef CONFIG_SMP -#error SMP not supported -#else - -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) -#define save_flags_cli(x) __save_flags_cli(x) - -#endif - #endif diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h index 961363cc7..3126767a4 100644 --- a/include/asm-arm/ptrace.h +++ b/include/asm-arm/ptrace.h @@ -17,6 +17,10 @@ #ifdef __KERNEL__ extern void show_regs(struct pt_regs *); + +#define predicate(x) (x & 0xf0000000) +#define PREDICATE_ALWAYS 0xe0000000 + #endif #endif /* __ASSEMBLY__ */ diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index b75a88411..94073475d 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h @@ -381,7 +381,6 @@ extern unsigned int __machine_arch_type; #define tas(ptr) (xchg((ptr),1)) -extern void arm_malalignedptr(const char *, void *, volatile void *); extern asmlinkage void __backtrace(void); /* @@ -411,4 +410,22 @@ extern struct task_struct *__switch_to(struct task_struct *prev, struct task_str #endif +/* For spinlocks etc */ +#define local_irq_save(x) __save_flags_cli(x) +#define local_irq_restore(x) __restore_flags(x) +#define local_irq_disable() __cli() +#define local_irq_enable() __sti() + +#ifdef CONFIG_SMP +#error SMP not supported +#else + +#define cli() __cli() +#define sti() __sti() +#define save_flags(x) __save_flags(x) +#define restore_flags(x) __restore_flags(x) +#define save_flags_cli(x) __save_flags_cli(x) + +#endif + #endif -- cgit v1.2.3