Commit e88ce280 authored by Richard Henderson's avatar Richard Henderson

Merge are.twiddle.net:/home/rth/BK/linus-2.5

into are.twiddle.net:/home/rth/BK/axp-2.5
parents 3a708694 83c65b19
......@@ -204,6 +204,14 @@ M: Juergen Fischer <fischer@norbit.de>
L: linux-scsi@vger.kernel.org
S: Maintained
ALPHA PORT
P: Richard Henderson
M: rth@twiddle.net
S: Odd Fixes for 2.4; Maintained for 2.5.
P: Ivan Kokshaysky
M: ink@jurassic.park.msu.ru
S: Maintained for 2.4; PCI support for 2.5.
APM DRIVER
P: Stephen Rothwell
M: sfr@canb.auug.org.au
......
......@@ -806,6 +806,8 @@ if PCI
source "drivers/message/fusion/Kconfig"
endif
source "drivers/ieee1394/Kconfig"
source "net/Kconfig"
......
This diff is collapsed.
......@@ -34,7 +34,7 @@ obj-y += core_apecs.o core_cia.o core_irongate.o core_lca.o core_mcpcia.o \
sys_alcor.o sys_cabriolet.o sys_dp264.o sys_eb64p.o sys_eiger.o \
sys_jensen.o sys_miata.o sys_mikasa.o sys_nautilus.o sys_titan.o \
sys_noritake.o sys_rawhide.o sys_ruffian.o sys_rx164.o \
sys_sable.o sys_sio.o sys_sx164.o sys_takara.o sys_rx164.o \
sys_sable.o sys_sio.o sys_sx164.o sys_takara.o \
sys_wildfire.o core_wildfire.o irq_pyxis.o
else
......
......@@ -887,15 +887,6 @@ sys_pipe:
ret
.end sys_pipe
.align 4
.globl alpha_create_module
.ent alpha_create_module
alpha_create_module:
.prologue 0
mov $sp, $18
jmp $31, do_alpha_create_module
.end alpha_create_module
.align 4
.globl sys_ptrace
.ent sys_ptrace
......
......@@ -34,12 +34,12 @@ static void el_process_subpackets(struct el_subpacket *, int);
* Generic
*/
void
mchk_dump_mem(void *data, int length, char **annotation)
mchk_dump_mem(void *data, size_t length, char **annotation)
{
unsigned long *ldata = data;
int i;
size_t i;
for(i = 0; (i * sizeof(*ldata)) < length; i++) {
for (i = 0; (i * sizeof(*ldata)) < length; i++) {
if (annotation && !annotation[i])
annotation = NULL;
printk("%s %08x: %016lx %s\n",
......@@ -624,7 +624,7 @@ el_process_subpackets(struct el_subpacket *header, int packet_count)
subpacket = (struct el_subpacket *)
((unsigned long)header + header->length);
for(i = 0; subpacket && i < packet_count; i++) {
for (i = 0; subpacket && i < packet_count; i++) {
printk("%sPROCESSING SUBPACKET %d\n", err_print_prefix, i);
subpacket = el_process_subpacket(subpacket);
}
......@@ -636,7 +636,7 @@ el_process_subpacket_reg(struct el_subpacket *header)
struct el_subpacket *next = NULL;
struct el_subpacket_handler *h = subpacket_handler_list;
for(; h && h->class != header->class; h = h->next);
for (; h && h->class != header->class; h = h->next);
if (h) next = h->handler(header);
return next;
......@@ -673,7 +673,7 @@ el_annotate_subpacket(struct el_subpacket *header)
struct el_subpacket_annotation *a;
char **annotation = NULL;
for(a = subpacket_annotation_list; a; a = a->next) {
for (a = subpacket_annotation_list; a; a = a->next) {
if (a->class == header->class &&
a->type == header->type &&
a->revision == header->revision) {
......@@ -700,7 +700,7 @@ cdl_process_console_data_log(int cpu, struct percpu_struct *pcpu)
"*** Error(s) were logged on a previous boot\n",
err_print_prefix, cpu);
for(err = 0; header && (header->class != EL_CLASS__TERMINATION); err++)
for (err = 0; header && (header->class != EL_CLASS__TERMINATION); err++)
header = el_process_subpacket(header);
/* let the console know it's ok to clear the error(s) at restart */
......@@ -715,9 +715,9 @@ void __init
cdl_check_console_data_log(void)
{
struct percpu_struct *pcpu;
int cpu;
unsigned long cpu;
for(cpu = 0; cpu < hwrpb->nr_processors; cpu++) {
for (cpu = 0; cpu < hwrpb->nr_processors; cpu++) {
pcpu = (struct percpu_struct *)
((unsigned long)hwrpb + hwrpb->processor_offset
+ cpu * hwrpb->processor_size);
......@@ -734,7 +734,7 @@ cdl_register_subpacket_annotation(struct el_subpacket_annotation *new)
if (a == NULL) subpacket_annotation_list = new;
else {
for(; a->next != NULL; a = a->next) {
for (; a->next != NULL; a = a->next) {
if ((a->class == new->class && a->type == new->type) ||
a == new) {
printk("Attempted to re-register "
......@@ -756,7 +756,7 @@ cdl_register_subpacket_handler(struct el_subpacket_handler *new)
if (h == NULL) subpacket_handler_list = new;
else {
for(; h->next != NULL; h = h->next) {
for (; h->next != NULL; h = h->next) {
if (h->class == new->class || h == new) {
printk("Attempted to re-register "
"subpacket handler\n");
......
......@@ -133,7 +133,7 @@ struct el_subpacket_handler {
*/
extern char *err_print_prefix;
extern void mchk_dump_mem(void *, int, char **);
extern void mchk_dump_mem(void *, size_t, char **);
extern void mchk_dump_logout_frame(struct el_common *);
extern void ev7_register_error_handlers(void);
extern void ev7_machine_check(u64, u64, struct pt_regs *);
......
......@@ -252,7 +252,7 @@ parse_hex_value (const char *buffer,
{
unsigned char hexnum [HEX_DIGITS];
unsigned long value;
int i;
unsigned long i;
if (!count)
return -EINVAL;
......
......@@ -45,7 +45,6 @@
extern int do_pipe(int *);
extern asmlinkage unsigned long sys_brk(unsigned long);
extern asmlinkage unsigned long sys_create_module(char *, unsigned long);
/*
* Brk needs to return an error. Still support Linux's brk(0) query idiom,
......@@ -103,7 +102,7 @@ struct osf_dirent {
struct osf_dirent_callback {
struct osf_dirent *dirent;
long *basep;
int count;
unsigned int count;
int error;
};
......@@ -113,7 +112,7 @@ osf_filldir(void *__buf, const char *name, int namlen, loff_t offset,
{
struct osf_dirent *dirent;
struct osf_dirent_callback *buf = (struct osf_dirent_callback *) __buf;
int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
unsigned int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
buf->error = -EINVAL; /* only used if we fail */
if (reclen > buf->count)
......@@ -641,33 +640,6 @@ osf_sigstack(struct sigstack *uss, struct sigstack *uoss)
return error;
}
/*
* The Linux kernel isn't good at returning values that look
* like negative longs (they are mistaken as error values).
* Until that is fixed, we need this little workaround for
* create_module() because it's one of the few system calls
* that return kernel addresses (which are negative).
*/
asmlinkage unsigned long
do_alpha_create_module(char *module_name, unsigned long size,
struct pt_regs *regs)
{
long retval;
lock_kernel();
retval = sys_create_module(module_name, size);
/* We get either a module address or an error number, and we know
the error number is a small negative number, while the address
is always negative but much larger. */
if (retval + 1000 < 0)
regs->r0 = 0;
unlock_kernel();
return retval;
}
asmlinkage long
osf_sysinfo(int command, char *buf, long count)
{
......@@ -1343,14 +1315,14 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (addr) {
addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
if (addr != -ENOMEM)
if (addr != (unsigned long) -ENOMEM)
return addr;
}
/* Next, try allocating at TASK_UNMAPPED_BASE. */
addr = arch_get_unmapped_area_1 (PAGE_ALIGN(TASK_UNMAPPED_BASE),
len, limit);
if (addr != -ENOMEM)
if (addr != (unsigned long) -ENOMEM)
return addr;
/* Finally, try allocating in low memory. */
......
......@@ -304,7 +304,7 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
== (PCI_BASE_ADDRESS_SPACE_MEMORY
| PCI_BASE_ADDRESS_MEM_TYPE_64)) {
pci_write_config_dword(dev, where+4, 0);
printk(KERN_WARNING "PCI: dev %s type 64-bit\n", dev->name);
printk(KERN_WARNING "PCI: dev %s type 64-bit\n", dev->dev.name);
}
/* ??? FIXME -- record old value for shutdown. */
......@@ -474,5 +474,5 @@ int
pci_controller_num(struct pci_dev *pdev)
{
struct pci_controller *hose = pdev->sysdata;
return (hose ? hose->index : -ENXIO);
return (hose ? (int) hose->index : -ENXIO);
}
......@@ -98,9 +98,11 @@ unsigned char aux_device_present = 0xaa;
#define N(a) (sizeof(a)/sizeof(a[0]))
static struct alpha_machine_vector *get_sysvec(long, long, long);
static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long,
unsigned long);
static struct alpha_machine_vector *get_sysvec_byname(const char *);
static void get_sysnames(long, long, long, char **, char **);
static void get_sysnames(unsigned long, unsigned long, unsigned long,
char **, char **);
static char command_line[COMMAND_LINE_SIZE];
char saved_command_line[COMMAND_LINE_SIZE];
......@@ -202,7 +204,7 @@ reserve_std_resources(void)
};
struct resource *io = &ioport_resource;
long i;
size_t i;
if (hose_head) {
struct pci_controller *hose;
......@@ -258,7 +260,7 @@ setup_memory(void *kernel_end)
unsigned long start_kernel_pfn, end_kernel_pfn;
unsigned long bootmap_size, bootmap_pages, bootmap_start;
unsigned long start, end;
int i;
unsigned long i;
/* Find free clusters, and init and free the bootmem accordingly. */
memdesc = (struct memdesc_struct *)
......@@ -327,7 +329,7 @@ setup_memory(void *kernel_end)
}
}
if (bootmap_start == -1) {
if (bootmap_start == ~0UL) {
max_low_pfn >>= 1;
goto try_again;
}
......@@ -398,7 +400,7 @@ page_is_ram(unsigned long pfn)
{
struct memclust_struct * cluster;
struct memdesc_struct * memdesc;
int i;
unsigned long i;
memdesc = (struct memdesc_struct *)
(hwrpb->mddt_offset + (unsigned long) hwrpb);
......@@ -691,7 +693,7 @@ static char tsunami_names[][16] = {
static int tsunami_indices[] = {0,1,2,3,4,5,6,7,8,9,10,11,12};
static struct alpha_machine_vector * __init
get_sysvec(long type, long variation, long cpu)
get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu)
{
static struct alpha_machine_vector *systype_vecs[] __initdata =
{
......@@ -798,10 +800,6 @@ get_sysvec(long type, long variation, long cpu)
struct alpha_machine_vector *vec;
/* Restore real CABRIO and EB66+ family names, ie EB64+ and EB66 */
if (type < 0)
type = -type;
/* Search the system tables first... */
vec = NULL;
if (type < N(systype_vecs)) {
......@@ -818,7 +816,7 @@ get_sysvec(long type, long variation, long cpu)
if (!vec) {
/* Member ID is a bit-field. */
long member = (variation >> 10) & 0x3f;
unsigned long member = (variation >> 10) & 0x3f;
cpu &= 0xffffffff; /* make it usable */
......@@ -917,8 +915,9 @@ get_sysvec_byname(const char *name)
&xlt_mv
};
int i, n = sizeof(all_vecs)/sizeof(*all_vecs);
for (i = 0; i < n; ++i) {
size_t i;
for (i = 0; i < N(all_vecs); ++i) {
struct alpha_machine_vector *mv = all_vecs[i];
if (strcasecmp(mv->vector_name, name) == 0)
return mv;
......@@ -927,14 +926,10 @@ get_sysvec_byname(const char *name)
}
static void
get_sysnames(long type, long variation, long cpu,
get_sysnames(unsigned long type, unsigned long variation, unsigned long cpu,
char **type_name, char **variation_name)
{
long member;
/* Restore real CABRIO and EB66+ family names, ie EB64+ and EB66 */
if (type < 0)
type = -type;
unsigned long member;
/* If not in the tables, make it UNKNOWN,
else set type name to family */
......@@ -952,7 +947,7 @@ get_sysnames(long type, long variation, long cpu,
return;
}
/* Set variation to "0"; if variation is zero, done */
/* Set variation to "0"; if variation is zero, done. */
*variation_name = systype_names[0];
if (variation == 0) {
return;
......@@ -1042,7 +1037,8 @@ static int
get_nr_processors(struct percpu_struct *cpubase, unsigned long num)
{
struct percpu_struct *cpu;
int i, count = 0;
unsigned long i;
int count = 0;
for (i = 0; i < num; i++) {
cpu = (struct percpu_struct *)
......
......@@ -970,8 +970,8 @@ void SMC37c669_display_device_info(
static struct DEVICE_CONFIG {
unsigned int port1;
unsigned int port2;
unsigned int irq;
unsigned int drq;
int irq;
int drq;
} local_config [NUM_FUNCS];
/*
......@@ -1097,11 +1097,11 @@ static struct DEVICE_CONFIG *SMC37c669_get_config(
);
static int SMC37c669_xlate_irq(
unsigned int irq
int irq
);
static int SMC37c669_xlate_drq(
unsigned int drq
int drq
);
static spinlock_t smc_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
......@@ -2260,7 +2260,7 @@ static struct DEVICE_CONFIG * __init SMC37c669_get_config( unsigned int func )
**
**--
*/
static int __init SMC37c669_xlate_irq ( unsigned int irq )
static int __init SMC37c669_xlate_irq ( int irq )
{
int i, translated_irq = -1;
......@@ -2312,7 +2312,7 @@ static int __init SMC37c669_xlate_irq ( unsigned int irq )
**
**--
*/
static int __init SMC37c669_xlate_drq ( unsigned int drq )
static int __init SMC37c669_xlate_drq ( int drq )
{
int i, translated_drq = -1;
......
......@@ -499,7 +499,7 @@ void __init
setup_smp(void)
{
struct percpu_struct *cpubase, *cpu;
int i;
unsigned long i;
if (boot_cpuid != 0) {
printk(KERN_WARNING "SMP: Booting off cpu %d instead of 0?\n",
......@@ -516,7 +516,7 @@ setup_smp(void)
((char*)hwrpb + hwrpb->processor_offset);
boot_cpu_palrev = cpubase->pal_revision;
for (i = 0; i < hwrpb->nr_processors; i++ ) {
for (i = 0; i < hwrpb->nr_processors; i++) {
cpu = (struct percpu_struct *)
((char *)cpubase + i*hwrpb->processor_size);
if ((cpu->flags & 0x1cc) == 0x1cc) {
......
......@@ -162,8 +162,8 @@ srm_env_write(struct file *file, const char *buffer, unsigned long count,
res = (int) ret1;
}
out:
free_page((unsigned long)buf);
return res;
}
......
......@@ -324,10 +324,10 @@ sys_call_table:
.quad sys_old_adjtimex
.quad sys_swapoff
.quad sys_getdents /* 305 */
.quad alpha_create_module
.quad sys_ni_syscall /* 306: old create_module */
.quad sys_init_module
.quad sys_delete_module
.quad sys_get_kernel_syms
.quad sys_ni_syscall /* 309: old get_kernel_syms */
.quad sys_syslog /* 310 */
.quad sys_reboot
.quad sys_clone
......@@ -365,7 +365,7 @@ sys_call_table:
.quad sys_getresuid
.quad sys_pciconfig_read /* 345 */
.quad sys_pciconfig_write
.quad sys_query_module
.quad sys_ni_syscall /* 347: old query_module */
.quad sys_prctl
.quad sys_pread64
.quad sys_pwrite64 /* 350 */
......@@ -423,7 +423,13 @@ sys_call_table:
.quad sys_io_cancel
.quad sys_ni_syscall /* 403, sys_alloc_hugepages */
.quad sys_ni_syscall /* 404, sys_free_hugepages */
.quad sys_exit_group
.quad sys_exit_group /* 405 */
.quad sys_lookup_dcookie
.quad sys_epoll_create
.quad sys_epoll_ctl
.quad sys_epoll_wait
.quad sys_remap_file_pages /* 410 */
.quad sys_set_tid_address
.size sys_call_table, . - sys_call_table
.type sys_call_table, @object
......
......@@ -316,7 +316,7 @@ time_init(void)
diff = cycle_freq - est_cycle_freq;
if (diff < 0)
diff = -diff;
if (diff > one_percent) {
if ((unsigned long)diff > one_percent) {
cycle_freq = est_cycle_freq;
printk("HWRPB cycle frequency bogus. "
"Estimated %lu Hz\n", cycle_freq);
......
......@@ -48,6 +48,7 @@ alpha_read_fp_reg (unsigned long reg)
case 29: STT(29, val); break;
case 30: STT(30, val); break;
case 31: STT(31, val); break;
default: return 0;
}
return val;
}
......@@ -141,6 +142,7 @@ alpha_read_fp_reg_s (unsigned long reg)
case 29: STS(29, val); break;
case 30: STS(30, val); break;
case 31: STS(31, val); break;
default: return 0;
}
return val;
}
......
......@@ -414,7 +414,7 @@ void _memcpy_fromio(void * to, unsigned long from, long count)
/* Optimize co-aligned transfers. Everything else gets handled
a byte at a time. */
if (count >= 8 && ((long)to & 7) == (from & 7)) {
if (count >= 8 && ((unsigned long)to & 7) == (from & 7)) {
count -= 8;
do {
*(u64 *)to = __raw_readq(from);
......@@ -425,7 +425,7 @@ void _memcpy_fromio(void * to, unsigned long from, long count)
count += 8;
}
if (count >= 4 && ((long)to & 3) == (from & 3)) {
if (count >= 4 && ((unsigned long)to & 3) == (from & 3)) {
count -= 4;
do {
*(u32 *)to = __raw_readl(from);
......@@ -436,7 +436,7 @@ void _memcpy_fromio(void * to, unsigned long from, long count)
count += 4;
}
if (count >= 2 && ((long)to & 1) == (from & 1)) {
if (count >= 2 && ((unsigned long)to & 1) == (from & 1)) {
count -= 2;
do {
*(u16 *)to = __raw_readw(from);
......@@ -465,7 +465,7 @@ void _memcpy_toio(unsigned long to, const void * from, long count)
a byte at a time. */
/* FIXME -- align FROM. */
if (count >= 8 && (to & 7) == ((long)from & 7)) {
if (count >= 8 && (to & 7) == ((unsigned long)from & 7)) {
count -= 8;
do {
__raw_writeq(*(const u64 *)from, to);
......@@ -476,7 +476,7 @@ void _memcpy_toio(unsigned long to, const void * from, long count)
count += 8;
}
if (count >= 4 && (to & 3) == ((long)from & 3)) {
if (count >= 4 && (to & 3) == ((unsigned long)from & 3)) {
count -= 4;
do {
__raw_writel(*(const u32 *)from, to);
......@@ -487,7 +487,7 @@ void _memcpy_toio(unsigned long to, const void * from, long count)
count += 4;
}
if (count >= 2 && (to & 1) == ((long)from & 1)) {
if (count >= 2 && (to & 1) == ((unsigned long)from & 1)) {
count -= 2;
do {
__raw_writew(*(const u16 *)from, to);
......
......@@ -242,7 +242,7 @@ callback_init(void * kernel_end)
if (alpha_using_srm) {
static struct vm_struct console_remap_vm;
unsigned long vaddr = VMALLOC_START;
long i, j;
unsigned long i, j;
/* Set up the third level PTEs and update the virtual
addresses of the CRB entries. */
......
......@@ -18,6 +18,8 @@
#include <linux/config.h> /* for CONFIG_SCSI_LOGGING */
#include <linux/devfs_fs_kernel.h>
#include <linux/proc_fs.h>
#include <linux/init.h>
/*
* Some of the public constants are being moved to this file.
......
......@@ -3,6 +3,8 @@
#include <linux/config.h>
#include <linux/threads.h>
#include <linux/cache.h>
/* entry.S is sensitive to the offsets of these fields */
typedef struct {
......
#ifndef _ASM_ALPHA_MODULE_H
#define _ASM_ALPHA_MODULE_H
/*
* This file contains the alpha architecture specific module code.
*/
#define module_map(x) vmalloc(x)
#define module_unmap(x) vfree(x)
#define module_arch_init(x) alpha_module_init(x)
#define arch_init_modules(x) alpha_init_modules(x)
static inline int
alpha_module_init(struct module *mod)
{
if (!mod_bound(mod->gp - 0x8000, 0, mod)) {
printk(KERN_ERR "module_arch_init: mod->gp out of bounds.\n");
return 1;
}
return 0;
}
static inline void
alpha_init_modules(struct module *mod)
{
__asm__("stq $29,%0" : "=m" (mod->gp));
}
/* Module rewrite still in progress. */
#endif /* _ASM_ALPHA_MODULE_H */
......@@ -343,7 +343,13 @@
#define __NR_alloc_hugepages 403
#define __NR_free_hugepages 404
#define __NR_exit_group 405
#define NR_SYSCALLS 406
#define __NR_lookup_dcookie 406
#define __NR_sys_epoll_create 407
#define __NR_sys_epoll_ctl 408
#define __NR_sys_epoll_wait 409
#define __NR_remap_file_pages 410
#define __NR_set_tid_address 411
#define NR_SYSCALLS 412
#if defined(__GNUC__)
......
This diff is collapsed.
......@@ -60,10 +60,8 @@ extern char *linux_banner;
static int init(void *);
extern void init_IRQ(void);
extern void init_modules(void);
extern void sock_init(void);
extern void fork_init(unsigned long);
extern void extable_init(void);
extern void mca_init(void);
extern void sbus_init(void);
extern void sysctl_init(void);
......@@ -75,6 +73,10 @@ extern void radix_tree_init(void);
extern void free_initmem(void);
extern void populate_rootfs(void);
#ifdef CONFIG_MODULES
extern void extable_init(void);
#endif
#ifdef CONFIG_TC
extern void tc_init(void);
#endif
......@@ -395,7 +397,9 @@ asmlinkage void __init start_kernel(void)
printk("Kernel command line: %s\n", saved_command_line);
parse_options(command_line);
trap_init();
#ifdef CONFIG_MODULES
extable_init();
#endif
rcu_init();
init_IRQ();
sched_init();
......
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