From 3b602bb7b62e540ff7f59c7e0938ee813743b987 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 11 Jul 2005 13:44:56 -0700 Subject: [PATCH] --- yaml --- r: 4600 b: refs/heads/master c: 328f314a89fd24e50fdf22c81efb2a468fdf25b5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/kernel-parameters.txt | 3 --- trunk/arch/ia64/hp/sim/simeth.c | 6 ++---- trunk/arch/ia64/hp/sim/simserial.c | 7 ++----- trunk/arch/ia64/kernel/entry.S | 2 +- trunk/arch/ia64/kernel/iosapic.c | 13 ++++--------- trunk/arch/ia64/kernel/irq_ia64.c | 15 +++++++++++++-- trunk/arch/ia64/kernel/perfmon.c | 1 + trunk/arch/ia64/sn/kernel/tiocx.c | 1 + trunk/arch/ia64/sn/kernel/xpc_main.c | 16 +++++++++++----- trunk/arch/v850/lib/checksum.c | 3 +-- trunk/include/asm-ia64/hw_irq.h | 1 + trunk/include/asm-ia64/sn/xp.h | 1 + trunk/include/asm-sparc64/seccomp.h | 21 +++++++++++++++++++++ trunk/include/asm-v850/checksum.h | 11 +++++------ trunk/include/asm-v850/mmu.h | 17 ++++++++++++++--- 16 files changed, 79 insertions(+), 41 deletions(-) create mode 100644 trunk/include/asm-sparc64/seccomp.h diff --git a/[refs] b/[refs] index fe96ebec6156..fc38c9a0b2b8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1604d9c8f8dffafe3a077dc5ae7c935d2318bcf6 +refs/heads/master: 328f314a89fd24e50fdf22c81efb2a468fdf25b5 diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 753db6d8b745..4ec75c06bca4 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -758,9 +758,6 @@ running once the system is up. maxcpus= [SMP] Maximum number of processors that an SMP kernel should make use of - max_addr=[KMG] [KNL,BOOT,ia64] All physical memory greater than or - equal to this physical address is ignored. - max_luns= [SCSI] Maximum number of LUNs to probe Should be between 1 and 2^32-1. diff --git a/trunk/arch/ia64/hp/sim/simeth.c b/trunk/arch/ia64/hp/sim/simeth.c index 0639ec0ed015..ae84a1018a89 100644 --- a/trunk/arch/ia64/hp/sim/simeth.c +++ b/trunk/arch/ia64/hp/sim/simeth.c @@ -191,7 +191,7 @@ simeth_probe1(void) unsigned char mac_addr[ETH_ALEN]; struct simeth_local *local; struct net_device *dev; - int fd, i, err, rc; + int fd, i, err; /* * XXX Fix me @@ -228,9 +228,7 @@ simeth_probe1(void) return err; } - if ((rc = assign_irq_vector(AUTO_ASSIGN)) < 0) - panic("%s: out of interrupt vectors!\n", __FUNCTION__); - dev->irq = rc; + dev->irq = assign_irq_vector(AUTO_ASSIGN); /* * attach the interrupt in the simulator, this does enable interrupts diff --git a/trunk/arch/ia64/hp/sim/simserial.c b/trunk/arch/ia64/hp/sim/simserial.c index 7dcb8582ae0d..7a8ae0f4b387 100644 --- a/trunk/arch/ia64/hp/sim/simserial.c +++ b/trunk/arch/ia64/hp/sim/simserial.c @@ -982,7 +982,7 @@ static struct tty_operations hp_ops = { static int __init simrs_init (void) { - int i, rc; + int i; struct serial_state *state; if (!ia64_platform_is("hpsim")) @@ -1017,10 +1017,7 @@ simrs_init (void) if (state->type == PORT_UNKNOWN) continue; if (!state->irq) { - if ((rc = assign_irq_vector(AUTO_ASSIGN)) < 0) - panic("%s: out of interrupt vectors!\n", - __FUNCTION__); - state->irq = rc; + state->irq = assign_irq_vector(AUTO_ASSIGN); ia64_ssc_connect_irq(KEYBOARD_INTR, state->irq); } diff --git a/trunk/arch/ia64/kernel/entry.S b/trunk/arch/ia64/kernel/entry.S index bb9a506deb78..69f88d561d62 100644 --- a/trunk/arch/ia64/kernel/entry.S +++ b/trunk/arch/ia64/kernel/entry.S @@ -1249,7 +1249,7 @@ ENTRY(sys_rt_sigreturn) stf.spill [r17]=f11 adds out0=16,sp // out0 = &sigscratch br.call.sptk.many rp=ia64_rt_sigreturn -.ret19: .restore sp,0 +.ret19: .restore sp 0 adds sp=16,sp ;; ld8 r9=[sp] // load new ar.unat diff --git a/trunk/arch/ia64/kernel/iosapic.c b/trunk/arch/ia64/kernel/iosapic.c index 7936b62f7a2e..c170be095ccd 100644 --- a/trunk/arch/ia64/kernel/iosapic.c +++ b/trunk/arch/ia64/kernel/iosapic.c @@ -489,6 +489,8 @@ static int iosapic_find_sharable_vector (unsigned long trigger, unsigned long po } } } + if (vector < 0) + panic("%s: out of interrupt vectors!\n", __FUNCTION__); return vector; } @@ -504,8 +506,6 @@ iosapic_reassign_vector (int vector) if (!list_empty(&iosapic_intr_info[vector].rtes)) { new_vector = assign_irq_vector(AUTO_ASSIGN); - if (new_vector < 0) - panic("%s: out of interrupt vectors!\n", __FUNCTION__); printk(KERN_INFO "Reassigning vector %d to %d\n", vector, new_vector); memcpy(&iosapic_intr_info[new_vector], &iosapic_intr_info[vector], sizeof(struct iosapic_intr_info)); @@ -734,12 +734,9 @@ iosapic_register_intr (unsigned int gsi, spin_unlock_irqrestore(&iosapic_lock, flags); /* If vector is running out, we try to find a sharable vector */ - vector = assign_irq_vector(AUTO_ASSIGN); - if (vector < 0) { + vector = assign_irq_vector_nopanic(AUTO_ASSIGN); + if (vector < 0) vector = iosapic_find_sharable_vector(trigger, polarity); - if (vector < 0) - panic("%s: out of interrupt vectors!\n", __FUNCTION__); - } spin_lock_irqsave(&irq_descp(vector)->lock, flags); spin_lock(&iosapic_lock); @@ -887,8 +884,6 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi, break; case ACPI_INTERRUPT_INIT: vector = assign_irq_vector(AUTO_ASSIGN); - if (vector < 0) - panic("%s: out of interrupt vectors!\n", __FUNCTION__); delivery = IOSAPIC_INIT; break; case ACPI_INTERRUPT_CPEI: diff --git a/trunk/arch/ia64/kernel/irq_ia64.c b/trunk/arch/ia64/kernel/irq_ia64.c index 6c4d59fd0364..4fe60c7a2e90 100644 --- a/trunk/arch/ia64/kernel/irq_ia64.c +++ b/trunk/arch/ia64/kernel/irq_ia64.c @@ -63,19 +63,30 @@ EXPORT_SYMBOL(isa_irq_to_vector_map); static unsigned long ia64_vector_mask[BITS_TO_LONGS(IA64_NUM_DEVICE_VECTORS)]; int -assign_irq_vector (int irq) +assign_irq_vector_nopanic (int irq) { int pos, vector; again: pos = find_first_zero_bit(ia64_vector_mask, IA64_NUM_DEVICE_VECTORS); vector = IA64_FIRST_DEVICE_VECTOR + pos; if (vector > IA64_LAST_DEVICE_VECTOR) - return -ENOSPC; + return -1; if (test_and_set_bit(pos, ia64_vector_mask)) goto again; return vector; } +int +assign_irq_vector (int irq) +{ + int vector = assign_irq_vector_nopanic(irq); + + if (vector < 0) + panic("assign_irq_vector: out of interrupt vectors!"); + + return vector; +} + void free_irq_vector (int vector) { diff --git a/trunk/arch/ia64/kernel/perfmon.c b/trunk/arch/ia64/kernel/perfmon.c index b8ebb8e427ef..6407bff6bfd7 100644 --- a/trunk/arch/ia64/kernel/perfmon.c +++ b/trunk/arch/ia64/kernel/perfmon.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/ia64/sn/kernel/tiocx.c b/trunk/arch/ia64/sn/kernel/tiocx.c index 254fe15c064b..c1cbcd1a1398 100644 --- a/trunk/arch/ia64/sn/kernel/tiocx.c +++ b/trunk/arch/ia64/sn/kernel/tiocx.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/ia64/sn/kernel/xpc_main.c b/trunk/arch/ia64/sn/kernel/xpc_main.c index d580adcad927..177ddb748ebe 100644 --- a/trunk/arch/ia64/sn/kernel/xpc_main.c +++ b/trunk/arch/ia64/sn/kernel/xpc_main.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -309,7 +308,8 @@ xpc_make_first_contact(struct xpc_partition *part) "partition %d\n", XPC_PARTID(part)); /* wait a 1/4 of a second or so */ - msleep_interruptible(250); + set_current_state(TASK_INTERRUPTIBLE); + (void) schedule_timeout(0.25 * HZ); if (part->act_state == XPC_P_DEACTIVATING) { return part->reason; @@ -841,7 +841,9 @@ xpc_do_exit(void) down(&xpc_discovery_exited); - msleep_interruptible(300); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(0.3 * HZ); + set_current_state(TASK_RUNNING); /* wait for all partitions to become inactive */ @@ -858,8 +860,12 @@ xpc_do_exit(void) } } - if (active_part_count) - msleep_interruptible(300); + if (active_part_count) { + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(0.3 * HZ); + set_current_state(TASK_RUNNING); + } + } while (active_part_count > 0); diff --git a/trunk/arch/v850/lib/checksum.c b/trunk/arch/v850/lib/checksum.c index fa5872633075..d308b724c023 100644 --- a/trunk/arch/v850/lib/checksum.c +++ b/trunk/arch/v850/lib/checksum.c @@ -138,8 +138,7 @@ unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, * Copy from userspace and compute checksum. If we catch an exception * then zero the rest of the buffer. */ -unsigned int csum_partial_copy_from_user (const unsigned char *src, - unsigned char *dst, +unsigned int csum_partial_copy_from_user (const unsigned char *src, unsigned char *dst, int len, unsigned int sum, int *err_ptr) { diff --git a/trunk/include/asm-ia64/hw_irq.h b/trunk/include/asm-ia64/hw_irq.h index 041ab8c51a64..cd4e06b74ab6 100644 --- a/trunk/include/asm-ia64/hw_irq.h +++ b/trunk/include/asm-ia64/hw_irq.h @@ -81,6 +81,7 @@ extern __u8 isa_irq_to_vector_map[16]; extern struct hw_interrupt_type irq_type_ia64_lsapic; /* CPU-internal interrupt controller */ +extern int assign_irq_vector_nopanic (int irq); /* allocate a free vector without panic */ extern int assign_irq_vector (int irq); /* allocate a free vector */ extern void free_irq_vector (int vector); extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); diff --git a/trunk/include/asm-ia64/sn/xp.h b/trunk/include/asm-ia64/sn/xp.h index 1df1c9f61a65..9902185c0288 100644 --- a/trunk/include/asm-ia64/sn/xp.h +++ b/trunk/include/asm-ia64/sn/xp.h @@ -16,6 +16,7 @@ #define _ASM_IA64_SN_XP_H +#include #include #include #include diff --git a/trunk/include/asm-sparc64/seccomp.h b/trunk/include/asm-sparc64/seccomp.h new file mode 100644 index 000000000000..7fcd9968192b --- /dev/null +++ b/trunk/include/asm-sparc64/seccomp.h @@ -0,0 +1,21 @@ +#ifndef _ASM_SECCOMP_H + +#include /* already defines TIF_32BIT */ + +#ifndef TIF_32BIT +#error "unexpected TIF_32BIT on sparc64" +#endif + +#include + +#define __NR_seccomp_read __NR_read +#define __NR_seccomp_write __NR_write +#define __NR_seccomp_exit __NR_exit +#define __NR_seccomp_sigreturn __NR_rt_sigreturn + +#define __NR_seccomp_read_32 __NR_read +#define __NR_seccomp_write_32 __NR_write +#define __NR_seccomp_exit_32 __NR_exit +#define __NR_seccomp_sigreturn_32 __NR_sigreturn + +#endif /* _ASM_SECCOMP_H */ diff --git a/trunk/include/asm-v850/checksum.h b/trunk/include/asm-v850/checksum.h index 4df5e71098f9..d3aedb7bfc5c 100644 --- a/trunk/include/asm-v850/checksum.h +++ b/trunk/include/asm-v850/checksum.h @@ -1,8 +1,8 @@ /* * include/asm-v850/checksum.h -- Checksum ops * - * Copyright (C) 2001,2005 NEC Corporation - * Copyright (C) 2001,2005 Miles Bader + * Copyright (C) 2001 NEC Corporation + * Copyright (C) 2001 Miles Bader * * This file is subject to the terms and conditions of the GNU General * Public License. See the file COPYING in the main directory of this @@ -36,8 +36,8 @@ extern unsigned int csum_partial (const unsigned char * buff, int len, * here even more important to align src and dst on a 32-bit (or even * better 64-bit) boundary */ -extern unsigned csum_partial_copy (const unsigned char *src, - unsigned char *dst, int len, unsigned sum); +extern unsigned csum_partial_copy (const char *src, char *dst, int len, + unsigned sum); /* @@ -46,8 +46,7 @@ extern unsigned csum_partial_copy (const unsigned char *src, * here even more important to align src and dst on a 32-bit (or even * better 64-bit) boundary */ -extern unsigned csum_partial_copy_from_user (const unsigned char *src, - unsigned char *dst, +extern unsigned csum_partial_copy_from_user (const char *src, char *dst, int len, unsigned sum, int *csum_err); diff --git a/trunk/include/asm-v850/mmu.h b/trunk/include/asm-v850/mmu.h index 267768c66ef6..e30a52becfd6 100644 --- a/trunk/include/asm-v850/mmu.h +++ b/trunk/include/asm-v850/mmu.h @@ -1,11 +1,22 @@ -/* Copyright (C) 2002, 2005, David McCullough */ +/* Copyright (C) 2002, David McCullough */ #ifndef __V850_MMU_H__ #define __V850_MMU_H__ +struct mm_rblock_struct { + int size; + int refcount; + void *kblock; +}; + +struct mm_tblock_struct { + struct mm_rblock_struct *rblock; + struct mm_tblock_struct *next; +}; + typedef struct { - struct vm_list_struct *vmlist; - unsigned long end_brk; + struct mm_tblock_struct tblock; + unsigned long end_brk; } mm_context_t; #endif /* __V850_MMU_H__ */