Commit 1b41a898 authored by Russell King's avatar Russell King

[ARM] 2.5.48 Build fixes (round 1)

This cset applies the ARM fixups for various 2.5.48 changes, including
fixing ADFS.  This cset does NOT contain ARM fixes for Rusty's 2.5.48
module changes.
parent 4f160f84
...@@ -82,12 +82,9 @@ extern void fp_init(union fp_state *); ...@@ -82,12 +82,9 @@ extern void fp_init(union fp_state *);
extern void __do_softirq(void); extern void __do_softirq(void);
#define EXPORT_SYMBOL_ALIAS(sym,orig) \ #define EXPORT_SYMBOL_ALIAS(sym,orig) \
const char __kstrtab_##sym[] \ const struct kernel_symbol __ksymtab_##sym \
__attribute__((section(".kstrtab"))) = \
__MODULE_STRING(sym); \
const struct module_symbol __ksymtab_##sym \
__attribute__((section("__ksymtab"))) = \ __attribute__((section("__ksymtab"))) = \
{ (unsigned long)&orig, __kstrtab_##sym }; { (unsigned long)&orig, #sym };
/* /*
* floating point math emulator support. * floating point math emulator support.
...@@ -107,6 +104,7 @@ EXPORT_SYMBOL(kd_mksound); ...@@ -107,6 +104,7 @@ EXPORT_SYMBOL(kd_mksound);
#endif #endif
EXPORT_SYMBOL_NOVERS(__do_softirq); EXPORT_SYMBOL_NOVERS(__do_softirq);
EXPORT_SYMBOL_NOVERS(__backtrace);
/* platform dependent support */ /* platform dependent support */
EXPORT_SYMBOL(dump_thread); EXPORT_SYMBOL(dump_thread);
...@@ -129,6 +127,7 @@ EXPORT_SYMBOL(enable_irq); ...@@ -129,6 +127,7 @@ EXPORT_SYMBOL(enable_irq);
EXPORT_SYMBOL(disable_irq); EXPORT_SYMBOL(disable_irq);
EXPORT_SYMBOL(probe_irq_mask); EXPORT_SYMBOL(probe_irq_mask);
EXPORT_SYMBOL(set_irq_type); EXPORT_SYMBOL(set_irq_type);
EXPORT_SYMBOL(set_irq_wake);
EXPORT_SYMBOL(pm_idle); EXPORT_SYMBOL(pm_idle);
EXPORT_SYMBOL(pm_power_off); EXPORT_SYMBOL(pm_power_off);
EXPORT_SYMBOL(fp_init); EXPORT_SYMBOL(fp_init);
......
...@@ -141,10 +141,10 @@ __syscall_start: ...@@ -141,10 +141,10 @@ __syscall_start:
.long sys_adjtimex .long sys_adjtimex
/* 125 */ .long sys_mprotect /* 125 */ .long sys_mprotect
.long sys_sigprocmask .long sys_sigprocmask
.long sys_create_module .long sys_ni_syscall /* was sys_create_module */
.long sys_init_module .long sys_init_module
.long sys_delete_module .long sys_delete_module
/* 130 */ .long sys_get_kernel_syms /* 130 */ .long sys_ni_syscall /* was sys_get_kernel_syms */
.long sys_quotactl .long sys_quotactl
.long sys_getpgid .long sys_getpgid
.long sys_fchdir .long sys_fchdir
...@@ -181,7 +181,7 @@ __syscall_start: ...@@ -181,7 +181,7 @@ __syscall_start:
.long sys_setresuid16 .long sys_setresuid16
/* 165 */ .long sys_getresuid16 /* 165 */ .long sys_getresuid16
.long sys_ni_syscall .long sys_ni_syscall
.long sys_query_module .long sys_ni_syscall /* was sys_query_module */
.long sys_poll .long sys_poll
.long sys_nfsservctl .long sys_nfsservctl
/* 170 */ .long sys_setresgid16 /* 170 */ .long sys_setresgid16
......
...@@ -12,12 +12,11 @@ ...@@ -12,12 +12,11 @@
* 10-Oct-1996 RMK Brought up to date with arch-sa110eval * 10-Oct-1996 RMK Brought up to date with arch-sa110eval
* 04-Dec-1997 RMK Updated for new arch/arm/time.c * 04-Dec-1997 RMK Updated for new arch/arm/time.c
*/ */
#include <linux/interrupt.h> #include <linux/timex.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h>
#include <asm/hardware/ioc.h> #include <asm/hardware/ioc.h>
extern unsigned long (*gettimeoffset)(void); extern unsigned long (*gettimeoffset)(void);
......
/* /*
* linux/arch/arm/kernel/dma-rpc.c * linux/arch/arm/mach-rpc/dma.c
* *
* Copyright (C) 1998 Russell King * Copyright (C) 1998 Russell King
* *
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/mman.h> #include <linux/mman.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <asm/page.h> #include <asm/page.h>
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/spinlock.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
extern const struct exception_table_entry __start___ex_table[]; extern const struct exception_table_entry __start___ex_table[];
...@@ -41,18 +42,19 @@ search_exception_table(unsigned long addr) ...@@ -41,18 +42,19 @@ search_exception_table(unsigned long addr)
/* There is only the kernel to search. */ /* There is only the kernel to search. */
ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr); ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr);
#else #else
/* The kernel is the last "module" -- no need to treat it special. */
unsigned long flags; unsigned long flags;
struct module *mp; struct list_head *l;
ret = 0; ret = 0;
/* The kernel is the last "module" -- no need to treat it special. */
spin_lock_irqsave(&modlist_lock, flags); spin_lock_irqsave(&modlist_lock, flags);
for (mp = module_list; mp != NULL; mp = mp->next) { list_for_each(l, &extables) {
if (mp->ex_table_start == NULL || struct exception_table *ex
!(mp->flags & (MOD_RUNNING | MOD_INITIALIZING))) = list_entry(l, struct exception_table, list);
if (ex->num_entries == 0)
continue; continue;
ret = search_one_table(mp->ex_table_start, ret = search_one_table(ex->entry,
mp->ex_table_end - 1, addr); ex->entry + ex->num_entries - 1, addr);
if (ret) if (ret)
break; break;
} }
......
...@@ -179,13 +179,13 @@ adfs_mode2atts(struct super_block *sb, struct inode *inode) ...@@ -179,13 +179,13 @@ adfs_mode2atts(struct super_block *sb, struct inode *inode)
* Convert an ADFS time to Unix time. ADFS has a 40-bit centi-second time * Convert an ADFS time to Unix time. ADFS has a 40-bit centi-second time
* referenced to 1 Jan 1900 (til 2248) * referenced to 1 Jan 1900 (til 2248)
*/ */
static unsigned int static void
adfs_adfs2unix_time(struct inode *inode) adfs_adfs2unix_time(struct timespec *tv, struct inode *inode)
{ {
unsigned int high, low; unsigned int high, low;
if (ADFS_I(inode)->stamped == 0) if (ADFS_I(inode)->stamped == 0)
return CURRENT_TIME; goto cur_time;
high = ADFS_I(inode)->loadaddr << 24; high = ADFS_I(inode)->loadaddr << 24;
low = ADFS_I(inode)->execaddr; low = ADFS_I(inode)->execaddr;
...@@ -195,17 +195,32 @@ adfs_adfs2unix_time(struct inode *inode) ...@@ -195,17 +195,32 @@ adfs_adfs2unix_time(struct inode *inode)
/* Files dated pre 01 Jan 1970 00:00:00. */ /* Files dated pre 01 Jan 1970 00:00:00. */
if (high < 0x336e996a) if (high < 0x336e996a)
return 0; goto too_early;
/* Files dated post 18 Jan 2038 03:14:05. */ /* Files dated post 18 Jan 2038 03:14:05. */
if (high >= 0x656e9969) if (high >= 0x656e9969)
return 0x7ffffffd; goto too_late;
/* discard 2208988800 (0x336e996a00) seconds of time */ /* discard 2208988800 (0x336e996a00) seconds of time */
high -= 0x336e996a; high -= 0x336e996a;
/* convert 40-bit centi-seconds to 32-bit seconds */ /* convert 40-bit centi-seconds to 32-bit seconds */
return (((high % 100) << 8) + low) / 100 + (high / 100 << 8); tv->tv_sec = (((high % 100) << 8) + low) / 100 + (high / 100 << 8);
tv->tv_nsec = 0;
return;
cur_time:
*tv = CURRENT_TIME;
return;
too_early:
tv->tv_sec = tv->tv_nsec = 0;
return;
too_late:
tv->tv_sec = 0x7ffffffd;
tv->tv_nsec = 0;
return;
} }
/* /*
...@@ -271,10 +286,9 @@ adfs_iget(struct super_block *sb, struct object_info *obj) ...@@ -271,10 +286,9 @@ adfs_iget(struct super_block *sb, struct object_info *obj)
ADFS_I(inode)->stamped = ((obj->loadaddr & 0xfff00000) == 0xfff00000); ADFS_I(inode)->stamped = ((obj->loadaddr & 0xfff00000) == 0xfff00000);
inode->i_mode = adfs_atts2mode(sb, inode); inode->i_mode = adfs_atts2mode(sb, inode);
inode->i_mtime.tv_sec = adfs_adfs2unix_time(&inode->i_mtime, inode);
inode->i_atime.tv_sec = inode->i_atime = inode->i_mtime;
inode->i_ctime.tv_sec = adfs_adfs2unix_time(inode); inode->i_ctime = inode->i_mtime;
inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_atime.tv_nsec = 0;
if (S_ISDIR(inode->i_mode)) { if (S_ISDIR(inode->i_mode)) {
inode->i_op = &adfs_dir_inode_operations; inode->i_op = &adfs_dir_inode_operations;
......
...@@ -9,10 +9,14 @@ ...@@ -9,10 +9,14 @@
/* /*
* 32-bit code is always OK. Some cpus can do 26-bit, some can't. * 32-bit code is always OK. Some cpus can do 26-bit, some can't.
*/ */
#define ELF_PROC_OK(x) \ #define ELF_PROC_OK(x) (ELF_THUMB_OK(x) && ELF_26BIT_OK(x))
#define ELF_THUMB_OK(x) \
(( (elf_hwcap & HWCAP_THUMB) && ((x)->e_entry & 1) == 1) || \ (( (elf_hwcap & HWCAP_THUMB) && ((x)->e_entry & 1) == 1) || \
(!(elf_hwcap & HWCAP_THUMB) && ((x)->e_entry & 3) == 0) || \ (!(elf_hwcap & HWCAP_THUMB) && ((x)->e_entry & 3) == 0))
( (elf_hwcap & HWCAP_26BIT) && (x)->e_flags & EF_ARM_APCS26) || \
#define ELF_26BIT_OK(x) \
(( (elf_hwcap & HWCAP_26BIT) && (x)->e_flags & EF_ARM_APCS26) || \
((x)->e_flags & EF_ARM_APCS26) == 0) ((x)->e_flags & EF_ARM_APCS26) == 0)
/* Old NetWinder binaries were compiled in such a way that the iBCS /* Old NetWinder binaries were compiled in such a way that the iBCS
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/interrupt.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/dma.h> #include <asm/dma.h>
......
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