From owner-p4-projects Sat Dec 14 1: 4: 9 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D942A37B404; Sat, 14 Dec 2002 01:03:53 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FB2137B401 for ; Sat, 14 Dec 2002 01:03:53 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C83C343ED4 for ; Sat, 14 Dec 2002 01:03:52 -0800 (PST) (envelope-from tzukanov@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gBE93qmV096398 for ; Sat, 14 Dec 2002 01:03:52 -0800 (PST) (envelope-from tzukanov@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gBE93qbG096395 for perforce@freebsd.org; Sat, 14 Dec 2002 01:03:52 -0800 (PST) Date: Sat, 14 Dec 2002 01:03:52 -0800 (PST) Message-Id: <200212140903.gBE93qbG096395@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to tzukanov@freebsd.org using -f From: Serguei Tzukanov Subject: PERFORCE change 22282 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=22282 Change 22282 by tzukanov@tzukanov_antares on 2002/12/14 01:03:46 Fix after IFC. Affected files ... .. //depot/projects/s390/Makefile.inc1#6 edit .. //depot/projects/s390/gnu/usr.bin/binutils/as/s390-freebsd/config.h#3 edit .. //depot/projects/s390/gnu/usr.bin/binutils/as/s390x-freebsd/config.h#3 edit .. //depot/projects/s390/gnu/usr.bin/binutils/ld/Makefile.s390#2 edit .. //depot/projects/s390/gnu/usr.bin/binutils/ld/Makefile.s390x#2 edit .. //depot/projects/s390/gnu/usr.bin/binutils/libbfd/Makefile.s390#2 edit .. //depot/projects/s390/gnu/usr.bin/binutils/libbfd/Makefile.s390x#2 edit .. //depot/projects/s390/gnu/usr.bin/binutils/libbfd/s390/bfd.h#3 edit .. //depot/projects/s390/gnu/usr.bin/binutils/libbfd/s390x/bfd.h#3 edit .. //depot/projects/s390/lib/libdisk/chunk.c#3 edit .. //depot/projects/s390/lib/libdisk/libdisk.h#3 edit .. //depot/projects/s390/lib/libdisk/write_s390_disk.c#1 add .. //depot/projects/s390/lib/libdisk/write_s390x_disk.c#1 add .. //depot/projects/s390/sys/dev/raidframe/rf_types.h#2 edit .. //depot/projects/s390/sys/s390/include/signal.h#3 edit .. //depot/projects/s390/sys/s390/s390/elf_machdep.c#2 edit .. //depot/projects/s390/sys/s390/s390/machdep.c#2 edit .. //depot/projects/s390/sys/s390/s390/pmap.c#3 edit .. //depot/projects/s390/sys/s390/s390/trap.c#2 edit .. //depot/projects/s390/sys/s390/s390/vm_machdep.c#2 edit .. //depot/projects/s390/usr.bin/truss/extern.h#4 edit .. //depot/projects/s390/usr.bin/truss/main.c#4 edit .. //depot/projects/s390/usr.bin/truss/s390-fbsd.c#1 add .. //depot/projects/s390/usr.bin/xlint/lint1/param.h#3 edit Differences ... ==== //depot/projects/s390/Makefile.inc1#6 (text+ko) ==== ==== //depot/projects/s390/gnu/usr.bin/binutils/as/s390-freebsd/config.h#3 (text+ko) ==== @@ -88,7 +88,7 @@ #define HAVE_SETLOCALE 1 /* Define if you have the stpcpy function. */ -/* #undef HAVE_STPCPY */ +#define HAVE_STPCPY 1 /* Define if you have the strcasecmp function. */ #define HAVE_STRCASECMP 1 @@ -151,7 +151,7 @@ #define PACKAGE "gas" /* Version number of package */ -/* #define VERSION "2.13" */ +/* #define VERSION "2.13.2" */ /* Define if defaulting to ELF on SCO 5. */ /* #undef SCO_ELF */ @@ -241,7 +241,7 @@ #define TARGET_OS "freebsd5.0" /* Define if you have the stpcpy function */ -/* #undef HAVE_STPCPY */ +#define HAVE_STPCPY 1 /* Define if your locale.h file contains LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 ==== //depot/projects/s390/gnu/usr.bin/binutils/as/s390x-freebsd/config.h#3 (text+ko) ==== @@ -88,7 +88,7 @@ #define HAVE_SETLOCALE 1 /* Define if you have the stpcpy function. */ -/* #undef HAVE_STPCPY */ +#define HAVE_STPCPY 1 /* Define if you have the strcasecmp function. */ #define HAVE_STRCASECMP 1 @@ -151,7 +151,7 @@ #define PACKAGE "gas" /* Version number of package */ -/* #define VERSION "2.13" */ +/* #define VERSION "2.13.2" */ /* Define if defaulting to ELF on SCO 5. */ /* #undef SCO_ELF */ @@ -241,7 +241,7 @@ #define TARGET_OS "freebsd5.0" /* Define if you have the stpcpy function */ -/* #undef HAVE_STPCPY */ +#define HAVE_STPCPY 1 /* Define if your locale.h file contains LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 ==== //depot/projects/s390/gnu/usr.bin/binutils/ld/Makefile.s390#2 (text+ko) ==== ==== //depot/projects/s390/gnu/usr.bin/binutils/ld/Makefile.s390x#2 (text+ko) ==== ==== //depot/projects/s390/gnu/usr.bin/binutils/libbfd/Makefile.s390#2 (text+ko) ==== @@ -1,17 +1,18 @@ # $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile.s390,v 1.0 2002/05/17 03:43:47 tzukanov Exp $ +DEFAULT_VECTOR= bfd_elf32_s390_vec + SRCS+= cpu-s390.c \ elf32.c \ elf32-gen.c \ elf32-s390.c \ elf32-target.h \ elflink.c -VECS+= bfd_elf32_s390_vec +VECS+= ${DEFAULT_VECTOR} .if ${TARGET_ARCH} == "s390" -CFLAGS+= -DDEFAULT_VECTOR=bfd_elf32_s390_vec +CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} .endif -CFLAGS+= -DHAVE_bfd_elf32_s390_vec CLEANFILES+= elf32-target.h elf32-target.h: elfxx-target.h ==== //depot/projects/s390/gnu/usr.bin/binutils/libbfd/Makefile.s390x#2 (text+ko) ==== @@ -1,5 +1,7 @@ # $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile.s390x,v 1.0 2002/05/17 03:43:47 tzukanov Exp $ +DEFAULT_VECTOR= bfd_elf64_s390_vec + SRCS+= cpu-s390.c \ elf32.c \ elf32-gen.c \ @@ -10,12 +12,11 @@ elf64-s390.c \ elf64-target.h \ elflink.c -VECS+= bfd_elf32_s390_vec bfd_elf64_s390_vec +VECS+= ${DEFAULT_VECTOR} bfd_elf32_s390_vec .if ${TARGET_ARCH} == "s390x" -CFLAGS+= -DDEFAULT_VECTOR=bfd_elf64_s390_vec +CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} .endif -CFLAGS+= -DHAVE_bfd_elf32_s390_vec -DHAVE_bfd_elf64_s390_vec CLEANFILES+= elf32-target.h elf64-target.h elf32-target.h: elfxx-target.h ==== //depot/projects/s390/gnu/usr.bin/binutils/libbfd/s390/bfd.h#3 (text+ko) ==== @@ -35,9 +35,6 @@ extern "C" { #endif -/* FreeBSD does not adhere to the S/390 System V ABI. */ -#define ELF_DYNAMIC_INTERPRETER "/usr/libexec/ld-elf.so.1" - #include "ansidecl.h" #include "symcat.h" #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -52,9 +49,9 @@ #endif #endif -/* #define BFD_VERSION 213000000 */ -/* #define BFD_VERSION_DATE 20021010 */ -/* #define BFD_VERSION_STRING "2.13 20021010" */ +/* #define BFD_VERSION 213010000 */ +/* #define BFD_VERSION_DATE 20021127 */ +/* #define BFD_VERSION_STRING "2.13.2 20021127" */ /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -361,7 +358,7 @@ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)true), true) +#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (unsigned int)true), true) #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true) #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true) @@ -3643,7 +3640,7 @@ boolean, asymbol **)); boolean -bfd_alt_mach_code PARAMS ((bfd *abfd, int index)); +bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative)); /* Extracted from archive.c. */ symindex ==== //depot/projects/s390/gnu/usr.bin/binutils/libbfd/s390x/bfd.h#3 (text+ko) ==== @@ -35,9 +35,6 @@ extern "C" { #endif -/* FreeBSD does not adhere to the zSeries System V ABI. */ -#define ELF_DYNAMIC_INTERPRETER "/usr/libexec/ld-elf.so.1" - #include "ansidecl.h" #include "symcat.h" #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) @@ -52,9 +49,9 @@ #endif #endif -/* #define BFD_VERSION 213000000 */ -/* #define BFD_VERSION_DATE 20021010 */ -/* #define BFD_VERSION_STRING "2.13 20021010" */ +/* #define BFD_VERSION 213010000 */ +/* #define BFD_VERSION_DATE 20021127 */ +/* #define BFD_VERSION_STRING "2.13.2 20021127" */ /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have @@ -362,7 +359,7 @@ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) -#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (boolean)true), true) +#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = (unsigned int)true), true) #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true) #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true) @@ -3644,7 +3641,7 @@ boolean, asymbol **)); boolean -bfd_alt_mach_code PARAMS ((bfd *abfd, int index)); +bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative)); /* Extracted from archive.c. */ symindex ==== //depot/projects/s390/lib/libdisk/chunk.c#3 (text+ko) ==== @@ -301,6 +301,8 @@ return(-1); } break; + case p_s390: + case p_s390x: default: return (-1); } ==== //depot/projects/s390/lib/libdisk/libdisk.h#3 (text+ko) ==== @@ -27,7 +27,9 @@ p_pc98, p_sparc64, p_ia64, - p_ppc + p_ppc, + p_s390, + p_s390x } platform = #if defined (P_DEBUG) P_DEBUG @@ -43,6 +45,10 @@ p_ia64 #elif defined(__ppc__) p_ppc +#elif defined(__s390x__) + p_s390x +#elif defined(__s390__) + p_s390 #else IHAVENOIDEA #endif ==== //depot/projects/s390/sys/dev/raidframe/rf_types.h#2 (text+ko) ==== @@ -90,6 +90,10 @@ #define RF_LONGSHIFT 2 #elif defined(__alpha__) #define RF_LONGSHIFT 3 +#elif defined(__s390x__) +#define RF_LONGSHIFT 3 +#elif defined(__s390__) +#define RF_LONGSHIFT 2 #else #error word size not defined #endif ==== //depot/projects/s390/sys/s390/include/signal.h#3 (text+ko) ==== @@ -58,13 +58,6 @@ #define MINSIGSTKSZ (1024 * 4) #endif -#ifdef _KERNEL -typedef unsigned int osigset_t; - -struct osigcontext { -}; -#endif - #if __BSD_VISIBLE struct sigcontext { struct __sigset sc_mask; ==== //depot/projects/s390/sys/s390/s390/elf_machdep.c#2 (text+ko) ==== @@ -204,3 +204,16 @@ return 0; } + +int +elf_cpu_load_file(linker_file_t lf __unused) +{ + return 0; +} + +int +elf_cpu_unload_file(linker_file_t lf _unused) +{ + return 0; +} + ==== //depot/projects/s390/sys/s390/s390/machdep.c#2 (text+ko) ==== @@ -268,9 +268,6 @@ SIGISMEMBER(psp->ps_sigonstack, sig)) { sfp = (struct sigframe *) (p->p_sigstk.ss_sp + p->p_sigstk.ss_size - sizeof(sf)); -#ifdef COMPAT_43 - p->p_sigstk.ss_flags |= SS_ONSTACK; -#endif } else { sfp = (struct sigframe *)tf->tf_gpr[15] - 1; } @@ -337,12 +334,6 @@ p = td->td_proc; PROC_LOCK(p); -#ifdef COMPAT_43 - if (uc.uc_mcontext.mc_onstack & 1) - p->p_sigstk.ss_flags |= SS_ONSTACK; - else - p->p_sigstk.ss_flags &= ~SS_ONSTACK; -#endif p->p_sigmask = uc.uc_sigmask; SIG_CANTMASK(p->p_sigmask); signotify(p); @@ -352,14 +343,15 @@ } int -osigreturn(struct thread *td, struct osigreturn_args *uap) +get_mcontext(struct thread *td, mcontext_t *mcp) { - return(nosys(td, (struct nosys_args *)uap)); + return ENOSYS; } -void -cpu_boot(int howto) +int +set_mcontext(struct thread *td, const mcontext_t *mcp) { + return ENOSYS; } void @@ -502,38 +494,3 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) { } - -static int -sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) -{ - u_long val; - - val = ctob(physmem); - return sysctl_handle_long(oidp, &val, 0, req); -} - -SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG|CTLFLAG_RD, - 0, 0, sysctl_hw_physmem, "LU", ""); - -static int -sysctl_hw_usermem(SYSCTL_HANDLER_ARGS) -{ - u_long val; - - val = ctob(physmem - cnt.v_wire_count); - return sysctl_handle_long(oidp, &val, 0, req); -} - -SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG|CTLFLAG_RD, - 0, 0, sysctl_hw_usermem, "LU", ""); -static int -sysctl_hw_availpages(SYSCTL_HANDLER_ARGS) -{ - u_long val; - - val = s390_btop(avail_end - avail_start); - return sysctl_handle_long(oidp, &val, 0, req); -} - -SYSCTL_PROC(_hw, OID_AUTO, availpages, CTLTYPE_ULONG|CTLFLAG_RD, - 0, 0, sysctl_hw_availpages, "LU", ""); ==== //depot/projects/s390/sys/s390/s390/pmap.c#3 (text+ko) ==== @@ -103,7 +103,6 @@ vm_offset_t phys_avail[128]; long Maxmem; /* highest page */ -long physmem = 0; static boolean_t pmap_initialized = FALSE; @@ -117,7 +116,7 @@ static uma_zone_t pvzone; static struct vm_object pvzone_obj; static int pv_entry_count, pv_entry_max, pv_entry_high_water; -static int pmap_pagedaemon_waken; +int pmap_pagedaemon_waken; /* For the page copying/zeroing routines. */ vm_offset_t csrc_ptepa, cdst_ptepa, z_ptepa, zi_ptepa; @@ -420,8 +419,8 @@ if (mpte->hold_count) return 0; - while (vm_page_sleep_busy(mpte , FALSE, "pmuph")) - ; + while (vm_page_sleep_if_busy(mpte , FALSE, "pmuph")) + vm_page_lock_queues(); if (mpte->hold_count == 0) { CTR0(KTR_PMAP, "\tmpte_hold_count == 0"); @@ -543,7 +542,7 @@ m->md.pv_list_count++; } -static void +void pmap_remove_all(vm_page_t m) { vm_offset_t ptepa; @@ -553,6 +552,7 @@ CTR1(KTR_PMAP, "pmap_remove_all: pa = %x", VM_PAGE_TO_PHYS(m)); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pmap = pv->pv_pmap; pmap->pm_stats.resident_count--; @@ -788,33 +788,6 @@ } void -pmap_collect(void) -{ - static int warningdone = 0; - int i; - - CTR0(KTR_PMAP, "pmap_collect: "); - - if (pmap_pagedaemon_waken == 0) - return; - - if (warningdone++ < 5) - printf("pmap_collect: collecting pv_entries -- suggest " - "increasing PMAP_SHPGPERPROC"); - - for (i = 0; i < vm_page_array_size; i++) { - vm_page_t m; - - m = &vm_page_array[i]; - if (m->wire_count || m->hold_count || m->busy || - (m->flags & (PG_BUSY | PG_UNMANAGED))) - continue; - pmap_remove_all(m); - } - pmap_pagedaemon_waken = 0; -} - -void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, vm_offset_t src_addr) { @@ -962,10 +935,14 @@ /* Invalidate old page mapping. */ if ((opte & PTE_INVALID) == 0) { + int error; + CTR0(KTR_PMAP, "\told pte valid"); - KASSERT(pmap_remove_pte(pmap, ptepa, va) == 0, - ("pmap_enter: pte vanished")); + vm_page_lock_queues(); + error = pmap_remove_pte(pmap, ptepa, va); + vm_page_unlock_queues(); + KASSERT(error == 0, ("pmap_enter: pte vanished")); } /* Enter on the pv list if part of our managed memory. */ @@ -1216,6 +1193,7 @@ if (m->flags & PG_FICTITIOUS) return FALSE; + mtx_assert(&vm_page_queue_mtx, MA_OWNED); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { if (pv->pv_pmap == pmap) return TRUE; @@ -1457,6 +1435,7 @@ KASSERT(eva == VM_MAXUSER_ADDRESS, ("pmap_remove_pages: eva != VM_MAXUSER_ADDRESS")); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { pm = pv->pv_pmap; ptepa = pmap_ptepa(pm, pv->pv_va); ==== //depot/projects/s390/sys/s390/s390/trap.c#2 (text+ko) ==== @@ -508,20 +508,8 @@ if (td->td_ucred != p->p_ucred) cred_update_thread(td); - if (p->p_flag & P_KSES) { - void *mailbox; - - printf("P_KSES case\n"); - mailbox = (void *)fuword((caddr_t)td->td_kse->ke_mailbox - + offsetof(struct kse_mailbox, km_curthread)); - if ((mailbox == NULL) || (mailbox == (void *)-1)) { - td->td_mailbox = NULL; - td->td_flags &= ~TDF_UNBOUND; - } else { - td->td_mailbox = mailbox; - td->td_flags |= TDF_UNBOUND; - } - } + if (p->p_flag & P_KSES) + thread_user_enter(p, td); code = tf->tf_gpr[0]; argp = &tf->tf_gpr[2]; ==== //depot/projects/s390/sys/s390/s390/vm_machdep.c#2 (text+ko) ==== @@ -121,6 +121,11 @@ } void +cpu_thread_dtor(struct thread *td) +{ +} + +void cpu_thread_exit(struct thread *td) { } @@ -137,11 +142,6 @@ td->td_frame = (struct trapframe *)td->td_pcb - 1; } -struct md_store { - struct pcb mds_pcb; - struct trapframe mds_tf; -}; - void cpu_set_upcall(struct thread *td, void *pcb0) { @@ -237,8 +237,10 @@ npages = bp->b_npages; pmap_qremove(trunc_page(bp->b_data), npages); m = bp->b_pages; + vm_page_lock_queues(); while (npages--) vm_page_unhold(*m++); + vm_page_unlock_queues(); bp->b_data = bp->b_saveaddr; } ==== //depot/projects/s390/usr.bin/truss/extern.h#4 (text+ko) ==== @@ -53,3 +53,7 @@ extern void sparc64_syscall_entry(struct trussinfo *, int); extern int sparc64_syscall_exit(struct trussinfo *, int); #endif +#ifdef __s390__ +extern void s390_syscall_entry(struct trussinfo *, int); +extern int s390_syscall_exit(struct trussinfo *, int); +#endif ==== //depot/projects/s390/usr.bin/truss/main.c#4 (text+ko) ==== @@ -98,6 +98,13 @@ #ifdef __sparc64__ { "FreeBSD ELF64", sparc64_syscall_entry, sparc64_syscall_exit }, #endif +#ifdef __s390__ +#ifdef __s390x__ + { "FreeBSD ELF64", s390_syscall_entry, s390_syscall_exit }, +#else + { "FreeBSD ELF32", s390_syscall_entry, s390_syscall_exit }, +#endif +#endif { 0, 0, 0 }, }; ==== //depot/projects/s390/usr.bin/xlint/lint1/param.h#3 (text+ko) ==== @@ -71,7 +71,7 @@ #elif __alpha__ #define PTRDIFF_IS_LONG 1 #define SIZEOF_IS_ULONG 1 -#elif defined(__s390__) && !defined(__s390x__) +#elif __s390__ #define PTRDIFF_IS_LONG 0 #define SIZEOF_IS_ULONG 0 #elif __i386__ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message