Commit b3b1256d authored by Ian Molton's avatar Ian Molton Committed by Linus Torvalds

[PATCH] arm26: necessary compilation fixes for 2.6.10

Various trivial fixes required to get a clean compile.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 64cafeea
......@@ -7,6 +7,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/user.h>
......@@ -27,8 +28,6 @@
#include <asm/elf.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/pgalloc.h>
//#include <asm/proc-fns.h>
#include <asm/processor.h>
#include <asm/semaphore.h>
#include <asm/system.h>
......@@ -69,8 +68,9 @@ extern void fp_enter(void);
/*
* This has a special calling convention; it doesn't
* modify any of the usual registers, except for LR.
* FIXME - we used to use our own local version - looks to be in kernel/softirq now
*/
extern void __do_softirq(void);
//extern void __do_softirq(void);
#define EXPORT_SYMBOL_ALIAS(sym,orig) \
const char __kstrtab_##sym[] \
......@@ -95,7 +95,7 @@ EXPORT_SYMBOL(ret_from_exception);
EXPORT_SYMBOL(kd_mksound);
#endif
EXPORT_SYMBOL(__do_softirq);
//EXPORT_SYMBOL(__do_softirq);
/* platform dependent support */
EXPORT_SYMBOL(dump_thread);
......@@ -213,12 +213,6 @@ EXPORT_SYMBOL(sys_open);
EXPORT_SYMBOL(sys_exit);
EXPORT_SYMBOL(sys_wait4);
/* semaphores */
EXPORT_SYMBOL(__down_failed);
EXPORT_SYMBOL(__down_interruptible_failed);
EXPORT_SYMBOL(__down_trylock_failed);
EXPORT_SYMBOL(__up_wakeup);
EXPORT_SYMBOL(get_wchan);
#ifdef CONFIG_PREEMPT
......
......@@ -12,6 +12,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/config.h>
#include <linux/sched.h>
#include <linux/errno.h>
......@@ -179,7 +180,7 @@ int __down_trylock(struct semaphore * sem)
* registers (r0 to r3 and lr), but not ip, as we use it as a return
* value in some cases..
*/
asm(" .section .sched.text \n\
asm(" .section .sched.text , #alloc, #execinstr \n\
.align 5 \n\
.globl __down_failed \n\
__down_failed: \n\
......@@ -215,3 +216,8 @@ __up_wakeup: \n\
ldmfd sp!, {r0 - r3, pc}^ \n\
");
EXPORT_SYMBOL(__down_failed);
EXPORT_SYMBOL(__down_interruptible_failed);
EXPORT_SYMBOL(__down_trylock_failed);
EXPORT_SYMBOL(__up_wakeup);
/*
* linux/arch/arm/lib/getuser.S
* linux/arch/arm26/lib/getuser.S
*
* Copyright (C) 2001 Russell King
*
......@@ -28,6 +28,7 @@
*/
#include <asm/asm_offsets.h>
#include <asm/thread_info.h>
#include <asm/errno.h>
.global __get_user_1
__get_user_1:
......@@ -98,7 +99,7 @@ __get_user_bad_8:
mov r2, #0
__get_user_bad:
mov r1, #0
mov r0, #-14
mov r0, #-EFAULT
ldmfd sp!, {pc}^
.section __ex_table, "a"
......
/*
* linux/arch/arm/lib/putuser.S
* linux/arch/arm26/lib/putuser.S
*
* Copyright (C) 2001 Russell King
*
......@@ -28,6 +28,7 @@
*/
#include <asm/asm_offsets.h>
#include <asm/thread_info.h>
#include <asm/errno.h>
.global __put_user_1
__put_user_1:
......@@ -95,7 +96,7 @@ __put_user_8:
ldmfd sp!, {pc}^
__put_user_bad:
mov r0, #-14
mov r0, #-EFAULT
mov pc, lr
.section __ex_table, "a"
......
......@@ -9,6 +9,8 @@
#ifndef __ASM_ARM_CHECKSUM_H
#define __ASM_ARM_CHECKSUM_H
#include <linux/in6.h>
/*
* computes the checksum of a memory block at buff, length len,
* and adds in "sum" (32-bit)
......@@ -35,13 +37,13 @@ unsigned int
csum_partial_copy_nocheck(const char *src, char *dst, int len, int sum);
unsigned int
csum_partial_copy_from_user(const char *src, char *dst, int len, int sum, int *err_ptr);
csum_partial_copy_from_user(const char __user *src, char *dst, int len, int sum, int *err_ptr);
/*
* These are the old (and unsafe) way of doing checksums, a warning message will be
* printed if they are used and an exception occurs.
* This is the old (and unsafe) way of doing checksums, a warning message will
* be printed if it is used and an exception occurs.
*
* these functions should go away after some time.
* this functions should go away after some time.
*/
#define csum_partial_copy(src,dst,len,sum) csum_partial_copy_nocheck(src,dst,len,sum)
......@@ -105,7 +107,7 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,
adcs %0, %0, %5 \n\
adc %0, %0, #0"
: "=&r"(sum)
: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len) << 16), "Ir" (proto << 8)
: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (ntohs(proto))
: "cc");
return sum;
}
......@@ -127,7 +129,7 @@ csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len,
addcs %0, %0, #0x10000 \n\
mvn %0, %0"
: "=&r"(sum)
: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (proto << 8)
: "r" (sum), "r" (daddr), "r" (saddr), "r" (ntohs(len)), "Ir" (ntohs(proto))
: "cc");
return sum >> 16;
}
......
#include <asm-generic/dma-mapping-broken.h>
......@@ -85,23 +85,6 @@ void __set_irq_handler(unsigned int irq, irq_handler_t, int);
void set_irq_chip(unsigned int irq, struct irqchip *);
void set_irq_flags(unsigned int irq, unsigned int flags);
#ifdef not_yet
/*
* This is to be used by the top-level machine IRQ decoder only.
*/
static inline void call_irq(struct pt_regs *regs, unsigned int irq)
{
struct irqdesc *desc = irq_desc + irq;
spin_lock(&irq_controller_lock);
desc->handle(irq, desc, regs);
spin_unlock(&irq_controller_lock);
if (softirq_pending(smp_processor_id()))
do_softirq();
}
#endif
#define IRQF_VALID (1 << 0)
#define IRQF_PROBE (1 << 1)
#define IRQF_NOAUTOEN (1 << 2)
......
......@@ -61,19 +61,19 @@ typedef struct {
#undef __FD_SET
#define __FD_SET(fd, fdsetp) \
(((fd_set *)fdsetp)->fds_bits[fd >> 5] |= (1<<(fd & 31)))
(((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31)))
#undef __FD_CLR
#define __FD_CLR(fd, fdsetp) \
(((fd_set *)fdsetp)->fds_bits[fd >> 5] &= ~(1<<(fd & 31)))
(((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31)))
#undef __FD_ISSET
#define __FD_ISSET(fd, fdsetp) \
((((fd_set *)fdsetp)->fds_bits[fd >> 5] & (1<<(fd & 31))) != 0)
((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0)
#undef __FD_ZERO
#define __FD_ZERO(fdsetp) \
(memset (fdsetp, 0, sizeof (*(fd_set *)fdsetp)))
(memset ((fdsetp), 0, sizeof (*(fd_set *)(fdsetp))))
#endif
......
......@@ -171,7 +171,7 @@ struct tagtable {
int (*parse)(const struct tag *);
};
#define __tag __attribute__((unused, __section__(".taglist")))
#define __tag __attribute_used__ __attribute__((__section__(".taglist")))
#define __tagtable(tag, fn) \
static struct tagtable __tagtable_##fn __tag = { tag, fn }
......
......@@ -18,6 +18,7 @@
struct task_struct;
struct exec_domain;
#include <linux/compiler.h>
#include <asm/fpstate.h>
#include <asm/ptrace.h>
#include <asm/types.h>
......@@ -80,7 +81,7 @@ static inline struct thread_info *current_thread_info(void)
}
/* FIXME - PAGE_SIZE < 32K */
#define THREAD_SIZE (8192)
#define THREAD_SIZE (8*32768) // FIXME - this needs attention (see kernel/fork.c which gets a nice div by zero if this is lower than 8*32768
#define __get_user_regs(x) (((struct pt_regs *)((unsigned long)(x) + THREAD_SIZE - 8)) - 1)
extern struct thread_info *alloc_thread_info(struct task_struct *task);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment