CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: tsutsui Date: Sun Jul 11 13:36:02 UTC 2021 Modified Files: src/sys/arch/hppa/dev: sti_sgc.c Log Message: Fix silent freeze on probing sti(4) framebuffer on 712/60. PR/52162 Ok'ed by skrll@. Should be pulled up to netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/dev/sti_sgc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/sti_sgc.c diff -u src/sys/arch/hppa/dev/sti_sgc.c:1.2 src/sys/arch/hppa/dev/sti_sgc.c:1.3 --- src/sys/arch/hppa/dev/sti_sgc.c:1.2 Mon Apr 15 20:40:37 2019 +++ src/sys/arch/hppa/dev/sti_sgc.c Sun Jul 11 13:36:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sti_sgc.c,v 1.2 2019/04/15 20:40:37 skrll Exp $ */ +/* $NetBSD: sti_sgc.c,v 1.3 2021/07/11 13:36:02 tsutsui Exp $ */ /* $OpenBSD: sti_sgc.c,v 1.38 2009/02/06 22:51:04 miod Exp $ */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.2 2019/04/15 20:40:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.3 2021/07/11 13:36:02 tsutsui Exp $"); #include "opt_cputype.h" @@ -73,6 +73,16 @@ extern int stidebug; #define STI_ROMSIZE (sizeof(struct sti_dd) * 4) #define STI_ID_FDDI 0x280b31af /* Medusa FDDI ROM id */ +/* + * hpa addresses to check on-board variants + * XXX should check via device_register(9)? + * + * 0xf400: HPA1991AC19 on 715/33, 715/50 + * 0xf800: HPA1439A on 735/99, HPA208LCxxx on 715/80, 715/100, 712 + */ +#define STI_ONBOARD_HPA0 0xf400 +#define STI_ONBOARD_HPA1 0xf800 + /* gecko optional graphics */ #define STI_GOPT1_REV 0x17 #define STI_GOPT2_REV 0x70 @@ -118,7 +128,9 @@ sti_sgc_getrom(struct confargs *ca) rom = PAGE0->pd_resv2[1]; hppa_pagezero_unmap(pagezero_cookie); - if (ca->ca_type.iodc_sv_model == HPPA_FIO_GSGC) { + if (ca->ca_type.iodc_sv_model == HPPA_FIO_GSGC && + ca->ca_hpa != STI_ONBOARD_HPA0 && + ca->ca_hpa != STI_ONBOARD_HPA1) { int i; for (i = sizeof(sti_sgc_opt); i--; ) if (sti_sgc_opt[i] == ca->ca_type.iodc_revision)
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: macallan Date: Thu Jul 1 22:57:45 UTC 2021 Modified Files: src/sys/arch/hppa/hppa: intr.c Log Message: fix off by one which resulted in all idle time reported as interrupt time final fix from nick@ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/hppa/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/intr.c diff -u src/sys/arch/hppa/hppa/intr.c:1.3 src/sys/arch/hppa/hppa/intr.c:1.4 --- src/sys/arch/hppa/hppa/intr.c:1.3 Sat May 4 13:04:36 2019 +++ src/sys/arch/hppa/hppa/intr.c Thu Jul 1 22:57:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.3 2019/05/04 13:04:36 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.4 2021/07/01 22:57:45 macallan Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.3 2019/05/04 13:04:36 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.4 2021/07/01 22:57:45 macallan Exp $"); #define __MUTEX_PRIVATE @@ -435,7 +435,7 @@ hppa_intr_dispatch(int ncpl, int eiem, s ib->ib_evcnt.ev_count++; arg = ib->ib_arg; if (arg == NULL) { - clkframe.cf_flags = (ci->ci_intr_depth ? + clkframe.cf_flags = (ci->ci_intr_depth > 1 ? TFF_INTR : 0); clkframe.cf_spl = ncpl; if (frame != NULL) {
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Sat May 8 13:10:29 UTC 2021 Modified Files: src/sys/arch/hppa/include: param.h Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hppa/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/param.h diff -u src/sys/arch/hppa/include/param.h:1.27 src/sys/arch/hppa/include/param.h:1.28 --- src/sys/arch/hppa/include/param.h:1.27 Fri May 1 08:21:27 2020 +++ src/sys/arch/hppa/include/param.h Sat May 8 13:10:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.27 2020/05/01 08:21:27 isaki Exp $ */ +/* $NetBSD: param.h,v 1.28 2021/05/08 13:10:29 skrll Exp $ */ /* $OpenBSD: param.h,v 1.12 2001/07/06 02:07:41 provos Exp $ */ @@ -41,11 +41,11 @@ #define PGSHIFT 12 /* LOG2(NBPG) */ #define NBPG (1 << PGSHIFT) /* bytes/page */ -#define PGOFSET (NBPG-1) /* byte offset into page */ +#define PGOFSET (NBPG - 1) /* byte offset into page */ #define SEGSHIFT (PGSHIFT + (PGSHIFT-PTESHIFT)) /* LOG2(NBSEG) */ #define NBSEG (1 << SEGSHIFT) /* bytes/segment (quadrant) */ -#define SEGOFSET (NBSEG-1) /* byte offset into segment */ +#define SEGOFSET (NBSEG - 1) /* byte offset into segment */ #define KERNBASE 0x /* start of kernel virtual */ #define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT) @@ -61,7 +61,7 @@ #define USPACE (UPAGES * NBPG) /* pages for user struct and kstack */ #ifndef MSGBUFSIZE -#define MSGBUFSIZE (2*NBPG) /* default message buffer size */ +#define MSGBUFSIZE (2 * NBPG) /* default message buffer size */ #endif /*
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: simonb Date: Fri Feb 26 01:48:20 UTC 2021 Modified Files: src/sys/arch/hppa/include: vmparam.h Log Message: Use a valuely human readable number for MAXTSIZ. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hppa/include/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/vmparam.h diff -u src/sys/arch/hppa/include/vmparam.h:1.21 src/sys/arch/hppa/include/vmparam.h:1.22 --- src/sys/arch/hppa/include/vmparam.h:1.21 Tue Apr 16 12:25:17 2019 +++ src/sys/arch/hppa/include/vmparam.h Fri Feb 26 01:48:20 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.21 2019/04/16 12:25:17 skrll Exp $ */ +/* $NetBSD: vmparam.h,v 1.22 2021/02/26 01:48:20 simonb Exp $ */ /* $OpenBSD: vmparam.h,v 1.33 2006/06/04 17:21:24 miod Exp $ */ @@ -52,7 +52,7 @@ * Virtual memory related constants, all in bytes */ #ifndef MAXTSIZ -#define MAXTSIZ (0x4000) /* max text size */ +#define MAXTSIZ (1024*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ #define DFLDSIZ (16*1024*1024) /* initial data size limit */
CVS commit: src/sys/arch/hppa/gsc
Module Name:src Committed By: isaki Date: Thu Feb 4 15:08:45 UTC 2021 Modified Files: src/sys/arch/hppa/gsc: harmony.c Log Message: Simplify harmony_speed_bits(). It no longer needs to write back the speed value. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/gsc/harmony.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/gsc/harmony.c diff -u src/sys/arch/hppa/gsc/harmony.c:1.9 src/sys/arch/hppa/gsc/harmony.c:1.10 --- src/sys/arch/hppa/gsc/harmony.c:1.9 Thu Feb 4 15:06:11 2021 +++ src/sys/arch/hppa/gsc/harmony.c Thu Feb 4 15:08:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: harmony.c,v 1.9 2021/02/04 15:06:11 isaki Exp $ */ +/* $NetBSD: harmony.c,v 1.10 2021/02/04 15:08:44 isaki Exp $ */ /* $OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $ */ @@ -165,7 +165,7 @@ CFATTACH_DECL_NEW(harmony, sizeof(struct int harmony_intr(void *); void harmony_intr_enable(struct harmony_softc *); void harmony_intr_disable(struct harmony_softc *); -uint32_t harmony_speed_bits(struct harmony_softc *, u_int *); +uint32_t harmony_speed_bits(struct harmony_softc *, u_int); int harmony_set_gainctl(struct harmony_softc *); void harmony_reset_codec(struct harmony_softc *); void harmony_start_cp(struct harmony_softc *, int); @@ -441,7 +441,6 @@ harmony_set_format(void *vsc, int setmod { struct harmony_softc *sc; uint32_t bits; - int rate; sc = vsc; @@ -464,10 +463,7 @@ harmony_set_format(void *vsc, int setmod bits |= CNTL_OLB; bits |= CNTL_CHANS_STEREO; - - /* XXX modify harmony_speed_bits() not to rewrite rate */ - rate = play->sample_rate; - bits |= harmony_speed_bits(sc, ); + bits |= harmony_speed_bits(sc, play->sample_rate); sc->sc_cntlbits = bits; sc->sc_need_commit = 1; @@ -1161,39 +1157,17 @@ static const struct speed_struct { }; uint32_t -harmony_speed_bits(struct harmony_softc *sc, u_int *speedp) +harmony_speed_bits(struct harmony_softc *sc, u_int speed) { - int i, n, selected; - - selected = -1; - n = sizeof(harmony_speeds) / sizeof(harmony_speeds[0]); + int i; - if ((*speedp) <= harmony_speeds[0].speed) - selected = 0; - else if ((*speedp) >= harmony_speeds[n - 1].speed) - selected = n - 1; - else { - for (i = 1; selected == -1 && i < n; i++) { - if ((*speedp) == harmony_speeds[i].speed) -selected = i; - else if ((*speedp) < harmony_speeds[i].speed) { -int diff1, diff2; - -diff1 = (*speedp) - harmony_speeds[i - 1].speed; -diff2 = harmony_speeds[i].speed - (*speedp); -if (diff1 < diff2) - selected = i - 1; -else - selected = i; - } + for (i = 0; i < __arraycount(harmony_speeds); i++) { + if (speed == harmony_speeds[i].speed) { + return harmony_speeds[i].bits; } } - - if (selected == -1) - selected = 2; - - *speedp = harmony_speeds[selected].speed; - return harmony_speeds[selected].bits; + /* If this happens, harmony_formats[] is wrong */ + panic("speed %u not supported", speed); } int
CVS commit: src/sys/arch/hppa/gsc
Module Name:src Committed By: isaki Date: Thu Feb 4 15:06:11 UTC 2021 Modified Files: src/sys/arch/hppa/gsc: harmony.c Log Message: Fix my mistakes in rev1.6. - I had to merge the channel bit and the speed bits. Reported by macallan@. - I also fix my indent, while I'm here. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/gsc/harmony.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/gsc/harmony.c diff -u src/sys/arch/hppa/gsc/harmony.c:1.8 src/sys/arch/hppa/gsc/harmony.c:1.9 --- src/sys/arch/hppa/gsc/harmony.c:1.8 Wed Feb 3 15:13:49 2021 +++ src/sys/arch/hppa/gsc/harmony.c Thu Feb 4 15:06:11 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: harmony.c,v 1.8 2021/02/03 15:13:49 isaki Exp $ */ +/* $NetBSD: harmony.c,v 1.9 2021/02/04 15:06:11 isaki Exp $ */ /* $OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $ */ @@ -437,7 +437,7 @@ harmony_query_format(void *vsc, audio_fo int harmony_set_format(void *vsc, int setmode, const audio_params_t *play, const audio_params_t *rec, - audio_filter_reg_t *pfil, audio_filter_reg_t *rfil) +audio_filter_reg_t *pfil, audio_filter_reg_t *rfil) { struct harmony_softc *sc; uint32_t bits; @@ -467,7 +467,8 @@ harmony_set_format(void *vsc, int setmod /* XXX modify harmony_speed_bits() not to rewrite rate */ rate = play->sample_rate; - sc->sc_cntlbits |= harmony_speed_bits(sc, ); + bits |= harmony_speed_bits(sc, ); + sc->sc_cntlbits = bits; sc->sc_need_commit = 1; return 0;
CVS commit: src/sys/arch/hppa/gsc
Module Name:src Committed By: isaki Date: Wed Feb 3 15:13:49 UTC 2021 Modified Files: src/sys/arch/hppa/gsc: harmony.c Log Message: Fix locking against myself. trigger_output will be called with sc_intr_lock held. >From source code review, not tested. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/gsc/harmony.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/gsc/harmony.c diff -u src/sys/arch/hppa/gsc/harmony.c:1.7 src/sys/arch/hppa/gsc/harmony.c:1.8 --- src/sys/arch/hppa/gsc/harmony.c:1.7 Sat Jun 8 08:02:37 2019 +++ src/sys/arch/hppa/gsc/harmony.c Wed Feb 3 15:13:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: harmony.c,v 1.7 2019/06/08 08:02:37 isaki Exp $ */ +/* $NetBSD: harmony.c,v 1.8 2021/02/03 15:13:49 isaki Exp $ */ /* $OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $ */ @@ -1004,8 +1004,6 @@ harmony_trigger_output(void *vsc, void * return EINVAL; } - mutex_spin_enter(>sc_intr_lock); - c->c_intr = intr; c->c_intrarg = intrarg; c->c_blksz = blksize; @@ -1020,8 +1018,6 @@ harmony_trigger_output(void *vsc, void * harmony_start_cp(sc, 0); harmony_intr_enable(sc); - mutex_spin_exit(>sc_intr_lock); - return 0; }
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: christos Date: Sat Dec 5 22:49:50 UTC 2020 Modified Files: src/sys/arch/hppa/include: proc.h types.h Log Message: Use __vaddr_t since we don't expose vaddr_t by default to userland. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/include/proc.h cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hppa/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/proc.h diff -u src/sys/arch/hppa/include/proc.h:1.12 src/sys/arch/hppa/include/proc.h:1.13 --- src/sys/arch/hppa/include/proc.h:1.12 Thu Mar 6 14:02:58 2014 +++ src/sys/arch/hppa/include/proc.h Sat Dec 5 17:49:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.12 2014/03/06 19:02:58 skrll Exp $ */ +/* $NetBSD: proc.h,v 1.13 2020/12/05 22:49:50 christos Exp $ */ /* $OpenBSD: proc.h,v 1.4 2009/12/29 13:11:40 jsing Exp $ */ @@ -44,7 +44,7 @@ struct mdlwp { volatile int md_astpending; /* AST pending for this LWP */ int md_flags; /* machine-dependent flags */ - vaddr_t md_bpva; + __vaddr_t md_bpva; unsigned int md_bpsave[2]; }; Index: src/sys/arch/hppa/include/types.h diff -u src/sys/arch/hppa/include/types.h:1.28 src/sys/arch/hppa/include/types.h:1.29 --- src/sys/arch/hppa/include/types.h:1.28 Thu Apr 16 05:51:57 2020 +++ src/sys/arch/hppa/include/types.h Sat Dec 5 17:49:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.28 2020/04/16 09:51:57 skrll Exp $ */ +/* $NetBSD: types.h,v 1.29 2020/12/05 22:49:50 christos Exp $ */ /* $OpenBSD: types.h,v 1.6 2001/08/11 01:58:34 art Exp $ */ @@ -49,11 +49,13 @@ typedef struct label_t { } label_t; #endif +typedef unsigned long __vaddr_t; + #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE) typedef unsigned long hppa_hpa_t; typedef unsigned long hppa_spa_t; typedef unsigned int pa_space_t; -typedef unsigned long vaddr_t; +typedef __vaddr_t vaddr_t; typedef unsigned long vsize_t; typedef unsigned long paddr_t; typedef unsigned long psize_t;
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: thorpej Date: Sat Nov 21 21:01:16 UTC 2020 Modified Files: src/sys/arch/hppa/dev: apic.c src/sys/arch/hppa/hppa: mainbus.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/dev/apic.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/hppa/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/apic.c diff -u src/sys/arch/hppa/dev/apic.c:1.3 src/sys/arch/hppa/dev/apic.c:1.4 --- src/sys/arch/hppa/dev/apic.c:1.3 Sun Nov 10 21:16:28 2019 +++ src/sys/arch/hppa/dev/apic.c Sat Nov 21 21:01:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: apic.c,v 1.3 2019/11/10 21:16:28 chs Exp $ */ +/* $NetBSD: apic.c,v 1.4 2020/11/21 21:01:16 thorpej Exp $ */ /* $OpenBSD: apic.c,v 1.14 2011/05/01 21:59:39 kettenis Exp $ */ @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -109,8 +109,7 @@ apic_attach(struct elroy_softc *sc) aprint_normal(" APIC ver %x, %d pins", data & APIC_VERSION_MASK, sc->sc_nints); - sc->sc_irq = malloc(sc->sc_nints * sizeof(int), M_DEVBUF, - M_WAITOK | M_ZERO); + sc->sc_irq = kmem_zalloc(sc->sc_nints * sizeof(int), KM_SLEEP); apic_get_int_tbl(sc); @@ -171,8 +170,8 @@ apic_intr_establish(void *v, pci_intr_ha if (irq <= 0 || irq > 31) return NULL; - aiv = malloc(sizeof(struct apic_iv), M_DEVBUF, M_WAITOK); - cnt = malloc(sizeof(struct evcnt), M_DEVBUF, M_WAITOK); + aiv = kmem_alloc(sizeof(struct apic_iv), KM_SLEEP); + cnt = kmem_alloc(sizeof(struct evcnt), KM_SLEEP); aiv->sc = sc; aiv->ih = ih; aiv->handler = handler; @@ -184,8 +183,8 @@ apic_intr_establish(void *v, pci_intr_ha if (biv == NULL) { iv = hppa_intr_establish(pri, apic_intr, aiv, >ci_ir, irq); if (iv == NULL) { - free(aiv, M_DEVBUF); - free(cnt, M_DEVBUF); + kmem_free(aiv, sizeof(*aiv)); + kmem_free(cnt, sizeof(*cnt)); return NULL; } @@ -267,7 +266,7 @@ apic_get_int_tbl(struct elroy_softc *sc) size = nentries * sizeof(struct pdc_pat_pci_rt); sc->sc_int_tbl_sz = nentries; - sc->sc_int_tbl = malloc(size, M_DEVBUF, M_WAITOK); + sc->sc_int_tbl = kmem_alloc(size, KM_SLEEP); pdcproc_pci_gettable(nentries, size, sc->sc_int_tbl); } Index: src/sys/arch/hppa/hppa/mainbus.c diff -u src/sys/arch/hppa/hppa/mainbus.c:1.5 src/sys/arch/hppa/hppa/mainbus.c:1.6 --- src/sys/arch/hppa/hppa/mainbus.c:1.5 Fri Oct 16 17:50:44 2020 +++ src/sys/arch/hppa/hppa/mainbus.c Sat Nov 21 21:01:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.5 2020/10/16 17:50:44 macallan Exp $ */ +/* $NetBSD: mainbus.c,v 1.6 2020/11/21 21:01:16 thorpej Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.5 2020/10/16 17:50:44 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.6 2020/11/21 21:01:16 thorpej Exp $"); #include "locators.h" #include "power.h" @@ -71,6 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v #include #include #include +#include #include #include @@ -729,6 +730,14 @@ const struct hppa_bus_space_tag hppa_bus mbus_cp_1, mbus_cp_2, mbus_cp_4, mbus_cp_8 }; +static size_t +_bus_dmamap_mapsize(int const nsegments) +{ + KASSERT(nsegments > 0); + return sizeof(struct hppa_bus_dmamap) + + (sizeof(bus_dma_segment_t) * (nsegments - 1)); +} + /* * Common function for DMA map creation. May be called by bus-specific DMA map * creation functions. @@ -738,7 +747,6 @@ mbus_dmamap_create(void *v, bus_size_t s bus_size_t boundary, int flags, bus_dmamap_t *dmamp) { struct hppa_bus_dmamap *map; - size_t mapsize; /* * Allocate and initialize the DMA map. The end of the map is a @@ -752,14 +760,11 @@ mbus_dmamap_create(void *v, bus_size_t s * The bus_dmamap_t includes one bus_dma_segment_t, hence the * (nsegments - 1). */ - mapsize = sizeof(struct hppa_bus_dmamap) + - (sizeof(bus_dma_segment_t) * (nsegments - 1)); - map = malloc(mapsize, M_DMAMAP, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK); + map = kmem_zalloc(_bus_dmamap_mapsize(nsegments), + (flags & BUS_DMA_NOWAIT) ? KM_NOSLEEP : KM_SLEEP); if (!map) return ENOMEM; - memset(map, 0, mapsize); map->_dm_size = size; map->_dm_segcnt = nsegments; map->_dm_maxsegsz = maxsegsz; @@ -786,7 +791,7 @@ mbus_dmamap_destroy(void *v, bus_dmamap_ if (map->dm_mapsize != 0) mbus_dmamap_unload(v, map); - free(map, M_DMAMAP); + kmem_free(map, _bus_dmamap_mapsize(map->_dm_segcnt)); } /* @@ -1067,8 +1072,8 @@ mbus_dmamem_alloc(void *v, bus_size_t si low = 0; high = ((flags & BUS_DMA_24BIT) ? (1 << 24) : 0) - 1; - if ((mlist = malloc(sizeof(*mlist), M_DEVBUF, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) + if ((mlist = kmem_alloc(sizeof(*mlist), + (flags & BUS_DMA_NOWAIT) ? KM_NOSLEEP :
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Fri Oct 23 22:14:47 UTC 2020 Modified Files: src/sys/arch/hppa/dev: dino.c Log Message: support mmap() To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/dev/dino.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/dino.c diff -u src/sys/arch/hppa/dev/dino.c:1.9 src/sys/arch/hppa/dev/dino.c:1.10 --- src/sys/arch/hppa/dev/dino.c:1.9 Fri Oct 16 18:27:34 2020 +++ src/sys/arch/hppa/dev/dino.c Fri Oct 23 22:14:47 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dino.c,v 1.9 2020/10/16 18:27:34 skrll Exp $ */ +/* $NetBSD: dino.c,v 1.10 2020/10/23 22:14:47 macallan Exp $ */ /* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.9 2020/10/16 18:27:34 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.10 2020/10/23 22:14:47 macallan Exp $"); /* #include "cardbus.h" */ @@ -617,7 +617,7 @@ dino_vaddr(void *v, bus_space_handle_t h paddr_t dino_mmap(void *v, bus_addr_t addr, off_t off, int prot, int flags) { - return -1; + return btop(addr + off); } uint8_t
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: skrll Date: Fri Oct 16 18:27:34 UTC 2020 Modified Files: src/sys/arch/hppa/dev: dino.c Log Message: Remove trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/dev/dino.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/dino.c diff -u src/sys/arch/hppa/dev/dino.c:1.8 src/sys/arch/hppa/dev/dino.c:1.9 --- src/sys/arch/hppa/dev/dino.c:1.8 Fri Oct 16 18:27:02 2020 +++ src/sys/arch/hppa/dev/dino.c Fri Oct 16 18:27:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dino.c,v 1.8 2020/10/16 18:27:02 skrll Exp $ */ +/* $NetBSD: dino.c,v 1.9 2020/10/16 18:27:34 skrll Exp $ */ /* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.8 2020/10/16 18:27:02 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.9 2020/10/16 18:27:34 skrll Exp $"); /* #include "cardbus.h" */ @@ -356,7 +356,7 @@ dino_conf_read(void *v, pcitag_t tag, in /* fix arbitration errata by disabling all pci devs on config read */ pamr = r->pamr; r->pamr = 0; - + r->pci_addr = tag | reg; data = r->pci_conf_data;
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: skrll Date: Fri Oct 16 18:27:02 UTC 2020 Modified Files: src/sys/arch/hppa/dev: dino.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/dev/dino.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/dino.c diff -u src/sys/arch/hppa/dev/dino.c:1.7 src/sys/arch/hppa/dev/dino.c:1.8 --- src/sys/arch/hppa/dev/dino.c:1.7 Fri Oct 16 17:59:46 2020 +++ src/sys/arch/hppa/dev/dino.c Fri Oct 16 18:27:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dino.c,v 1.7 2020/10/16 17:59:46 macallan Exp $ */ +/* $NetBSD: dino.c,v 1.8 2020/10/16 18:27:02 skrll Exp $ */ /* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.7 2020/10/16 17:59:46 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.8 2020/10/16 18:27:02 skrll Exp $"); /* #include "cardbus.h" */ @@ -350,7 +350,8 @@ dino_conf_read(void *v, pcitag_t tag, in * accessing dev 1f / func 7 on the 2nd Dino causes a machine check * exception on my C200 */ - if ((tag & 0xff00) == 0xff00) return -1; + if ((tag & 0xff00) == 0xff00) + return -1; /* fix arbitration errata by disabling all pci devs on config read */ pamr = r->pamr;
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: macallan Date: Fri Oct 16 17:59:46 UTC 2020 Modified Files: src/sys/arch/hppa/dev: dino.c Log Message: config space accesses to device 15 function 7 cause a machine check exception on my C200, so weed them out. Now we can scan the PCI buses without crashing. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/dev/dino.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/dino.c diff -u src/sys/arch/hppa/dev/dino.c:1.6 src/sys/arch/hppa/dev/dino.c:1.7 --- src/sys/arch/hppa/dev/dino.c:1.6 Sun Jun 14 01:40:04 2020 +++ src/sys/arch/hppa/dev/dino.c Fri Oct 16 17:59:46 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dino.c,v 1.6 2020/06/14 01:40:04 chs Exp $ */ +/* $NetBSD: dino.c,v 1.7 2020/10/16 17:59:46 macallan Exp $ */ /* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.6 2020/06/14 01:40:04 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.7 2020/10/16 17:59:46 macallan Exp $"); /* #include "cardbus.h" */ @@ -345,10 +345,17 @@ dino_conf_read(void *v, pcitag_t tag, in if ((unsigned int)reg >= PCI_CONF_SIZE) return (pcireg_t) -1; + /* + * XXX + * accessing dev 1f / func 7 on the 2nd Dino causes a machine check + * exception on my C200 + */ + if ((tag & 0xff00) == 0xff00) return -1; + /* fix arbitration errata by disabling all pci devs on config read */ pamr = r->pamr; r->pamr = 0; - + r->pci_addr = tag | reg; data = r->pci_conf_data; @@ -368,6 +375,13 @@ dino_conf_write(void *v, pcitag_t tag, i if ((unsigned int)reg >= PCI_CONF_SIZE) return; + /* + * XXX + * accessing dev 1f / func 7 on the 2nd Dino causes a machine check + * exception on my C200 + */ + if ((tag & 0xff00) == 0xff00) return; + /* fix arbitration errata by disabling all pci devs on config read */ pamr = r->pamr; r->pamr = 0;
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: macallan Date: Fri Oct 16 17:50:44 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: mainbus.c Log Message: support *_mmap() To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/hppa/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/mainbus.c diff -u src/sys/arch/hppa/hppa/mainbus.c:1.4 src/sys/arch/hppa/hppa/mainbus.c:1.5 --- src/sys/arch/hppa/hppa/mainbus.c:1.4 Fri Apr 26 18:37:24 2019 +++ src/sys/arch/hppa/hppa/mainbus.c Fri Oct 16 17:50:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.4 2019/04/26 18:37:24 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.5 2020/10/16 17:50:44 macallan Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.4 2019/04/26 18:37:24 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.5 2020/10/16 17:50:44 macallan Exp $"); #include "locators.h" #include "power.h" @@ -354,8 +354,7 @@ mbus_vaddr(void *v, bus_space_handle_t h paddr_t mbus_mmap(void *v, bus_addr_t addr, off_t off, int prot, int flags) { - - return -1; + return btop(addr + off); } uint8_t
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: skrll Date: Mon Sep 14 16:13:19 UTC 2020 Modified Files: src/sys/arch/hppa/conf: Makefile.hppa Log Message: (Re)Enable -Werror=array-bounds. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/conf/Makefile.hppa Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/Makefile.hppa diff -u src/sys/arch/hppa/conf/Makefile.hppa:1.7 src/sys/arch/hppa/conf/Makefile.hppa:1.8 --- src/sys/arch/hppa/conf/Makefile.hppa:1.7 Mon Sep 7 02:22:27 2020 +++ src/sys/arch/hppa/conf/Makefile.hppa Mon Sep 14 16:13:18 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.hppa,v 1.7 2020/09/07 02:22:27 mrg Exp $ +# $NetBSD: Makefile.hppa,v 1.8 2020/09/14 16:13:18 skrll Exp $ # Makefile for NetBSD # @@ -32,7 +32,6 @@ GENASSYM_CONF= ${HPPA}/hppa/genassym.cf ## CPPFLAGS+= -Dhppa CFLAGS+= -mpa-risc-1-1 -msoft-float -mdisable-fpregs -CWARNFLAGS.gcc+=${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-error=array-bounds :} .include "${HPPA}/spmath/Makefile.inc"
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Mon Sep 14 16:11:32 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: machdep.c Log Message: -Wno-error=array-bounds (missed from previous commit) To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hppa/hppa/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/machdep.c diff -u src/sys/arch/hppa/hppa/machdep.c:1.15 src/sys/arch/hppa/hppa/machdep.c:1.16 --- src/sys/arch/hppa/hppa/machdep.c:1.15 Tue Sep 8 06:13:53 2020 +++ src/sys/arch/hppa/hppa/machdep.c Mon Sep 14 16:11:32 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.15 2020/09/08 06:13:53 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.16 2020/09/14 16:11:32 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2020/09/08 06:13:53 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2020/09/14 16:11:32 skrll Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -489,19 +489,19 @@ hppa_init(paddr_t start, void *bi) DPRINTF(("SPID bits: 0x%x, error = %d\n", pdc_spidbits.spidbits, error)); /* Calculate the OS_HPMC handler checksums. */ - p = _hpmc; + p = os_hpmc; if (pdcproc_instr(p)) *p = 0x08000240; p[7] = ((char *) _hpmc_cont_end) - ((char *) _hpmc_cont); p[6] = (u_int) _hpmc_cont; p[5] = -(p[0] + p[1] + p[2] + p[3] + p[4] + p[6] + p[7]); p = _hpmc_cont; - q = (_hpmc_cont_end - 1); + q = os_hpmc_checksum; for (*q = 0; p < q; *q -= *(p++)); /* Calculate the OS_TOC handler checksum. */ p = (u_int *) _toc; - q = (_toc_end - 1); + q = os_toc_checksum; for (*q = 0; p < q; *q -= *(p++)); /* Install the OS_TOC handler. */
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Mon Sep 14 16:11:00 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: machdep.h trap.S Log Message: -Wno-error=array-bounds To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hppa/hppa/machdep.h cvs rdiff -u -r1.72 -r1.73 src/sys/arch/hppa/hppa/trap.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/machdep.h diff -u src/sys/arch/hppa/hppa/machdep.h:1.18 src/sys/arch/hppa/hppa/machdep.h:1.19 --- src/sys/arch/hppa/hppa/machdep.h:1.18 Mon Apr 15 20:45:08 2019 +++ src/sys/arch/hppa/hppa/machdep.h Mon Sep 14 16:11:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.h,v 1.18 2019/04/15 20:45:08 skrll Exp $ */ +/* $NetBSD: machdep.h,v 1.19 2020/09/14 16:11:00 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -95,11 +95,15 @@ void hppa_ktext_stw(vaddr_t, int); void hppa_ktext_stb(vaddr_t, char); /* Machine check handling. */ -extern u_int os_hpmc; +extern u_int os_hpmc[8]; extern u_int os_hpmc_cont; extern u_int os_hpmc_cont_end; +extern u_int os_hpmc_checksum[1]; + int os_toc(void); extern u_int os_toc_end; +extern u_int os_toc_checksum[1]; + void hppa_machine_check(int); /* BTLB handling. */ Index: src/sys/arch/hppa/hppa/trap.S diff -u src/sys/arch/hppa/hppa/trap.S:1.72 src/sys/arch/hppa/hppa/trap.S:1.73 --- src/sys/arch/hppa/hppa/trap.S:1.72 Tue Apr 16 07:08:46 2019 +++ src/sys/arch/hppa/hppa/trap.S Mon Sep 14 16:11:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.S,v 1.72 2019/04/16 07:08:46 skrll Exp $ */ +/* $NetBSD: trap.S,v 1.73 2020/09/14 16:11:00 skrll Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -841,8 +841,11 @@ L$check_do_rfi: nop nop nop + +ALTENTRY(os_hpmc_checksum) nop ALTENTRY(os_hpmc_cont_end) +ALTENTRY(os_toc_checksum) nop ALTENTRY(os_toc_end) EXIT(TLABEL(hpmc))
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Tue Sep 8 06:13:53 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: machdep.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hppa/hppa/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/machdep.c diff -u src/sys/arch/hppa/hppa/machdep.c:1.14 src/sys/arch/hppa/hppa/machdep.c:1.15 --- src/sys/arch/hppa/hppa/machdep.c:1.14 Thu Jun 11 19:20:43 2020 +++ src/sys/arch/hppa/hppa/machdep.c Tue Sep 8 06:13:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.14 2020/06/11 19:20:43 ad Exp $ */ +/* $NetBSD: machdep.c,v 1.15 2020/09/08 06:13:53 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.14 2020/06/11 19:20:43 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2020/09/08 06:13:53 skrll Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -497,7 +497,7 @@ hppa_init(paddr_t start, void *bi) p[5] = -(p[0] + p[1] + p[2] + p[3] + p[4] + p[6] + p[7]); p = _hpmc_cont; q = (_hpmc_cont_end - 1); - for(*q = 0; p < q; *q -= *(p++)); + for (*q = 0; p < q; *q -= *(p++)); /* Calculate the OS_TOC handler checksum. */ p = (u_int *) _toc;
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: mrg Date: Mon Sep 7 02:22:27 UTC 2020 Modified Files: src/sys/arch/hppa/conf: Makefile.hppa Log Message: enable -Wno-error=array-bounds for GCC 9 and hppa. machdep.c has a bunch of warnings that i can't workaround yet. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/conf/Makefile.hppa Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/Makefile.hppa diff -u src/sys/arch/hppa/conf/Makefile.hppa:1.6 src/sys/arch/hppa/conf/Makefile.hppa:1.7 --- src/sys/arch/hppa/conf/Makefile.hppa:1.6 Sat Sep 22 12:24:02 2018 +++ src/sys/arch/hppa/conf/Makefile.hppa Mon Sep 7 02:22:27 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.hppa,v 1.6 2018/09/22 12:24:02 rin Exp $ +# $NetBSD: Makefile.hppa,v 1.7 2020/09/07 02:22:27 mrg Exp $ # Makefile for NetBSD # @@ -32,6 +32,7 @@ GENASSYM_CONF= ${HPPA}/hppa/genassym.cf ## CPPFLAGS+= -Dhppa CFLAGS+= -mpa-risc-1-1 -msoft-float -mdisable-fpregs +CWARNFLAGS.gcc+=${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-error=array-bounds :} .include "${HPPA}/spmath/Makefile.inc"
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: skrll Date: Thu May 14 06:13:39 UTC 2020 Modified Files: src/sys/arch/hppa/dev: asp.c dino.c lasi.c wax.c Log Message: Mask all interrupts before reading (and clearing) the interrupt request register in attach. Picked up by an assert in the qemu code. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/dev/asp.c \ src/sys/arch/hppa/dev/wax.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/dev/dino.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/dev/lasi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/asp.c diff -u src/sys/arch/hppa/dev/asp.c:1.1 src/sys/arch/hppa/dev/asp.c:1.2 --- src/sys/arch/hppa/dev/asp.c:1.1 Mon Feb 24 07:23:42 2014 +++ src/sys/arch/hppa/dev/asp.c Thu May 14 06:13:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: asp.c,v 1.1 2014/02/24 07:23:42 skrll Exp $ */ +/* $NetBSD: asp.c,v 1.2 2020/05/14 06:13:39 skrll Exp $ */ /* $OpenBSD: asp.c,v 1.5 2000/02/09 05:04:22 mickey Exp $ */ @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: asp.c,v 1.1 2014/02/24 07:23:42 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: asp.c,v 1.2 2020/05/14 06:13:39 skrll Exp $"); #include #include @@ -243,9 +243,8 @@ aspattach(device_t parent, device_t self s = splhigh(); viper_setintrwnd(1 << ca->ca_irq); - sc->sc_trs->asp_imr = ~0; - (void)sc->sc_trs->asp_irr; sc->sc_trs->asp_imr = 0; + (void)sc->sc_trs->asp_irr; /* Establish the interrupt register. */ hppa_interrupt_register_establish(ci, >sc_ir); Index: src/sys/arch/hppa/dev/wax.c diff -u src/sys/arch/hppa/dev/wax.c:1.1 src/sys/arch/hppa/dev/wax.c:1.2 --- src/sys/arch/hppa/dev/wax.c:1.1 Mon Feb 24 07:23:43 2014 +++ src/sys/arch/hppa/dev/wax.c Thu May 14 06:13:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: wax.c,v 1.1 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: wax.c,v 1.2 2020/05/14 06:13:39 skrll Exp $ */ /* $OpenBSD: wax.c,v 1.1 1998/11/23 03:04:10 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wax.c,v 1.1 2014/02/24 07:23:43 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wax.c,v 1.2 2020/05/14 06:13:39 skrll Exp $"); #include #include @@ -139,9 +139,8 @@ waxattach(device_t parent, device_t self s = splhigh(); sc->sc_regs->wax_iar = ci->ci_hpa | (31 - ca->ca_irq); sc->sc_regs->wax_icr = 0; - sc->sc_regs->wax_imr = ~0U; - (void)sc->sc_regs->wax_irr; sc->sc_regs->wax_imr = 0; + (void)sc->sc_regs->wax_irr; splx(s); /* Establish the interrupt register. */ Index: src/sys/arch/hppa/dev/dino.c diff -u src/sys/arch/hppa/dev/dino.c:1.4 src/sys/arch/hppa/dev/dino.c:1.5 --- src/sys/arch/hppa/dev/dino.c:1.4 Tue Apr 16 06:45:04 2019 +++ src/sys/arch/hppa/dev/dino.c Thu May 14 06:13:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dino.c,v 1.4 2019/04/16 06:45:04 skrll Exp $ */ +/* $NetBSD: dino.c,v 1.5 2020/05/14 06:13:39 skrll Exp $ */ /* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.4 2019/04/16 06:45:04 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.5 2020/05/14 06:13:39 skrll Exp $"); /* #include "cardbus.h" */ @@ -1655,9 +1655,8 @@ dinoattach(device_t parent, device_t sel /* interrupts guts */ s = splhigh(); r->icr = 0; - r->imr = ~0; - (void)r->irr0; r->imr = 0; + (void)r->irr0; r->iar0 = ci->ci_hpa | (31 - ca->ca_irq); splx(s); /* Establish the interrupt register. */ Index: src/sys/arch/hppa/dev/lasi.c diff -u src/sys/arch/hppa/dev/lasi.c:1.2 src/sys/arch/hppa/dev/lasi.c:1.3 --- src/sys/arch/hppa/dev/lasi.c:1.2 Mon Apr 15 20:40:37 2019 +++ src/sys/arch/hppa/dev/lasi.c Thu May 14 06:13:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lasi.c,v 1.2 2019/04/15 20:40:37 skrll Exp $ */ +/* $NetBSD: lasi.c,v 1.3 2020/05/14 06:13:39 skrll Exp $ */ /* $OpenBSD: lasi.c,v 1.4 2001/06/09 03:57:19 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lasi.c,v 1.2 2019/04/15 20:40:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lasi.c,v 1.3 2020/05/14 06:13:39 skrll Exp $"); #undef LASIDEBUG @@ -187,9 +187,8 @@ lasiattach(device_t parent, device_t sel s = splhigh(); sc->sc_trs->lasi_iar = ci->ci_hpa | (31 - ca->ca_irq); sc->sc_trs->lasi_icr = 0; - sc->sc_trs->lasi_imr = ~0U; - (void)sc->sc_trs->lasi_irr; sc->sc_trs->lasi_imr = 0; + (void)sc->sc_trs->lasi_irr; /* Establish the interrupt register. */ hppa_interrupt_register_establish(ci, >sc_ir);
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: skrll Date: Mon May 11 10:23:37 UTC 2020 Modified Files: src/sys/arch/hppa/conf: GENERIC Log Message: Enable modules To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hppa/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/GENERIC diff -u src/sys/arch/hppa/conf/GENERIC:1.32 src/sys/arch/hppa/conf/GENERIC:1.33 --- src/sys/arch/hppa/conf/GENERIC:1.32 Wed Jan 29 18:39:02 2020 +++ src/sys/arch/hppa/conf/GENERIC Mon May 11 10:23:36 2020 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.32 2020/01/29 18:39:02 maya Exp $ +# $NetBSD: GENERIC,v 1.33 2020/05/11 10:23:36 skrll Exp $ # # GENERIC machine description file # @@ -23,7 +23,7 @@ include "arch/hppa/conf/std.hppa" options INCLUDE_CONFIG_FILE # embed config file in kernel binary options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -#ident "GENERIC-$Revision: 1.32 $" +#ident "GENERIC-$Revision: 1.33 $" maxusers 32 # estimated number of users @@ -57,6 +57,9 @@ options SYSVMSG # System V-like messag options SYSVSEM # System V-like semaphores options SYSVSHM # System V-like memory sharing +options MODULAR # new style module(7) framework +options MODULAR_DEFAULT_AUTOLOAD + options USERCONF # userconf(4) support # Alternate buffer queue strategies for better responsiveness under high
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Thu Apr 30 06:16:47 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Convert pmap_check_alias into a function that resolves any aliases issues to deal with the locking around entering a mapping of the same page with and alias issue in the same pmap (pmap lock already held in pmap_enter) This has the added benefit of only flushing the troublesome mappings. The locking could be simplified further here and an PV list iterator function with callback is probably useful. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.111 src/sys/arch/hppa/hppa/pmap.c:1.112 --- src/sys/arch/hppa/hppa/pmap.c:1.111 Thu Apr 16 09:51:56 2020 +++ src/sys/arch/hppa/hppa/pmap.c Thu Apr 30 06:16:47 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.111 2020/04/16 09:51:56 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.112 2020/04/30 06:16:47 skrll Exp $ */ /*- * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.111 2020/04/16 09:51:56 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.112 2020/04/30 06:16:47 skrll Exp $"); #include "opt_cputype.h" @@ -184,7 +184,8 @@ static inline void pmap_pv_unlock(const static inline bool pmap_pv_locked(const struct vm_page_md *md); static inline void pmap_flush_page(struct vm_page *, bool); -static int pmap_check_alias(struct vm_page *, vaddr_t, pt_entry_t); +static void pmap_resolve_alias(struct vm_page *, struct pmap *, vaddr_t, +pt_entry_t); static void pmap_syncicache_page(struct vm_page *, pmap_t, vaddr_t); static void pmap_page_physload(paddr_t, paddr_t); @@ -537,17 +538,126 @@ pmap_dump_pv(paddr_t pa) } #endif -static int -pmap_check_alias(struct vm_page *pg, vaddr_t va, pt_entry_t pte) +static void +pmap_resolve_alias(struct vm_page *pg, struct pmap *pm, vaddr_t va, +pt_entry_t pte) { - struct vm_page_md * const md = VM_PAGE_TO_MD(pg); - struct pv_entry *pve; - int ret = 0; UVMHIST_FUNC(__func__); - UVMHIST_CALLARGS(maphist, "pg %#jx va %#jx pte %#jx", (uintptr_t)pg, - va, pte, 0); + UVMHIST_CALLARGS(maphist, "pg %#jx pm %#jx va %#jx pte %#jx", + (uintptr_t)pg, (uintptr_t)pm, va, pte); + + struct vm_page_md * const md = VM_PAGE_TO_MD(pg); + struct pv_entry *pve, *npve, **pvp; + + restart: + pmap_pv_lock(md); + pvp = >pvh_list; + for (pve = md->pvh_list; pve; pve = npve) { + const pmap_t ppm = pve->pv_pmap; + const vaddr_t pva = pve->pv_va & PV_VAMASK; + + UVMHIST_LOG(maphist, "... pm %#jx va %#jx", (uintptr_t)ppm, + pva, 0, 0); + + npve = pve->pv_next; + + volatile pt_entry_t *pde; + pt_entry_t ppte; + if (pve->pv_va & PV_KENTER) { + /* Get the pte for this mapping */ + pde = pmap_pde_get(ppm->pm_pdir, pva); + ppte = pmap_pte_get(pde, pva); + } else { + /* + * We have to seamlessly get a hold on the pmap's lock + * while holding the PV head lock, to know that the + * mapping is still in place and we can operate on it. + * If that can't be had, drop the PV head lock, wait + * for the pmap's lock to become available, and then + * try again. + */ + UVMHIST_LOG(maphist, "... pm %#jx va %#jx... checking", + (uintptr_t)ppm, pva, 0, 0); + bool locked = true; + if (pm != ppm) { +pmap_reference(ppm); +locked = pmap_trylock(ppm); + } + + if (!locked) { +pmap_pv_unlock(md); +pmap_lock(ppm); +/* nothing */ +pmap_unlock(ppm); +pmap_destroy(ppm); + +UVMHIST_LOG(maphist, "... failed lock", 0, 0, 0, +0); +goto restart; + } + pde = pmap_pde_get(ppm->pm_pdir, pva); + ppte = pmap_pte_get(pde, pva); + + md->pvh_attrs |= pmap_pvh_attrs(ppte); + } + + const bool writeable = + ((pte | ppte) & PTE_PROT(TLB_WRITE)) != 0; + + if ((va & HPPA_PGAOFF) != (pva & HPPA_PGAOFF) && writeable) { + UVMHIST_LOG(maphist, + "aliased writeable mapping %#jx:%#jx", + ppm->pm_space, pva, 0, 0); + + pmap_pte_flush(ppm, pva, ppte); + if (ppte & PTE_PROT(TLB_WIRED)) +ppm->pm_stats.wired_count--; + ppm->pm_stats.resident_count--; + + if (pve->pv_va & PV_KENTER) { +/* + * This is an unmanaged mapping, it must be + * preserved. Move it back on the list and + * advance the end-of-list pointer. + */ +*pvp = pve; +pvp = >pv_next; + } else { +pmap_pte_set(pde, pva, 0); + +/* Remove pve from list */ +*pvp = npve; + +pmap_pv_unlock(md); +pmap_pv_free(pve); +if (pm != ppm) { + pmap_unlock(ppm); + pmap_destroy(ppm); + +} +UVMHIST_LOG(maphist, "... removed", 0, +0, 0, 0); +goto restart; + } + } else { + UVMHIST_LOG(maphist, "not aliased writeable mapping", +
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Sat Apr 25 08:02:40 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: trap.c Log Message: Fix KASSERT that has been incorrect since revision 1.85 from 10 years ago. To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/arch/hppa/hppa/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/trap.c diff -u src/sys/arch/hppa/hppa/trap.c:1.114 src/sys/arch/hppa/hppa/trap.c:1.115 --- src/sys/arch/hppa/hppa/trap.c:1.114 Fri Dec 6 08:40:33 2019 +++ src/sys/arch/hppa/hppa/trap.c Sat Apr 25 08:02:39 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.114 2019/12/06 08:40:33 skrll Exp $ */ +/* $NetBSD: trap.c,v 1.115 2020/04/25 08:02:39 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.114 2019/12/06 08:40:33 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.115 2020/04/25 08:02:39 skrll Exp $"); /* #define INTRDEBUG */ /* #define TRAPDEBUG */ @@ -851,7 +851,7 @@ do_onfault: } /* Never call uvm_fault in interrupt context. */ - KASSERT(curcpu()->ci_cpl == 0); + KASSERT(curcpu()->ci_intr_depth == 0); onfault = pcb->pcb_onfault; pcb->pcb_onfault = 0;
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: skrll Date: Thu Apr 16 09:51:57 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: pmap.c src/sys/arch/hppa/include: types.h Log Message: To allow concurrent page faults on the same set of pages lock the PV lists. From ad@ and fixed up by me. Remove __HAVE_UNLOCKED_PMAP To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/arch/hppa/hppa/pmap.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hppa/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.110 src/sys/arch/hppa/hppa/pmap.c:1.111 --- src/sys/arch/hppa/hppa/pmap.c:1.110 Thu Apr 16 05:22:59 2020 +++ src/sys/arch/hppa/hppa/pmap.c Thu Apr 16 09:51:56 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: pmap.c,v 1.110 2020/04/16 05:22:59 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.111 2020/04/16 09:51:56 skrll Exp $ */ /*- - * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. + * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -65,12 +65,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.110 2020/04/16 05:22:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.111 2020/04/16 09:51:56 skrll Exp $"); #include "opt_cputype.h" #include +#include #include +#include #include #include #include @@ -108,6 +110,14 @@ bool pmap_initialized = false; static kmutex_t pmaps_lock; +static union pmap_pv_locks { + kmutex_t lock; + char padding[COHERENCY_UNIT]; +} pmap_pv_locks[64] __aligned(COHERENCY_UNIT); + +#define PMAP_PV_LOCK(md) \ +((uintptr_t)(md) >> 7 & (__arraycount(pmap_pv_locks) - 1)) + u_int hppa_prot[8]; u_int sid_counter; @@ -140,6 +150,10 @@ static const struct uvm_pagerops pmap_pa struct vm_page *pmap_pagealloc(struct uvm_object *, voff_t); void pmap_pagefree(struct vm_page *); +static inline void pmap_lock(struct pmap *); +static inline void pmap_unlock(struct pmap *); +static inline bool pmap_trylock(struct pmap *); + static inline void pmap_sdir_set(pa_space_t, volatile uint32_t *); static inline uint32_t *pmap_sdir_get(pa_space_t); @@ -165,6 +179,9 @@ static inline void pmap_pv_enter(struct vaddr_t , struct vm_page *, u_int); static inline struct pv_entry *pmap_pv_remove(struct vm_page *, pmap_t, vaddr_t); +static inline void pmap_pv_lock(const struct vm_page_md *md); +static inline void pmap_pv_unlock(const struct vm_page_md *md); +static inline bool pmap_pv_locked(const struct vm_page_md *md); static inline void pmap_flush_page(struct vm_page *, bool); static int pmap_check_alias(struct vm_page *, vaddr_t, pt_entry_t); @@ -195,17 +212,47 @@ void pmap_dump_pv(paddr_t); #define pmap_pvh_attrs(a) \ (((a) & (PVF_MOD|PVF_REF)) ^ PVF_REF) -#define PMAP_LOCK(pm) \ - do { \ - if ((pm) != pmap_kernel()) \ - rw_enter((pm)->pm_lock, RW_WRITER); \ - } while (/*CONSTCOND*/0) - -#define PMAP_UNLOCK(pm) \ - do { \ - if ((pm) != pmap_kernel()) \ - rw_exit((pm)->pm_lock); \ - } while (/*CONSTCOND*/0) +static inline void +pmap_lock(struct pmap *pm) +{ + + rw_enter(pm->pm_lock, RW_WRITER); +} + +static inline void +pmap_unlock(struct pmap *pm) +{ + + rw_exit(pm->pm_lock); +} + +static inline bool +pmap_trylock(struct pmap *pm) +{ + + return rw_tryenter(pm->pm_lock, RW_WRITER); +} + +static inline void +pmap_pv_lock(const struct vm_page_md *md) +{ + + mutex_enter(_pv_locks[PMAP_PV_LOCK(md)].lock); +} + +static inline void +pmap_pv_unlock(const struct vm_page_md *md) +{ + + mutex_exit(_pv_locks[PMAP_PV_LOCK(md)].lock); +} + +static inline bool +pmap_pv_locked(const struct vm_page_md *md) +{ + + return mutex_owned(_pv_locks[PMAP_PV_LOCK(md)].lock); +} struct vm_page * pmap_pagealloc(struct uvm_object *obj, voff_t off) @@ -304,6 +351,7 @@ pmap_pde_alloc(pmap_t pm, vaddr_t va, st UVMHIST_CALLARGS(maphist, "pm %#jx va %#jx pdep %#jx", (uintptr_t)pm, va, (uintptr_t)pdep, 0); + KASSERT(pm != pmap_kernel()); KASSERT(rw_write_held(pm->pm_lock)); @@ -559,7 +607,7 @@ pmap_pv_enter(struct vm_page *pg, struct UVMHIST_LOG(maphist, "...pdep %#jx flags %#jx", (uintptr_t)pdep, flags, 0, 0); - KASSERT(pm == pmap_kernel() || uvm_page_owner_locked_p(pg, true)); + KASSERT(pmap_pv_locked(md)); pve->pv_pmap = pm; pve->pv_va = va | flags; @@ -578,7 +626,7 @@ pmap_pv_remove(struct vm_page *pg, pmap_ struct vm_page_md * const md = VM_PAGE_TO_MD(pg); struct pv_entry **pve, *pv; - KASSERT(pmap == pmap_kernel() || uvm_page_owner_locked_p(pg, true)); + KASSERT(pmap_pv_locked(md)); for (pv = *(pve = >pvh_list); pv; pv = *(pve = &(*pve)->pv_next)) { @@ -967,6 +1015,7 @@ pmap_init(void) { extern void gateway_page(void); volatile pt_entry_t *pde; + int i; UVMHIST_FUNC(__func__)
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: skrll Date: Thu Apr 16 09:28:52 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: hppa_machdep.c src/sys/arch/hppa/include: cpu.h Log Message: Fix cur{lwp,cpu} and other bits for MODULES To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/hppa/hppa/hppa_machdep.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/hppa_machdep.c diff -u src/sys/arch/hppa/hppa/hppa_machdep.c:1.30 src/sys/arch/hppa/hppa/hppa_machdep.c:1.31 --- src/sys/arch/hppa/hppa/hppa_machdep.c:1.30 Sat Nov 23 19:40:35 2019 +++ src/sys/arch/hppa/hppa/hppa_machdep.c Thu Apr 16 09:28:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hppa_machdep.c,v 1.30 2019/11/23 19:40:35 ad Exp $ */ +/* $NetBSD: hppa_machdep.c,v 1.31 2020/04/16 09:28:52 skrll Exp $ */ /*- * Copyright (c) 1997, 2019 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hppa_machdep.c,v 1.30 2019/11/23 19:40:35 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hppa_machdep.c,v 1.31 2020/04/16 09:28:52 skrll Exp $"); #include #include @@ -303,3 +303,18 @@ cpu_need_resched(struct cpu_info *ci, st setsoftast(l); } } + +#ifdef MODULAR +struct lwp * +hppa_curlwp(void) +{ + return curlwp; +} + +struct cpu_info * +hppa_curcpu(void) +{ + return curcpu(); +} +#endif + Index: src/sys/arch/hppa/include/cpu.h diff -u src/sys/arch/hppa/include/cpu.h:1.9 src/sys/arch/hppa/include/cpu.h:1.10 --- src/sys/arch/hppa/include/cpu.h:1.9 Thu Dec 5 08:00:05 2019 +++ src/sys/arch/hppa/include/cpu.h Thu Apr 16 09:28:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.9 2019/12/05 08:00:05 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.10 2020/04/16 09:28:52 skrll Exp $ */ /* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */ @@ -316,12 +316,20 @@ struct cpu_info { void cpu_proc_fork(struct proc *, struct proc *); -#ifdef MULTIPROCESSOR +struct lwp *hppa_curlwp(void); +struct cpu_info *hppa_curcpu(void); + +#if defined(_MODULE) +#define curcpu() hppa_curcpu() +#define curlwphppa_curlwp() +#endif +#if defined(MULTIPROCESSOR) || defined(_MODULE) /* Number of CPUs in the system */ extern int hppa_ncpu; #define HPPA_MAXCPUS 4 + #define cpu_number() (curcpu()->ci_cpuid) #define CPU_IS_PRIMARY(ci) ((ci)->ci_cpuid == 0) @@ -330,8 +338,9 @@ extern int hppa_ncpu; void cpu_boot_secondary_processors(void); +#if !defined(_MODULE) static __inline struct cpu_info * -hppa_curcpu(void) +_hppa_curcpu(void) { struct cpu_info *ci; @@ -340,7 +349,8 @@ hppa_curcpu(void) return ci; } -#define curcpu() hppa_curcpu() +#define curcpu() _hppa_curcpu() +#endif #else /* MULTIPROCESSOR */ @@ -349,7 +359,7 @@ hppa_curcpu(void) #define cpu_number() 0 static __inline struct lwp * -hppa_curlwp(void) +_hppa_curlwp(void) { struct lwp *l; @@ -358,7 +368,7 @@ hppa_curlwp(void) return l; } -#define curlwphppa_curlwp() +#define curlwp_hppa_curlwp() #endif /* MULTIPROCESSOR */
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: skrll Date: Thu Apr 16 05:44:44 UTC 2020 Modified Files: src/sys/arch/hppa/dev: cpu.c src/sys/arch/hppa/hppa: fpu.c Log Message: Don't KASSERT there's an FPU present. QEMU doesn't have one... To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/dev/cpu.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/hppa/hppa/fpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/cpu.c diff -u src/sys/arch/hppa/dev/cpu.c:1.1 src/sys/arch/hppa/dev/cpu.c:1.2 --- src/sys/arch/hppa/dev/cpu.c:1.1 Mon Feb 24 07:23:42 2014 +++ src/sys/arch/hppa/dev/cpu.c Thu Apr 16 05:44:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.1 2014/02/24 07:23:42 skrll Exp $ */ +/* $NetBSD: cpu.c,v 1.2 2020/04/16 05:44:44 skrll Exp $ */ /* $OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.1 2014/02/24 07:23:42 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.2 2020/04/16 05:44:44 skrll Exp $"); #include "opt_multiprocessor.h" @@ -150,10 +150,13 @@ cpuattach(device_t parent, device_t self /* * Describe the floating-point support. */ - KASSERT(fpu_present); - aprint_normal("%s: %s floating point, rev %d\n", device_xname(self), - hppa_mod_info(HPPA_TYPE_FPU, (fpu_version >> 16) & 0x1f), - (fpu_version >> 11) & 0x1f); + if (fpu_present) + aprint_normal("%s: %s floating point, rev %d\n", device_xname(self), + hppa_mod_info(HPPA_TYPE_FPU, (fpu_version >> 16) & 0x1f), + (fpu_version >> 11) & 0x1f); + else + aprint_normal("%s: no floating point\n", device_xname(self)); + if (cpuno >= HPPA_MAXCPUS) { aprint_normal_dev(self, "not started\n"); Index: src/sys/arch/hppa/hppa/fpu.c diff -u src/sys/arch/hppa/hppa/fpu.c:1.26 src/sys/arch/hppa/hppa/fpu.c:1.27 --- src/sys/arch/hppa/hppa/fpu.c:1.26 Mon Apr 15 20:45:08 2019 +++ src/sys/arch/hppa/hppa/fpu.c Thu Apr 16 05:44:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu.c,v 1.26 2019/04/15 20:45:08 skrll Exp $ */ +/* $NetBSD: fpu.c,v 1.27 2020/04/16 05:44:43 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.26 2019/04/15 20:45:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.27 2020/04/16 05:44:43 skrll Exp $"); #include #include @@ -198,7 +198,8 @@ hppa_fpu_flush(struct lwp *l) struct pcb *pcb = lwp_getpcb(l); struct cpu_info *ci = curcpu(); - KASSERT(fpu_present); + if (!fpu_present) + return; /* * If this process' state is currently in hardware, swap it out.
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Thu Apr 16 05:22:59 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: More KNF To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.109 src/sys/arch/hppa/hppa/pmap.c:1.110 --- src/sys/arch/hppa/hppa/pmap.c:1.109 Wed Apr 15 15:50:15 2020 +++ src/sys/arch/hppa/hppa/pmap.c Thu Apr 16 05:22:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.109 2020/04/15 15:50:15 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.110 2020/04/16 05:22:59 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.109 2020/04/15 15:50:15 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.110 2020/04/16 05:22:59 skrll Exp $"); #include "opt_cputype.h" @@ -83,8 +83,8 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.1 #include #include #include -#include #include +#include #include #include
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: skrll Date: Wed Apr 15 15:50:16 UTC 2020 Modified Files: src/sys/arch/hppa/gsc: if_ie_gsc.c src/sys/arch/hppa/hppa: machdep.c pmap.c Log Message: Convert PMAPDEBUG to UVMHIST To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/gsc/if_ie_gsc.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/hppa/machdep.c cvs rdiff -u -r1.108 -r1.109 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/gsc/if_ie_gsc.c diff -u src/sys/arch/hppa/gsc/if_ie_gsc.c:1.4 src/sys/arch/hppa/gsc/if_ie_gsc.c:1.5 --- src/sys/arch/hppa/gsc/if_ie_gsc.c:1.4 Thu Apr 25 10:08:45 2019 +++ src/sys/arch/hppa/gsc/if_ie_gsc.c Wed Apr 15 15:50:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ie_gsc.c,v 1.4 2019/04/25 10:08:45 msaitoh Exp $ */ +/* $NetBSD: if_ie_gsc.c,v 1.5 2020/04/15 15:50:15 skrll Exp $ */ /* $OpenBSD: if_ie_gsc.c,v 1.6 2001/01/12 22:57:04 mickey Exp $ */ @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ie_gsc.c,v 1.4 2019/04/25 10:08:45 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ie_gsc.c,v 1.5 2020/04/15 15:50:15 skrll Exp $"); #include #include @@ -378,11 +378,6 @@ ie_gsc_attach(device_t parent, device_t int rseg; int rv; uint8_t myaddr[ETHER_ADDR_LEN]; -#ifdef PMAPDEBUG - extern int pmapdebug; - int opmapdebug = pmapdebug; - pmapdebug = 0; -#endif if (ga->ga_type.iodc_sv_model == HPPA_FIO_GLAN) gsc->flags |= IEGSC_GECKO; @@ -506,9 +501,6 @@ ie_gsc_attach(device_t parent, device_t bus_dmamem_free(gsc->iemt, , rseg); return; } -#ifdef PMAPDEBUG - pmapdebug = opmapdebug; -#endif if (!rv) return; Index: src/sys/arch/hppa/hppa/machdep.c diff -u src/sys/arch/hppa/hppa/machdep.c:1.12 src/sys/arch/hppa/hppa/machdep.c:1.13 --- src/sys/arch/hppa/hppa/machdep.c:1.12 Tue Dec 31 13:07:10 2019 +++ src/sys/arch/hppa/hppa/machdep.c Wed Apr 15 15:50:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.12 2019/12/31 13:07:10 ad Exp $ */ +/* $NetBSD: machdep.c,v 1.13 2020/04/15 15:50:15 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.12 2019/12/31 13:07:10 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.13 2020/04/15 15:50:15 skrll Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -126,10 +126,6 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #include -#ifdef PMAPDEBUG -#include -#endif - #include "ksyms.h" #include "lcd.h" @@ -898,12 +894,7 @@ cpu_startup(void) { vaddr_t minaddr, maxaddr; char pbuf[3][9]; -#ifdef PMAPDEBUG - extern int pmapdebug; - int opmapdebug = pmapdebug; - pmapdebug = 0; -#endif /* Initialize the message buffer. */ initmsgbuf(msgbufaddr, MSGBUFSIZE); @@ -940,9 +931,6 @@ cpu_startup(void) phys_map = uvm_km_suballoc(kernel_map, , , VM_PHYS_SIZE, 0, false, NULL); -#ifdef PMAPDEBUG - pmapdebug = opmapdebug; -#endif format_bytes(pbuf[0], sizeof(pbuf[0]), ptoa(uvm_availmem())); printf("avail mem = %s\n", pbuf[0]); } Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.108 src/sys/arch/hppa/hppa/pmap.c:1.109 --- src/sys/arch/hppa/hppa/pmap.c:1.108 Wed Apr 15 15:22:37 2020 +++ src/sys/arch/hppa/hppa/pmap.c Wed Apr 15 15:50:15 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.108 2020/04/15 15:22:37 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.109 2020/04/15 15:50:15 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.108 2020/04/15 15:22:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.109 2020/04/15 15:50:15 skrll Exp $"); #include "opt_cputype.h" @@ -94,52 +94,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.1 #include #endif -#ifdef PMAPDEBUG - -#define static /**/ -#define inline /**/ - -#define DPRINTF(l,s) do { \ - if ((pmapdebug & (l)) == (l)) \ - printf s; \ -} while(0) - -#define PDB_FOLLOW 0x0001 -#define PDB_INIT 0x0002 -#define PDB_ENTER 0x0004 -#define PDB_REMOVE 0x0008 -#define PDB_CREATE 0x0010 -#define PDB_PTPAGE 0x0020 -#define PDB_CACHE 0x0040 -#define PDB_BITS 0x0080 -#define PDB_COLLECT 0x0100 -#define PDB_PROTECT 0x0200 -#define PDB_EXTRACT 0x0400 -#define PDB_VP 0x0800 -#define PDB_PV 0x1000 -#define PDB_PARANOIA 0x2000 -#define PDB_WIRING 0x4000 -#define PDB_PMAP 0x8000 -#define PDB_STEAL 0x0001 -#define PDB_PHYS 0x0002 -#define PDB_POOL 0x0004 -#define PDB_ALIAS 0x0008 -int pmapdebug = 0 - | PDB_INIT - | PDB_FOLLOW - | PDB_VP - | PDB_PV - | PDB_ENTER - | PDB_REMOVE - | PDB_STEAL - | PDB_PROTECT - | PDB_PHYS - | PDB_ALIAS - ; -#else -#define DPRINTF(l,s) /* */ -#endif - int pmap_hptsize = 16 * PAGE_SIZE; /* patchable */ vaddr_t pmap_hpt; @@ -331,9
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Wed Apr 15 15:22:37 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Spaces to tabs To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.107 src/sys/arch/hppa/hppa/pmap.c:1.108 --- src/sys/arch/hppa/hppa/pmap.c:1.107 Wed Apr 15 09:41:09 2020 +++ src/sys/arch/hppa/hppa/pmap.c Wed Apr 15 15:22:37 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.107 2020/04/15 09:41:09 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.108 2020/04/15 15:22:37 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.107 2020/04/15 09:41:09 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.108 2020/04/15 15:22:37 skrll Exp $"); #include "opt_cputype.h" @@ -537,13 +537,13 @@ pmap_check_alias(struct vm_page *pg, vad (pte & PTE_PROT(TLB_WRITE))) { DPRINTF(PDB_FOLLOW|PDB_ALIAS, -("%s: aliased writable mapping 0x%x:0x%lx\n", -__func__, pve->pv_pmap->pm_space, pve->pv_va)); + ("%s: aliased writable mapping 0x%x:0x%lx\n", + __func__, pve->pv_pmap->pm_space, pve->pv_va)); ret++; } } -return (ret); + return (ret); } /* @@ -1295,7 +1295,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd } panic("%s: no pv entries available", __func__); } -pte |= PTE_PROT(pmap_prot(pmap, prot)); + pte |= PTE_PROT(pmap_prot(pmap, prot)); if (pmap_check_alias(pg, va, pte)) pmap_page_remove(pg); pmap_pv_enter(pg, pve, pmap, va, ptp, 0);
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Wed Apr 15 09:41:09 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.106 src/sys/arch/hppa/hppa/pmap.c:1.107 --- src/sys/arch/hppa/hppa/pmap.c:1.106 Wed Apr 15 08:14:22 2020 +++ src/sys/arch/hppa/hppa/pmap.c Wed Apr 15 09:41:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.106 2020/04/15 08:14:22 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.107 2020/04/15 09:41:09 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,27 +65,27 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.106 2020/04/15 08:14:22 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.107 2020/04/15 09:41:09 skrll Exp $"); #include "opt_cputype.h" #include -#include -#include #include +#include #include +#include #include #include -#include -#include #include +#include +#include #include #include #include -#include -#include +#include +#include #include #include
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Wed Apr 15 08:14:22 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: G/C a #include To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.105 src/sys/arch/hppa/hppa/pmap.c:1.106 --- src/sys/arch/hppa/hppa/pmap.c:1.105 Sun Mar 1 21:40:45 2020 +++ src/sys/arch/hppa/hppa/pmap.c Wed Apr 15 08:14:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.105 2020/03/01 21:40:45 ad Exp $ */ +/* $NetBSD: pmap.c,v 1.106 2020/04/15 08:14:22 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,13 +65,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.105 2020/03/01 21:40:45 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.106 2020/04/15 08:14:22 skrll Exp $"); #include "opt_cputype.h" #include #include -#include #include #include #include
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: riastradh Date: Sat Mar 21 17:00:48 UTC 2020 Modified Files: src/sys/arch/hppa/include: param.h Log Message: Revert another historic $Hdr$ collapse. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hppa/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/param.h diff -u src/sys/arch/hppa/include/param.h:1.25 src/sys/arch/hppa/include/param.h:1.26 --- src/sys/arch/hppa/include/param.h:1.25 Thu Mar 5 15:18:54 2020 +++ src/sys/arch/hppa/include/param.h Sat Mar 21 17:00:47 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.25 2020/03/05 15:18:54 riastradh Exp $ */ +/* $NetBSD: param.h,v 1.26 2020/03/21 17:00:47 riastradh Exp $ */ /* $OpenBSD: param.h,v 1.12 2001/07/06 02:07:41 provos Exp $ */ @@ -22,7 +22,7 @@ * CSL requests users of this software to return to csl-d...@cs.utah.edu any * improvements that they make and grant CSL redistribution rights. * - * Utah $Hdr$ + * Utah $Hdr: param.h 1.18 94/12/16$ */ #ifdef _KERNEL
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: ad Date: Sat Mar 14 16:55:17 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: genassym.cf Log Message: Remove unused RW lock defs. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/hppa/genassym.cf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/genassym.cf diff -u src/sys/arch/hppa/hppa/genassym.cf:1.3 src/sys/arch/hppa/hppa/genassym.cf:1.4 --- src/sys/arch/hppa/hppa/genassym.cf:1.3 Thu Feb 20 08:27:38 2020 +++ src/sys/arch/hppa/hppa/genassym.cf Sat Mar 14 16:55:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.3 2020/02/20 08:27:38 skrll Exp $ +# $NetBSD: genassym.cf,v 1.4 2020/03/14 16:55:17 ad Exp $ # $OpenBSD: genassym.cf,v 1.18 2001/09/20 18:31:14 mickey Exp $ @@ -38,7 +38,6 @@ include "opt_multiprocessor.h" endif quote #define __MUTEX_PRIVATE -quote #define __RWLOCK_PRIVATE include include @@ -48,7 +47,6 @@ include include include include -include include include @@ -108,15 +106,6 @@ define MTX_LOCK offsetof(struct kmutex, define MTX_OWNER offsetof(struct kmutex, mtx_owner) define MTX_WAITERS offsetof(struct kmutex, mtx_waiters) -define RW_OWNER offsetof(struct krwlock, rw_owner) -define RW_WRITE_LOCKED RW_WRITE_LOCKED -define RW_WRITE_WANTED RW_WRITE_WANTED -define RW_READ_INCR RW_READ_INCR -define RW_HAS_WAITERS RW_HAS_WAITERS -define RW_THREAD RW_THREAD -define RW_READER RW_READER -define RW_WRITER RW_WRITER - # saved state fields struct trapframe member TF_FLAGS tf_flags
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: ad Date: Sun Mar 1 21:40:45 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Give pmap uvm_objects an empty pagerops to avoid special casing in UVM. (This use of uvm_object causes a disproportionate amount of work.) To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.104 src/sys/arch/hppa/hppa/pmap.c:1.105 --- src/sys/arch/hppa/hppa/pmap.c:1.104 Mon Feb 24 20:42:18 2020 +++ src/sys/arch/hppa/hppa/pmap.c Sun Mar 1 21:40:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.104 2020/02/24 20:42:18 ad Exp $ */ +/* $NetBSD: pmap.c,v 1.105 2020/03/01 21:40:45 ad Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.104 2020/02/24 20:42:18 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.105 2020/03/01 21:40:45 ad Exp $"); #include "opt_cputype.h" @@ -158,6 +158,10 @@ static kmutex_t pmaps_lock; u_int hppa_prot[8]; u_int sid_counter; +static const struct uvm_pagerops pmap_pager = { + /* nothing */ +}; + /* * Page 3-6 of the "PA-RISC 1.1 Architecture and Instruction Set * Reference Manual" (HP part number 09740-90039) defines equivalent @@ -696,7 +700,7 @@ pmap_bootstrap(vaddr_t vstart) memset(kpm, 0, sizeof(*kpm)); rw_init(>pm_obj_lock); - uvm_obj_init(>pm_obj, NULL, false, 1); + uvm_obj_init(>pm_obj, _pager, false, 1); uvm_obj_setlock(>pm_obj, >pm_obj_lock); kpm->pm_space = HPPA_SID_KERNEL; @@ -1059,7 +1063,7 @@ pmap_create(void) DPRINTF(PDB_FOLLOW|PDB_PMAP, ("%s: pmap = %p\n", __func__, pmap)); rw_init(>pm_obj_lock); - uvm_obj_init(>pm_obj, NULL, false, 1); + uvm_obj_init(>pm_obj, _pager, false, 1); uvm_obj_setlock(>pm_obj, >pm_obj_lock); mutex_enter(_lock);
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: ad Date: Mon Feb 24 20:42:18 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: pmap.c src/sys/arch/hppa/include: pmap.h Log Message: Adjust for UVM locking changes. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/arch/hppa/hppa/pmap.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/hppa/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.103 src/sys/arch/hppa/hppa/pmap.c:1.104 --- src/sys/arch/hppa/hppa/pmap.c:1.103 Sun Feb 23 15:46:39 2020 +++ src/sys/arch/hppa/hppa/pmap.c Mon Feb 24 20:42:18 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.103 2020/02/23 15:46:39 ad Exp $ */ +/* $NetBSD: pmap.c,v 1.104 2020/02/24 20:42:18 ad Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.103 2020/02/23 15:46:39 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.104 2020/02/24 20:42:18 ad Exp $"); #include "opt_cputype.h" @@ -74,6 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.1 #include #include #include +#include #include #include @@ -237,16 +238,16 @@ void pmap_dump_pv(paddr_t); #define pmap_pvh_attrs(a) \ (((a) & (PVF_MOD|PVF_REF)) ^ PVF_REF) -#define PMAP_LOCK(pm) \ - do { \ - if ((pm) != pmap_kernel()) \ - mutex_enter((pm)->pm_lock); \ +#define PMAP_LOCK(pm) \ + do { \ + if ((pm) != pmap_kernel()) \ + rw_enter((pm)->pm_lock, RW_WRITER); \ } while (/*CONSTCOND*/0) -#define PMAP_UNLOCK(pm) \ - do { \ - if ((pm) != pmap_kernel()) \ - mutex_exit((pm)->pm_lock); \ +#define PMAP_UNLOCK(pm) \ + do { \ + if ((pm) != pmap_kernel()) \ + rw_exit((pm)->pm_lock); \ } while (/*CONSTCOND*/0) struct vm_page * @@ -346,7 +347,7 @@ pmap_pde_alloc(pmap_t pm, vaddr_t va, st ("%s(%p, 0x%lx, %p)\n", __func__, pm, va, pdep)); KASSERT(pm != pmap_kernel()); - KASSERT(mutex_owned(pm->pm_lock)); + KASSERT(rw_write_held(pm->pm_lock)); pg = pmap_pagealloc(>pm_obj, va); @@ -694,7 +695,7 @@ pmap_bootstrap(vaddr_t vstart) kpm = pmap_kernel(); memset(kpm, 0, sizeof(*kpm)); - mutex_init(>pm_obj_lock, MUTEX_DEFAULT, IPL_NONE); + rw_init(>pm_obj_lock); uvm_obj_init(>pm_obj, NULL, false, 1); uvm_obj_setlock(>pm_obj, >pm_obj_lock); @@ -1057,7 +1058,7 @@ pmap_create(void) DPRINTF(PDB_FOLLOW|PDB_PMAP, ("%s: pmap = %p\n", __func__, pmap)); - mutex_init(>pm_obj_lock, MUTEX_DEFAULT, IPL_NONE); + rw_init(>pm_obj_lock); uvm_obj_init(>pm_obj, NULL, false, 1); uvm_obj_setlock(>pm_obj, >pm_obj_lock); @@ -1110,9 +,9 @@ pmap_destroy(pmap_t pmap) DPRINTF(PDB_FOLLOW|PDB_PMAP, ("%s(%p)\n", __func__, pmap)); - mutex_enter(pmap->pm_lock); + rw_enter(pmap->pm_lock, RW_WRITER); refs = --pmap->pm_obj.uo_refs; - mutex_exit(pmap->pm_lock); + rw_exit(pmap->pm_lock); if (refs > 0) return; @@ -1120,7 +1121,7 @@ pmap_destroy(pmap_t pmap) #ifdef DIAGNOSTIC uvm_page_array_init(); off = 0; - mutex_enter(pmap->pm_lock); + rw_enter(pmap->pm_lock, RW_WRITER); while ((pg = uvm_page_array_fill_and_peek(, >pm_obj, off, 0, 0)) != NULL) { pt_entry_t *pde, *epde; @@ -1161,16 +1162,16 @@ pmap_destroy(pmap_t pmap) } DPRINTF(PDB_FOLLOW, ("\n")); } - mutex_exit(pmap->pm_lock); + rw_exit(pmap->pm_lock); uvm_page_array_fini(); #endif pmap_sdir_set(pmap->pm_space, 0); - mutex_enter(pmap->pm_lock); + rw_enter(pmap->pm_lock, RW_WRITER); pmap_pagefree(pmap->pm_pdir_pg); - mutex_exit(pmap->pm_lock); + rw_exit(pmap->pm_lock); uvm_obj_destroy(>pm_obj, false); - mutex_destroy(>pm_obj_lock); + rw_destroy(>pm_obj_lock); pool_put(_pool, pmap); } @@ -1183,9 +1184,9 @@ pmap_reference(pmap_t pmap) DPRINTF(PDB_FOLLOW|PDB_PMAP, ("%s(%p)\n", __func__, pmap)); - mutex_enter(pmap->pm_lock); + rw_enter(pmap->pm_lock, RW_WRITER); pmap->pm_obj.uo_refs++; - mutex_exit(pmap->pm_lock); + rw_exit(pmap->pm_lock); } Index: src/sys/arch/hppa/include/pmap.h diff -u src/sys/arch/hppa/include/pmap.h:1.38 src/sys/arch/hppa/include/pmap.h:1.39 --- src/sys/arch/hppa/include/pmap.h:1.38 Mon Aug 12 09:18:30 2019 +++ src/sys/arch/hppa/include/pmap.h Mon Feb 24 20:42:18 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.38 2019/08/12 09:18:30 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.39 2020/02/24 20:42:18 ad Exp $ */ /* $OpenBSD: pmap.h,v 1.35 2007/12/14 18:32:23 deraadt Exp $ */ @@ -39,7 +39,7 @@ #include "opt_cputype.h" #endif -#include +#include #include #include @@ -53,7 +53,7 @@ struct pmap { struct uvm_object pm_obj; /* object (lck by object lock) */ #define pm_lock pm_obj.vmobjlock - kmutex_t pm_obj_lock; /* lock for pm_obj */ + krwlock_t pm_obj_lock; /* lock for pm_obj */ struct vm_page *pm_ptphint; struct vm_page *pm_pdir_pg; /* vm_page for pdir */ volatile
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Fri Dec 6 08:40:34 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: trap.c Log Message: Simplify userret function signature. From ad@ To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/hppa/hppa/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/trap.c diff -u src/sys/arch/hppa/hppa/trap.c:1.113 src/sys/arch/hppa/hppa/trap.c:1.114 --- src/sys/arch/hppa/hppa/trap.c:1.113 Fri Nov 29 18:27:32 2019 +++ src/sys/arch/hppa/hppa/trap.c Fri Dec 6 08:40:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.113 2019/11/29 18:27:32 ad Exp $ */ +/* $NetBSD: trap.c,v 1.114 2019/12/06 08:40:33 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.113 2019/11/29 18:27:32 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.114 2019/12/06 08:40:33 skrll Exp $"); /* #define INTRDEBUG */ /* #define TRAPDEBUG */ @@ -198,9 +198,10 @@ u_int rctr_next_iioq; #endif static inline void -userret(struct lwp *l, register_t pc, u_quad_t oticks) +userret(struct lwp *l, struct trapframe *tf) { struct proc *p = l->l_proc; + int oticks = 0; /* XXX why zero? */ do { l->l_md.md_astpending = 0; @@ -214,7 +215,8 @@ userret(struct lwp *l, register_t pc, u_ if (p->p_stflag & PST_PROFIL) { extern int psratio; - addupc_task(l, pc, (int)(p->p_sticks - oticks) * psratio); + addupc_task(l, tf->tf_iioq_head, + (int)(p->p_sticks - oticks) * psratio); } } @@ -962,7 +964,7 @@ do_onfault: #endif if (type & T_USER) - userret(l, l->l_md.md_regs->tf_iioq_head, 0); + userret(l, l->l_md.md_regs); #ifdef DEBUG frame_sanity_check(__func__, __LINE__, type, frame, l); @@ -979,7 +981,7 @@ md_child_return(struct lwp *l) * Return values in the frame set by cpu_lwp_fork(). */ - userret(l, l->l_md.md_regs->tf_iioq_head, 0); + userret(l, l->l_md.md_regs); #ifdef DEBUG frame_sanity_check(__func__, __LINE__, 0, l->l_md.md_regs, l); #endif /* DEBUG */ @@ -992,7 +994,7 @@ void cpu_spawn_return(struct lwp *l) { - userret(l, l->l_md.md_regs->tf_iioq_head, 0); + userret(l, l->l_md.md_regs); #ifdef DEBUG frame_sanity_check(__func__, __LINE__, 0, l->l_md.md_regs, l); #endif /* DEBUG */ @@ -1264,7 +1266,7 @@ syscall(struct trapframe *frame, int *ar break; } - userret(l, frame->tf_iioq_head, 0); + userret(l, frame); #ifdef DIAGNOSTIC if (ci->ci_cpl != oldcpl) { @@ -1294,5 +1296,5 @@ startlwp(void *arg) KASSERT(error == 0); kmem_free(uc, sizeof(ucontext_t)); - userret(l, l->l_md.md_regs->tf_iioq_head, 0); + userret(l, l->l_md.md_regs); }
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Thu Dec 5 08:00:05 UTC 2019 Modified Files: src/sys/arch/hppa/include: cpu.h Log Message: Attempt to restore Utah $Hdr$ To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/cpu.h diff -u src/sys/arch/hppa/include/cpu.h:1.8 src/sys/arch/hppa/include/cpu.h:1.9 --- src/sys/arch/hppa/include/cpu.h:1.8 Thu Dec 5 03:59:39 2019 +++ src/sys/arch/hppa/include/cpu.h Thu Dec 5 08:00:05 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.8 2019/12/05 03:59:39 riastradh Exp $ */ +/* $NetBSD: cpu.h,v 1.9 2019/12/05 08:00:05 skrll Exp $ */ /* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */ @@ -47,7 +47,7 @@ * CSL requests users of this software to return to csl-d...@cs.utah.edu any * improvements that they make and grant CSL redistribution rights. * - * Utah $Hdr$ + * Utah $Hdr: cpu.h 1.19 94/12/16$ */ #ifndef _MACHINE_CPU_H_
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: riastradh Date: Thu Dec 5 03:59:39 UTC 2019 Modified Files: src/sys/arch/hppa/include: cpu.h Log Message: Only need one ci_onproc member. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/cpu.h diff -u src/sys/arch/hppa/include/cpu.h:1.7 src/sys/arch/hppa/include/cpu.h:1.8 --- src/sys/arch/hppa/include/cpu.h:1.7 Wed Dec 4 07:49:39 2019 +++ src/sys/arch/hppa/include/cpu.h Thu Dec 5 03:59:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.7 2019/12/04 07:49:39 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.8 2019/12/05 03:59:39 riastradh Exp $ */ /* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */ @@ -47,7 +47,7 @@ * CSL requests users of this software to return to csl-d...@cs.utah.edu any * improvements that they make and grant CSL redistribution rights. * - * Utah $Hdr: cpu.h 1.19 94/12/16$ + * Utah $Hdr$ */ #ifndef _MACHINE_CPU_H_ @@ -296,7 +296,6 @@ struct cpu_info { #define CPUF_PRIMARY 0x0001 /* ... is monarch/primary */ #define CPUF_RUNNING 0x0002 /* ... is running. */ - struct lwp *ci_onproc; /* current user LWP / kthread */ volatile u_long ci_ipi; /* IPIs pending */ struct cpu_softc *ci_softc;
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Wed Dec 4 07:49:39 UTC 2019 Modified Files: src/sys/arch/hppa/include: cpu.h Log Message: +ci_onproc To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/cpu.h diff -u src/sys/arch/hppa/include/cpu.h:1.6 src/sys/arch/hppa/include/cpu.h:1.7 --- src/sys/arch/hppa/include/cpu.h:1.6 Sun Dec 1 15:34:44 2019 +++ src/sys/arch/hppa/include/cpu.h Wed Dec 4 07:49:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.6 2019/12/01 15:34:44 ad Exp $ */ +/* $NetBSD: cpu.h,v 1.7 2019/12/04 07:49:39 skrll Exp $ */ /* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */ @@ -288,6 +288,7 @@ struct cpu_info { struct hppa_interrupt_register ci_ir; struct hppa_interrupt_bit ci_ib[HPPA_INTERRUPT_BITS]; + struct lwp *ci_onproc; /* current user LWP / kthread */ #if defined(MULTIPROCESSOR) struct lwp *ci_curlwp; /* CPU owner */ paddr_t ci_stack; /* stack for spin up */
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Sat May 4 13:04:36 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: intr.c Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/hppa/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/intr.c diff -u src/sys/arch/hppa/hppa/intr.c:1.2 src/sys/arch/hppa/hppa/intr.c:1.3 --- src/sys/arch/hppa/hppa/intr.c:1.2 Mon Apr 15 20:45:08 2019 +++ src/sys/arch/hppa/hppa/intr.c Sat May 4 13:04:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.2 2019/04/15 20:45:08 skrll Exp $ */ +/* $NetBSD: intr.c,v 1.3 2019/05/04 13:04:36 skrll Exp $ */ /* $OpenBSD: intr.c,v 1.27 2009/12/31 12:52:35 jsing Exp $ */ /* @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.2 2019/04/15 20:45:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.3 2019/05/04 13:04:36 skrll Exp $"); #define __MUTEX_PRIVATE @@ -502,7 +502,6 @@ hppa_intr_ipending(struct hppa_interrupt } } - return pending; }
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Fri Apr 26 18:37:24 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: mainbus.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/hppa/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/mainbus.c diff -u src/sys/arch/hppa/hppa/mainbus.c:1.3 src/sys/arch/hppa/hppa/mainbus.c:1.4 --- src/sys/arch/hppa/hppa/mainbus.c:1.3 Mon Apr 15 20:45:08 2019 +++ src/sys/arch/hppa/hppa/mainbus.c Fri Apr 26 18:37:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.3 2019/04/15 20:45:08 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.4 2019/04/26 18:37:24 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.3 2019/04/15 20:45:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.4 2019/04/26 18:37:24 skrll Exp $"); #include "locators.h" #include "power.h" @@ -249,7 +249,7 @@ mbus_map(void *v, bus_addr_t bpa, bus_si */ error = extent_alloc_region(hppa_io_extent, bpa, size, EX_NOWAIT); if (error) - return (error); + return error; /* * Map the region of I/O space. @@ -301,7 +301,7 @@ mbus_alloc(void *v, bus_addr_t rstart, b error = extent_alloc_subregion1(hppa_io_extent, rstart, rend, size, align, 0, boundary, EX_NOWAIT, ); if (error) - return (error); + return error; /* * Map the region of I/O space. @@ -758,7 +758,7 @@ mbus_dmamap_create(void *v, bus_size_t s map = malloc(mapsize, M_DMAMAP, (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK); if (!map) - return (ENOMEM); + return ENOMEM; memset(map, 0, mapsize); map->_dm_size = size; @@ -770,7 +770,7 @@ mbus_dmamap_create(void *v, bus_size_t s map->dm_nsegs = 0; *dmamp = map; - return (0); + return 0; } /* @@ -808,7 +808,7 @@ mbus_dmamap_load(void *v, bus_dmamap_t m map->dm_nsegs = 0; if (buflen > map->_dm_size) - return (EINVAL); + return EINVAL; if (p != NULL) { vm = p->p_vmspace; @@ -823,7 +823,7 @@ mbus_dmamap_load(void *v, bus_dmamap_t m map->dm_mapsize = buflen; map->dm_nsegs = seg + 1; } - return (error); + return error; } /* @@ -846,7 +846,7 @@ mbus_dmamap_load_mbuf(void *v, bus_dmama KASSERT(m0->m_flags & M_PKTHDR); if (m0->m_pkthdr.len > map->_dm_size) - return (EINVAL); + return EINVAL; first = 1; seg = 0; @@ -862,7 +862,7 @@ mbus_dmamap_load_mbuf(void *v, bus_dmama map->dm_mapsize = m0->m_pkthdr.len; map->dm_nsegs = seg + 1; } - return (error); + return error; } /* @@ -908,7 +908,7 @@ mbus_dmamap_load_uio(void *v, bus_dmamap map->dm_mapsize = uio->uio_resid; map->dm_nsegs = seg + 1; } - return (error); + return error; } /* @@ -960,7 +960,7 @@ mbus_dmamap_load_raw(void *v, bus_dmamap map->dm_nsegs = seg + 1; map->dm_mapsize = mapsize; - return (0); + return 0; } /* @@ -1070,7 +1070,7 @@ mbus_dmamem_alloc(void *v, bus_size_t si if ((mlist = malloc(sizeof(*mlist), M_DEVBUF, (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) - return (ENOMEM); + return ENOMEM; /* * Allocate physical pages from the VM system. @@ -1085,7 +1085,7 @@ mbus_dmamem_alloc(void *v, bus_size_t si " failed", __func__, size, low, high, mlist, nsegs, (flags & BUS_DMA_NOWAIT) == 0)); free(mlist, M_DEVBUF); - return (error); + return error; } pa_next = 0; @@ -1097,7 +1097,7 @@ mbus_dmamem_alloc(void *v, bus_size_t si if (++seg >= nsegs) { uvm_pglistfree(mlist); free(mlist, M_DEVBUF); -return (ENOMEM); +return ENOMEM; } segs[seg].ds_addr = pa; segs[seg].ds_len = PAGE_SIZE; @@ -1122,7 +1122,7 @@ mbus_dmamem_alloc(void *v, bus_size_t si * We now have physical pages, but no kernel virtual addresses yet. * These may be allocated in bus_dmamap_map. */ - return (0); + return 0; } void @@ -1161,7 +1161,7 @@ mbus_dmamem_map(void *v, bus_dma_segment /* Get a chunk of kernel virtual space. */ va = uvm_km_alloc(kernel_map, size, 0, UVM_KMF_VAONLY | kmflags); if (__predict_false(va == 0)) - return (ENOMEM); + return ENOMEM; *kvap = (void *)va; @@ -1180,7 +1180,7 @@ mbus_dmamem_map(void *v, bus_dma_segment } } pmap_update(pmap_kernel()); - return (0); + return 0; } /* @@ -1219,11 +1219,11 @@ mbus_dmamem_mmap(void *v, bus_dma_segmen continue; } - return (btop((u_long)segs[i].ds_addr + off)); + return btop((u_long)segs[i].ds_addr + off); } /* Page not found. */ - return (-1); + return -1; } int @@ -1304,8 +1304,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, * Did we fit? */ if (buflen != 0) - return (EFBIG); /* XXX better return value here? */ - return (0); + return EFBIG; /* XXX better return value here? */ + return 0; } const struct hppa_bus_dma_tag hppa_dmatag = { @@ -1476,7 +1476,7 @@
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Wed Apr 17 20:46:38 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: disksubr.c Log Message: Get a large enough buffer for the LIF DIR To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/hppa/disksubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/disksubr.c diff -u src/sys/arch/hppa/hppa/disksubr.c:1.3 src/sys/arch/hppa/hppa/disksubr.c:1.4 --- src/sys/arch/hppa/hppa/disksubr.c:1.3 Wed Apr 3 22:10:50 2019 +++ src/sys/arch/hppa/hppa/disksubr.c Wed Apr 17 20:46:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disksubr.c,v 1.3 2019/04/03 22:10:50 christos Exp $ */ +/* $NetBSD: disksubr.c,v 1.4 2019/04/17 20:46:38 skrll Exp $ */ /* $OpenBSD: disksubr.c,v 1.6 2000/10/18 21:00:34 mickey Exp $ */ @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.3 2019/04/03 22:10:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.4 2019/04/17 20:46:38 skrll Exp $"); #include #include @@ -228,7 +228,7 @@ readliflabel(struct buf *bp, void (*stra struct buf *dbp; struct hppa_lifdir *p; - dbp = geteblk(HPPA_LIF_DIRSIZE); + dbp = geteblk(lp->d_secsize); dbp->b_dev = bp->b_dev; /* read LIF directory */
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Tue Apr 16 20:33:36 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: locore.S Log Message: If arg3 is zero then fill it with the value of 'end'. Helps booting with qemu. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/hppa/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/locore.S diff -u src/sys/arch/hppa/hppa/locore.S:1.2 src/sys/arch/hppa/hppa/locore.S:1.3 --- src/sys/arch/hppa/hppa/locore.S:1.2 Mon Apr 15 20:45:08 2019 +++ src/sys/arch/hppa/hppa/locore.S Tue Apr 16 20:33:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.2 2019/04/15 20:45:08 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.3 2019/04/16 20:33:36 skrll Exp $ */ /* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* @@ -174,6 +174,14 @@ ENTRY_NOPROFILE(start,0) stw %arg1,R%boothowto(%r1) ldil L%bootdev,%r1 stw %arg2,R%bootdev(%r1) + + comb,<> %r0, %arg3, 1f + nop + + ldil L%end, %arg3 + ldo R%end(%arg3), %arg3 + +1: ldil L%esym,%r1 stw %arg3,R%esym(%r1)
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Tue Apr 16 12:25:17 UTC 2019 Modified Files: src/sys/arch/hppa/include: aout_machdep.h asm.h cpu.h exec.h ieeefp.h int_limits.h limits.h lock.h param.h pcb.h pte.h reg.h signal.h vmparam.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/include/aout_machdep.h \ src/sys/arch/hppa/include/exec.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hppa/include/asm.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/include/cpu.h \ src/sys/arch/hppa/include/pte.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/include/ieeefp.h \ src/sys/arch/hppa/include/signal.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/include/int_limits.h cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/include/limits.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hppa/include/lock.h \ src/sys/arch/hppa/include/vmparam.h cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hppa/include/param.h cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/include/pcb.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/include/reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/aout_machdep.h diff -u src/sys/arch/hppa/include/aout_machdep.h:1.2 src/sys/arch/hppa/include/aout_machdep.h:1.3 --- src/sys/arch/hppa/include/aout_machdep.h:1.2 Tue Dec 10 17:14:10 2002 +++ src/sys/arch/hppa/include/aout_machdep.h Tue Apr 16 12:25:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: aout_machdep.h,v 1.2 2002/12/10 17:14:10 thorpej Exp $ */ +/* $NetBSD: aout_machdep.h,v 1.3 2019/04/16 12:25:17 skrll Exp $ */ /* * Copyright (c) 1993 Christopher G. Demetriou @@ -34,7 +34,7 @@ * XXX fredette - the definitions in this file (with * the possible exception of AOUT_LDPGSZ) are bogus, * and they exist only to let certain userland programs - * compile. I don't think any SunOS-style a.out HPPA + * compile. I don't think any SunOS-style a.out HPPA * binaries exist. */ @@ -44,7 +44,7 @@ struct relocation_info_hppa { int r_address;/* offset in text or data segment */ unsigned int r_symbolnum : 24, /* ordinal number of add symbol */ - r_pcrel : 1, /* 1 if value should be pc-relative */ + r_pcrel : 1, /* 1 if value should be pc-relative */ r_length : 2, /* log base 2 of value's width */ r_extern : 1, /* 1 if need to add symbol to value */ r_baserel : 1, /* linkage table relative */ Index: src/sys/arch/hppa/include/exec.h diff -u src/sys/arch/hppa/include/exec.h:1.2 src/sys/arch/hppa/include/exec.h:1.3 --- src/sys/arch/hppa/include/exec.h:1.2 Tue Dec 10 17:14:10 2002 +++ src/sys/arch/hppa/include/exec.h Tue Apr 16 12:25:17 2019 @@ -1,8 +1,8 @@ -/* $NetBSD: exec.h,v 1.2 2002/12/10 17:14:10 thorpej Exp $ */ +/* $NetBSD: exec.h,v 1.3 2019/04/16 12:25:17 skrll Exp $ */ /* $OpenBSD: exec.h,v 1.6 2001/01/22 14:51:03 art Exp $ */ -/* +/* * Copyright (c) 1994, The University of Utah and * the Computer Systems Laboratory at the University of Utah (CSL). * All rights reserved. @@ -37,7 +37,7 @@ #define ELF_TARG_CLASS ELFCLASS32 #define ELF_TARG_DATA ELFDATA2MSB -#define ELF_TARG_MACH EM_PARISC +#define ELF_TARG_MACH EM_PARISC /* #define _NLIST_DO_AOUT */ /* #define _NLIST_DO_ECOFF */ Index: src/sys/arch/hppa/include/asm.h diff -u src/sys/arch/hppa/include/asm.h:1.15 src/sys/arch/hppa/include/asm.h:1.16 --- src/sys/arch/hppa/include/asm.h:1.15 Thu Sep 12 15:36:17 2013 +++ src/sys/arch/hppa/include/asm.h Tue Apr 16 12:25:17 2019 @@ -1,8 +1,8 @@ -/* $NetBSD: asm.h,v 1.15 2013/09/12 15:36:17 joerg Exp $ */ +/* $NetBSD: asm.h,v 1.16 2019/04/16 12:25:17 skrll Exp $ */ /* $OpenBSD: asm.h,v 1.12 2001/03/29 02:15:57 mickey Exp $ */ -/* +/* * Copyright (c) 1990,1991,1994 The University of Utah and * the Computer Systems Laboratory (CSL). All rights reserved. * Index: src/sys/arch/hppa/include/cpu.h diff -u src/sys/arch/hppa/include/cpu.h:1.4 src/sys/arch/hppa/include/cpu.h:1.5 --- src/sys/arch/hppa/include/cpu.h:1.4 Wed Aug 22 01:05:22 2018 +++ src/sys/arch/hppa/include/cpu.h Tue Apr 16 12:25:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.4 2018/08/22 01:05:22 msaitoh Exp $ */ +/* $NetBSD: cpu.h,v 1.5 2019/04/16 12:25:17 skrll Exp $ */ /* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */ @@ -79,7 +79,7 @@ enum hppa_cpu_type { hpcxtp, /* PA7200 (t') PA 1.1d */ hpcxl2, /* PA7300LC (l2) PA 1.1e */ hpcxu, /* PA8000 (u) PA 2.0 */ - hpcxup, /* PA8200 (u+) PA 2.0 */ + hpcxup, /* PA8200 (u+) PA 2.0 */ hpcxw, /* PA8500 (w) PA 2.0 */ hpcxwp, /* PA8600 (w+) PA 2.0 */ hpcxw2, /* PA8700 (piranha) PA 2.0 */ @@ -287,7 +287,7 @@ struct cpu_info { struct hppa_interrupt_register ci_ir; struct hppa_interrupt_bit ci_ib[HPPA_INTERRUPT_BITS]; - + #if defined(MULTIPROCESSOR) struct lwp *ci_curlwp; /* CPU owner */ paddr_t
CVS commit: src/sys/arch/hppa/gsc
Module Name:src Committed By: skrll Date: Tue Apr 16 12:22:13 UTC 2019 Modified Files: src/sys/arch/hppa/gsc: if_ie_gsc.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/gsc/if_ie_gsc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/gsc/if_ie_gsc.c diff -u src/sys/arch/hppa/gsc/if_ie_gsc.c:1.2 src/sys/arch/hppa/gsc/if_ie_gsc.c:1.3 --- src/sys/arch/hppa/gsc/if_ie_gsc.c:1.2 Thu Feb 8 09:05:18 2018 +++ src/sys/arch/hppa/gsc/if_ie_gsc.c Tue Apr 16 12:22:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ie_gsc.c,v 1.2 2018/02/08 09:05:18 dholland Exp $ */ +/* $NetBSD: if_ie_gsc.c,v 1.3 2019/04/16 12:22:13 skrll Exp $ */ /* $OpenBSD: if_ie_gsc.c,v 1.6 2001/01/12 22:57:04 mickey Exp $ */ @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ie_gsc.c,v 1.2 2018/02/08 09:05:18 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ie_gsc.c,v 1.3 2019/04/16 12:22:13 skrll Exp $"); #include #include @@ -95,7 +95,7 @@ struct ie_gsc_regs { struct ie_gsc_softc { struct ie_softc ie; - + /* tag and handle to hppa-specific adapter registers. */ bus_space_tag_t iot; bus_space_handle_t ioh; @@ -139,7 +139,7 @@ ie_gsc_reset(struct ie_softc *sc, int wh { struct ie_gsc_softc *gsc = (struct ie_gsc_softc *) sc; int i; - + switch (what) { case CHIP_PROBE: bus_space_write_4(gsc->iot, gsc->ioh, IE_GSC_REG_RESET, 0); @@ -496,7 +496,7 @@ ie_gsc_attach(device_t parent, device_t * SCP can go after that. */ sc->scp = IE_GSC_ALIGN(8); - + /* ISCP follows SCP */ sc->iscp = IE_GSC_ALIGN(sc->scp + IE_SCP_SZ);
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Tue Apr 16 07:08:46 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: trap.S Log Message: Fix a comment To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/hppa/hppa/trap.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/trap.S diff -u src/sys/arch/hppa/hppa/trap.S:1.71 src/sys/arch/hppa/hppa/trap.S:1.72 --- src/sys/arch/hppa/hppa/trap.S:1.71 Tue Apr 16 06:13:53 2019 +++ src/sys/arch/hppa/hppa/trap.S Tue Apr 16 07:08:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.S,v 1.71 2019/04/16 06:13:53 skrll Exp $ */ +/* $NetBSD: trap.S,v 1.72 2019/04/16 07:08:46 skrll Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -908,7 +908,7 @@ hppa_fpu_emulate: /* * The hardware FPU is disabled, so we need to swap in the FPU state of - * the LWP whose uspace physical address in CR_UPADDR. We may also + * the LWP whose uspace physical address in CR_FPPADDR. We may also * need to swap out the FPU state of any LWP whose uspace physical * address is in curcpu()->ci_fpu_state. */
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: skrll Date: Tue Apr 16 06:45:04 UTC 2019 Modified Files: src/sys/arch/hppa/dev: dino.c Log Message: Re-arrange dino_softc members to improve alignment To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/dev/dino.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/dino.c diff -u src/sys/arch/hppa/dev/dino.c:1.3 src/sys/arch/hppa/dev/dino.c:1.4 --- src/sys/arch/hppa/dev/dino.c:1.3 Fri Oct 2 05:22:51 2015 +++ src/sys/arch/hppa/dev/dino.c Tue Apr 16 06:45:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dino.c,v 1.3 2015/10/02 05:22:51 msaitoh Exp $ */ +/* $NetBSD: dino.c,v 1.4 2019/04/16 06:45:04 skrll Exp $ */ /* $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.3 2015/10/02 05:22:51 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.4 2019/04/16 06:45:04 skrll Exp $"); /* #include "cardbus.h" */ @@ -121,15 +121,19 @@ struct dino_softc { bus_space_tag_t sc_bt; bus_space_handle_t sc_bh; bus_dma_tag_t sc_dmat; + + struct hppa_bus_dma_tag sc_dmatag; + struct hppa_bus_space_tag sc_memt; + volatile struct dino_regs *sc_regs; struct hppa_pci_chipset_tag sc_pc; struct hppa_bus_space_tag sc_iot; - char sc_ioexname[20]; + struct extent *sc_ioex; - struct hppa_bus_space_tag sc_memt; int sc_memrefcount[30]; - struct hppa_bus_dma_tag sc_dmatag; + + char sc_ioexname[20]; }; int dinomatch(device_t, struct cfdata *, void *); @@ -1735,6 +1739,5 @@ dinoattach(device_t parent, device_t sel static device_t dino_callback(device_t self, struct confargs *ca) { - - return config_found_sm_loc(self, "dino", NULL, ca, mbprint, mbsubmatch); + return config_found_sm_loc(self, "gedoens", NULL, ca, mbprint, mbsubmatch); }
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: skrll Date: Tue Apr 16 06:44:17 UTC 2019 Modified Files: src/sys/arch/hppa/conf: files.hppa Log Message: dino depends on gedoens To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hppa/conf/files.hppa Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/files.hppa diff -u src/sys/arch/hppa/conf/files.hppa:1.19 src/sys/arch/hppa/conf/files.hppa:1.20 --- src/sys/arch/hppa/conf/files.hppa:1.19 Sat Mar 23 13:05:24 2019 +++ src/sys/arch/hppa/conf/files.hppa Tue Apr 16 06:44:17 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.hppa,v 1.19 2019/03/23 13:05:24 maxv Exp $ +# $NetBSD: files.hppa,v 1.20 2019/04/16 06:44:17 skrll Exp $ # # $OpenBSD: files.hppa,v 1.31 2001/06/26 02:41:25 mickey Exp $ # @@ -154,7 +154,7 @@ file arch/hppa/dev/mongoose.c mongoose # Dino, GSC-PCI bridge. Includes ps/2, serial, and flying toaster interfaces # Cujo is a 64-bit data path Dino -device dino { }: pcibus +device dino { } : pcibus, gedoens attach dino at gedoens file arch/hppa/dev/dino.c dino
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Tue Apr 16 06:13:53 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: trap.S Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/arch/hppa/hppa/trap.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/trap.S diff -u src/sys/arch/hppa/hppa/trap.S:1.70 src/sys/arch/hppa/hppa/trap.S:1.71 --- src/sys/arch/hppa/hppa/trap.S:1.70 Sun Apr 14 08:23:20 2019 +++ src/sys/arch/hppa/hppa/trap.S Tue Apr 16 06:13:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.S,v 1.70 2019/04/14 08:23:20 skrll Exp $ */ +/* $NetBSD: trap.S,v 1.71 2019/04/16 06:13:53 skrll Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -899,7 +899,7 @@ LEAF_ENTRY_NOPROFILE(TLABEL(emu)) hppa_fpu_emulate: /* - * We have a hardware FPU. If it is enabled, branch to emulate the + * We have a hardware FPU. If it is enabled, branch to emulate the * instruction. */ mfctl CR_CCR, %arg0
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Mon Apr 15 20:46:10 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: autoconf.c Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/hppa/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/autoconf.c diff -u src/sys/arch/hppa/hppa/autoconf.c:1.3 src/sys/arch/hppa/hppa/autoconf.c:1.4 --- src/sys/arch/hppa/hppa/autoconf.c:1.3 Mon Apr 15 20:45:08 2019 +++ src/sys/arch/hppa/hppa/autoconf.c Mon Apr 15 20:46:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.3 2019/04/15 20:45:08 skrll Exp $ */ +/* $NetBSD: autoconf.c,v 1.4 2019/04/15 20:46:10 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.3 2019/04/15 20:45:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.4 2019/04/15 20:46:10 skrll Exp $"); #include "opt_kgdb.h" #include "opt_useleds.h" @@ -631,7 +631,6 @@ pdc_scanbus(device_t self, struct confar if (dev) hm->hm_registered = true; - } }
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Mon Apr 15 20:45:08 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: autoconf.c copy.S db_machdep.c fpemu.S fpu.c hpt.h idle_machdep.c intr.c ipifuncs.c kgdb_hppa.c lock_stubs.S locore.S machdep.h mainbus.c pim.h sig_machdep.c sigcode.S support.S trap.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/hppa/autoconf.c \ src/sys/arch/hppa/hppa/idle_machdep.c src/sys/arch/hppa/hppa/mainbus.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hppa/hppa/copy.S cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/hppa/db_machdep.c \ src/sys/arch/hppa/hppa/sigcode.S cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/fpemu.S \ src/sys/arch/hppa/hppa/support.S cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hppa/hppa/fpu.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/hppa/hpt.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/hppa/intr.c \ src/sys/arch/hppa/hppa/locore.S src/sys/arch/hppa/hppa/pim.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/hppa/ipifuncs.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/hppa/kgdb_hppa.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/hppa/hppa/lock_stubs.S \ src/sys/arch/hppa/hppa/sig_machdep.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hppa/hppa/machdep.h cvs rdiff -u -r1.110 -r1.111 src/sys/arch/hppa/hppa/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/autoconf.c diff -u src/sys/arch/hppa/hppa/autoconf.c:1.2 src/sys/arch/hppa/hppa/autoconf.c:1.3 --- src/sys/arch/hppa/hppa/autoconf.c:1.2 Wed Mar 26 17:57:17 2014 +++ src/sys/arch/hppa/hppa/autoconf.c Mon Apr 15 20:45:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.2 2014/03/26 17:57:17 christos Exp $ */ +/* $NetBSD: autoconf.c,v 1.3 2019/04/15 20:45:08 skrll Exp $ */ /* $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $ */ @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2 2014/03/26 17:57:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.3 2019/04/15 20:45:08 skrll Exp $"); #include "opt_kgdb.h" #include "opt_useleds.h" @@ -271,12 +271,12 @@ hppa_led_blinker(void *arg) /* Set the LEDs. */ hppa_led_ctl(-1, leds, 0); - + /* NB: this assumes _HPPA_LED_FREQ is a power of two. */ led_cycle = (led_cycle + 1) & (_HPPA_LED_FREQ - 1); callout_reset(_led_callout, hz / _HPPA_LED_FREQ, hppa_led_blinker, (void *) led_cycle); - + } #endif /* USELEDS */ @@ -405,7 +405,7 @@ device_register(device_t dev, void *aux) * a ppb. */ struct pci_attach_args *paa = (struct pci_attach_args*)aux; - + if (paa->pa_device == PAGE0->mem_boot.pz_dp.dp_bc[3] && paa->pa_function == PAGE0->mem_boot.pz_dp.dp_bc[4]) { /* @@ -436,7 +436,7 @@ device_register(device_t dev, void *aux) boot_device == device_parent(pdev)) { struct scsipibus_attach_args *saa = aux; struct scsipi_periph *p = saa->sa_periph; - + if (p->periph_target == PAGE0->mem_boot.pz_dp.dp_layers[0] && p->periph_lun == PAGE0->mem_boot.pz_dp.dp_layers[1]) { /* This is the boot device. */ @@ -489,7 +489,7 @@ hppa_walkbus(struct confargs *ca) if (ca->ca_hpabase == 0) return; - + aprint_debug(">> Walking bus at HPA 0x%lx\n", ca->ca_hpabase); for (i = 0; i < ca->ca_nmodules; i++) { @@ -631,7 +631,7 @@ pdc_scanbus(device_t self, struct confar if (dev) hm->hm_registered = true; - + } } @@ -668,7 +668,7 @@ hppa_pdcmodule_create(struct hppa_pdcmod { struct hppa_pdcmodule *nhm, *ahm; int i; - + nhm = kmem_zalloc(sizeof(*nhm), KM_SLEEP); nhm->hm_registered = false; @@ -696,7 +696,7 @@ hppa_pdcmodule_create(struct hppa_pdcmod hm_link) { int check; int j, k; - + for (j = 0; j < 6; j++) { if (ahm->hm_dp.dp_bc[j] != -1) break; @@ -749,7 +749,7 @@ hppa_memmap_query(struct device_path *de int error; error = pdcproc_memmap(_memmap, devp); - + if (error < 0) return NULL; Index: src/sys/arch/hppa/hppa/idle_machdep.c diff -u src/sys/arch/hppa/hppa/idle_machdep.c:1.2 src/sys/arch/hppa/hppa/idle_machdep.c:1.3 --- src/sys/arch/hppa/hppa/idle_machdep.c:1.2 Thu May 17 14:51:19 2007 +++ src/sys/arch/hppa/hppa/idle_machdep.c Mon Apr 15 20:45:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: idle_machdep.c,v 1.2 2007/05/17 14:51:19 yamt Exp $ */ +/* $NetBSD: idle_machdep.c,v 1.3 2019/04/15 20:45:08 skrll Exp $ */ /* * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi, @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: idle_machdep.c,v 1.2 2007/05/17 14:51:19 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: idle_machdep.c,v 1.3 2019/04/15 20:45:08 skrll Exp $"); #include #include @@ -36,5 +36,5 @@ __KERNEL_RCSID(0, "$NetBSD: idle_machdep void cpu_idle(void) { - /* do nothing */ + /* do nothing */ } Index: src/sys/arch/hppa/hppa/mainbus.c diff -u
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: skrll Date: Mon Apr 15 20:40:37 UTC 2019 Modified Files: src/sys/arch/hppa/dev: com_ssio.c lasi.c mongoose.c pdc.c power.c sti_sgc.c uturn.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/dev/com_ssio.c \ src/sys/arch/hppa/dev/power.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/dev/lasi.c \ src/sys/arch/hppa/dev/sti_sgc.c src/sys/arch/hppa/dev/uturn.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/dev/mongoose.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/dev/pdc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/com_ssio.c diff -u src/sys/arch/hppa/dev/com_ssio.c:1.2 src/sys/arch/hppa/dev/com_ssio.c:1.3 --- src/sys/arch/hppa/dev/com_ssio.c:1.2 Sat Dec 8 17:46:11 2018 +++ src/sys/arch/hppa/dev/com_ssio.c Mon Apr 15 20:40:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: com_ssio.c,v 1.2 2018/12/08 17:46:11 thorpej Exp $ */ +/* $NetBSD: com_ssio.c,v 1.3 2019/04/15 20:40:37 skrll Exp $ */ /* $OpenBSD: com_ssio.c,v 1.2 2007/06/24 16:28:39 kettenis Exp $ */ @@ -91,7 +91,7 @@ com_ssio_attach(device_t parent, device_ PAGE0->mem_cons.pz_hpa == (struct iomod *)ioh) { bus_space_unmap(iot, ioh, COM_NPORTS); if (comcnattach(iot, iobase, B9600, COM_SSIO_FREQ, - COM_TYPE_NORMAL, + COM_TYPE_NORMAL, (TTYDEF_CFLAG & ~(CSIZE | PARENB)) | CS8) != 0) { aprint_error(": can't comcnattach\n"); hppa_pagezero_unmap(pagezero_cookie); Index: src/sys/arch/hppa/dev/power.c diff -u src/sys/arch/hppa/dev/power.c:1.2 src/sys/arch/hppa/dev/power.c:1.3 --- src/sys/arch/hppa/dev/power.c:1.2 Thu Jun 1 02:45:06 2017 +++ src/sys/arch/hppa/dev/power.c Mon Apr 15 20:40:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: power.c,v 1.2 2017/06/01 02:45:06 chs Exp $ */ +/* $NetBSD: power.c,v 1.3 2019/04/15 20:40:37 skrll Exp $ */ /* * Copyright (c) 2004 Jochen Kunz. @@ -277,7 +277,7 @@ pwr_sw_init(struct power_softc *sc) if (error) goto err_sysctl; - + error = sysctl_createv(_log, 0, NULL, _sw_node, 0, CTLTYPE_NODE, "power_switch", NULL, NULL, 0, NULL, 0, CTL_MACHDEP, CTL_CREATE, CTL_EOL); Index: src/sys/arch/hppa/dev/lasi.c diff -u src/sys/arch/hppa/dev/lasi.c:1.1 src/sys/arch/hppa/dev/lasi.c:1.2 --- src/sys/arch/hppa/dev/lasi.c:1.1 Mon Feb 24 07:23:42 2014 +++ src/sys/arch/hppa/dev/lasi.c Mon Apr 15 20:40:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: lasi.c,v 1.1 2014/02/24 07:23:42 skrll Exp $ */ +/* $NetBSD: lasi.c,v 1.2 2019/04/15 20:40:37 skrll Exp $ */ /* $OpenBSD: lasi.c,v 1.4 2001/06/09 03:57:19 mickey Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lasi.c,v 1.1 2014/02/24 07:23:42 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lasi.c,v 1.2 2019/04/15 20:40:37 skrll Exp $"); #undef LASIDEBUG @@ -70,7 +70,7 @@ struct lasi_trs { struct lasi_softc { device_t sc_dev; - + struct hppa_interrupt_register sc_ir; struct lasi_hwr volatile *sc_hw; Index: src/sys/arch/hppa/dev/sti_sgc.c diff -u src/sys/arch/hppa/dev/sti_sgc.c:1.1 src/sys/arch/hppa/dev/sti_sgc.c:1.2 --- src/sys/arch/hppa/dev/sti_sgc.c:1.1 Mon Feb 24 07:23:43 2014 +++ src/sys/arch/hppa/dev/sti_sgc.c Mon Apr 15 20:40:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sti_sgc.c,v 1.1 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: sti_sgc.c,v 1.2 2019/04/15 20:40:37 skrll Exp $ */ /* $OpenBSD: sti_sgc.c,v 1.38 2009/02/06 22:51:04 miod Exp $ */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.1 2014/02/24 07:23:43 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.2 2019/04/15 20:40:37 skrll Exp $"); #include "opt_cputype.h" @@ -126,7 +126,7 @@ sti_sgc_getrom(struct confargs *ca) if (i < 0) rom = 0; } - + if (rom < HPPA_IOBEGIN) { if (ca->ca_naddrs > 0) rom = ca->ca_addrs[0].addr; @@ -235,7 +235,7 @@ sti_sgc_attach(device_t parent, device_t pagezero_cookie = hppa_pagezero_map(); consaddr = (hppa_hpa_t)PAGE0->mem_cons.pz_hpa; hppa_pagezero_unmap(pagezero_cookie); - + sc->sc_dev = self; sc->sc_enable_rom = NULL; sc->sc_disable_rom = NULL; @@ -280,6 +280,6 @@ void sti_sgc_end_attach(device_t dev) { struct sti_softc *sc = device_private(dev); - + sti_end_attach(sc); } Index: src/sys/arch/hppa/dev/uturn.c diff -u src/sys/arch/hppa/dev/uturn.c:1.1 src/sys/arch/hppa/dev/uturn.c:1.2 --- src/sys/arch/hppa/dev/uturn.c:1.1 Mon Feb 24 07:23:43 2014 +++ src/sys/arch/hppa/dev/uturn.c Mon Apr 15 20:40:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uturn.c,v 1.1 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: uturn.c,v 1.2 2019/04/15 20:40:37 skrll Exp $ */ /* $OpenBSD: uturn.c,v 1.6 2007/12/29 01:26:14 kettenis Exp $ */ @@ -391,7 +391,7 @@ uturn_callback(device_t self, struct con * | PPN | Virtual Index | Physical Page Number (PPN) | * | [0:3] |[0:11] | [4:19]
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: skrll Date: Mon Apr 15 20:38:18 UTC 2019 Modified Files: src/sys/arch/hppa/conf: GENERIC Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hppa/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/GENERIC diff -u src/sys/arch/hppa/conf/GENERIC:1.25 src/sys/arch/hppa/conf/GENERIC:1.26 --- src/sys/arch/hppa/conf/GENERIC:1.25 Sat Mar 23 13:05:24 2019 +++ src/sys/arch/hppa/conf/GENERIC Mon Apr 15 20:38:18 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.25 2019/03/23 13:05:24 maxv Exp $ +# $NetBSD: GENERIC,v 1.26 2019/04/15 20:38:18 skrll Exp $ # # GENERIC machine description file # @@ -23,7 +23,7 @@ include "arch/hppa/conf/std.hppa" options INCLUDE_CONFIG_FILE # embed config file in kernel binary options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -#ident "GENERIC-$Revision: 1.25 $" +#ident "GENERIC-$Revision: 1.26 $" maxusers 32 # estimated number of users @@ -248,7 +248,7 @@ dino* at uturn? # PCI bus bridge #dino* at gecko? # PCI bus bridge #wax* at gecko? # Wax GSC to GSC Bus Adapter -# Astro memory & I/O controller +# Astro memory & I/O controller astro* at mainbus0 # Astro memory & I/O controller elroy* at astro?
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: skrll Date: Mon Apr 15 07:48:20 UTC 2019 Modified Files: src/sys/arch/hppa/dev: com_dino.c Log Message: Some KNF To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/dev/com_dino.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/com_dino.c diff -u src/sys/arch/hppa/dev/com_dino.c:1.2 src/sys/arch/hppa/dev/com_dino.c:1.3 --- src/sys/arch/hppa/dev/com_dino.c:1.2 Sat Dec 8 17:46:11 2018 +++ src/sys/arch/hppa/dev/com_dino.c Mon Apr 15 07:48:20 2019 @@ -77,9 +77,9 @@ com_dino_match(device_t parent, cfdata_t if (ca->ca_type.iodc_type != HPPA_TYPE_FIO || ca->ca_type.iodc_sv_model != HPPA_FIO_GRS232) - return (0); + return 0; - return (1); + return 1; /* HOZER comprobe1(ca->ca_iot, ca->ca_hpa + IOMOD_DEVOFFSET); */ }
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Mon Apr 15 06:16:42 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: vm_machdep.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/hppa/hppa/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/vm_machdep.c diff -u src/sys/arch/hppa/hppa/vm_machdep.c:1.54 src/sys/arch/hppa/hppa/vm_machdep.c:1.55 --- src/sys/arch/hppa/hppa/vm_machdep.c:1.54 Thu Mar 6 19:02:58 2014 +++ src/sys/arch/hppa/hppa/vm_machdep.c Mon Apr 15 06:16:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.54 2014/03/06 19:02:58 skrll Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.55 2019/04/15 06:16:42 skrll Exp $ */ /* $OpenBSD: vm_machdep.c,v 1.64 2008/09/30 18:54:26 miod Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.54 2014/03/06 19:02:58 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.55 2019/04/15 06:16:42 skrll Exp $"); #include #include @@ -184,7 +184,7 @@ void cpu_lwp_free(struct lwp *l, int proc) { struct pcb *pcb = lwp_getpcb(l); - + /* * If this thread was using the FPU, disable the FPU and record * that it's unused.
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Sun Apr 14 08:23:20 UTC 2019 Modified Files: src/sys/arch/hppa/hppa: trap.S Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/arch/hppa/hppa/trap.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/trap.S diff -u src/sys/arch/hppa/hppa/trap.S:1.69 src/sys/arch/hppa/hppa/trap.S:1.70 --- src/sys/arch/hppa/hppa/trap.S:1.69 Sat Mar 23 13:05:24 2019 +++ src/sys/arch/hppa/hppa/trap.S Sun Apr 14 08:23:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.S,v 1.69 2019/03/23 13:05:24 maxv Exp $ */ +/* $NetBSD: trap.S,v 1.70 2019/04/14 08:23:20 skrll Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -98,7 +98,7 @@ #include "opt_multiprocessor.h" #include "opt_cputype.h" -/* +/* * NOTICE: This is not a standalone file. To use it, #include it in * your port's locore.S, like so: * @@ -220,7 +220,7 @@ syscall_entry: ldw CI_PSW(%sr1, %t1), %t1 stw %r1, TF_CR15-TRAPFRAME_SIZEOF(%sr1, %t3) /* eiem ,bc (block copy cache control hint) */ stw %t1, TF_CR22-TRAPFRAME_SIZEOF(%sr1, %t3) /* ipsw */ - + mfsp %sr3, %t1 stw %t1, TF_SR3-TRAPFRAME_SIZEOF(%sr1, %t3) stw %ret0, TF_CR8-TRAPFRAME_SIZEOF(%sr1, %t3) /* pidr1 */ @@ -741,7 +741,7 @@ EXIT(os_toc) ENTRY_NOPROFILE(TLABEL(hpmc),0) ALTENTRY(os_hpmc_cont) ldi T_HPMC, %arg0 - + /* Disable interrupts. */ mtctl %r0, %eiem @@ -865,7 +865,7 @@ LEAF_ENTRY_NOPROFILE(TLABEL(emu)) */ mtctl %arg0, %tr2 mfctl %iir, %arg0 - + /* * If the opcode field in the instruction is 4, indicating a special * function unit SPOP instruction, branch to emulate an sfu. If the @@ -912,7 +912,7 @@ hppa_fpu_emulate: * need to swap out the FPU state of any LWP whose uspace physical * address is in curcpu()->ci_fpu_state. */ - + /* * So far, the CTRAP() macro has saved %r1 in %tr7, and the dispatching * above has saved %arg0 in tr2. Save the other registers that we want @@ -929,7 +929,7 @@ hppa_fpu_emulate: blr 0, %rp b hppa_fpu_swap nop - + /* Restore registers and rfi. */ mfctl %tr5, %rp mfctl %tr4, %arg1 @@ -1015,7 +1015,7 @@ ALTENTRY(hppa_fpu_swap) /* * Assuming that out and in aren't both NULL, we will have to run co- * processor instructions, so we'd better enable it. - * + * * Also, branch if there's no FPU state to swap out. */ mfctl CR_CCR, %r1 @@ -1775,7 +1775,7 @@ EXIT(hpti_l) LEAF_ENTRY_NOPROFILE(pbtlb_l) ; DR_PAGE0 rsm (PSW_R|PSW_I), %t4 - nop ! nop ! nop ! nop + nop ! nop ! nop ! nop ldil L%0xc041, %t1 ldo R%0xc041(%t1), %t1 dep %arg0, 30, 3, %t1
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: maxv Date: Sat Mar 23 13:05:24 UTC 2019 Modified Files: src/sys/arch/hppa/conf: GENERIC files.hppa src/sys/arch/hppa/hppa: trap.S Log Message: Remove references to COMPAT_OSF1 in HPPA, it has never been supported on this architecture. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hppa/conf/GENERIC cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hppa/conf/files.hppa cvs rdiff -u -r1.68 -r1.69 src/sys/arch/hppa/hppa/trap.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/GENERIC diff -u src/sys/arch/hppa/conf/GENERIC:1.24 src/sys/arch/hppa/conf/GENERIC:1.25 --- src/sys/arch/hppa/conf/GENERIC:1.24 Wed Feb 6 11:58:31 2019 +++ src/sys/arch/hppa/conf/GENERIC Sat Mar 23 13:05:24 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.24 2019/02/06 11:58:31 rin Exp $ +# $NetBSD: GENERIC,v 1.25 2019/03/23 13:05:24 maxv Exp $ # # GENERIC machine description file # @@ -23,7 +23,7 @@ include "arch/hppa/conf/std.hppa" options INCLUDE_CONFIG_FILE # embed config file in kernel binary options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -#ident "GENERIC-$Revision: 1.24 $" +#ident "GENERIC-$Revision: 1.25 $" maxusers 32 # estimated number of users @@ -76,7 +76,6 @@ options DDB_HISTORY_SIZE=512 # enable h # Compatibility options include "conf/compat_netbsd20.config" -#options COMPAT_OSF1 # OSF1 binary compatibility #options COMPAT_LINUX # binary compatibility with Linux # File systems Index: src/sys/arch/hppa/conf/files.hppa diff -u src/sys/arch/hppa/conf/files.hppa:1.18 src/sys/arch/hppa/conf/files.hppa:1.19 --- src/sys/arch/hppa/conf/files.hppa:1.18 Mon Feb 24 07:23:42 2014 +++ src/sys/arch/hppa/conf/files.hppa Sat Mar 23 13:05:24 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.hppa,v 1.18 2014/02/24 07:23:42 skrll Exp $ +# $NetBSD: files.hppa,v 1.19 2019/03/23 13:05:24 maxv Exp $ # # $OpenBSD: files.hppa,v 1.31 2001/06/26 02:41:25 mickey Exp $ # @@ -22,9 +22,6 @@ defflag USELEDS # include "compat/ossaudio/files.ossaudio" -include "compat/osf1/files.osf1" -file arch/hppa/hppa/osf1_machdep.c compat_osf1 - include "compat/linux/files.linux" file arch/hppa/hppa/linux_machdep.c compat_linux Index: src/sys/arch/hppa/hppa/trap.S diff -u src/sys/arch/hppa/hppa/trap.S:1.68 src/sys/arch/hppa/hppa/trap.S:1.69 --- src/sys/arch/hppa/hppa/trap.S:1.68 Fri Apr 6 13:13:13 2012 +++ src/sys/arch/hppa/hppa/trap.S Sat Mar 23 13:05:24 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.S,v 1.68 2012/04/06 13:13:13 skrll Exp $ */ +/* $NetBSD: trap.S,v 1.69 2019/03/23 13:05:24 maxv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -95,7 +95,6 @@ * Utah $Hdr: locore.s 1.63 95/01/20$ */ -#include "opt_compat_osf1.h" #include "opt_multiprocessor.h" #include "opt_cputype.h" @@ -131,38 +130,13 @@ emergency_stack_end: gateway_page: nop/* @ 0.C000 (Nothing) */ gate,n bsd_syscall,%r0 /* @ 0.C004 (HPUX/BSD) */ -#ifdef COMPAT_OSF1 - bl,n osf_syscall,%r0 - bl,n osf_syscall,%r0 -#else nop/* @ 0.C008 (HPOSF UNIX) */ nop/* @ 0.C00C (HPOSF Mach) */ -#endif nop nop nop nop -#ifdef COMPAT_OSF1 -osf_syscall: - /* - * Ripped screaming from OSF/MkLinux: - * - * Convert HPOSF system call to a BSD one by stashing arg4 and arg5 - * back into the frame, and moving the system call number into r22. - * Fortunately, the HPOSF compiler has a bigger stack frame, which - * allows this horrible hack. - * - * We also need to save r29 (aka ret1) for the emulator since it may - * get clobbered between here and there. - */ - stw %r22, HPPA_FRAME_ARG(4)(%sp) - stw %r21, HPPA_FRAME_ARG(5)(%sp) - stw %r29, HPPA_FRAME_SL(%sp) - gate bsd_syscall,%r0 - copy %r1, %r22 -#endif /* COMPAT_OSF1 */ - bsd_syscall: /* * Set up a space register and a protection id so that we can access
CVS commit: src/sys/arch/hppa/spmath
Module Name:src Committed By: mrg Date: Wed Feb 6 05:04:41 UTC 2019 Modified Files: src/sys/arch/hppa/spmath: cnv_float.h Log Message: - convert shift results into logical expressions To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/spmath/cnv_float.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/spmath/cnv_float.h diff -u src/sys/arch/hppa/spmath/cnv_float.h:1.3 src/sys/arch/hppa/spmath/cnv_float.h:1.4 --- src/sys/arch/hppa/spmath/cnv_float.h:1.3 Sun Apr 6 08:03:36 2008 +++ src/sys/arch/hppa/spmath/cnv_float.h Wed Feb 6 05:04:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cnv_float.h,v 1.3 2008/04/06 08:03:36 skrll Exp $ */ +/* $NetBSD: cnv_float.h,v 1.4 2019/02/06 05:04:41 mrg Exp $ */ /* $OpenBSD: cnv_float.h,v 1.5 2001/03/29 03:58:17 mickey Exp $ */ @@ -75,19 +75,19 @@ ((exponent < (SGL_P - 1)) ?\ (Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) : false) -#define Int_isinexact_to_sgl(int_value) (int_value << (33 - SGL_EXP_LENGTH)) +#define Int_isinexact_to_sgl(int_value) ((int_value << (33 - SGL_EXP_LENGTH)) != 0) #define Sgl_roundnearest_from_int(int_value,sgl_value) \ if (int_value & 1<<(SGL_EXP_LENGTH - 2)) /* round bit */ \ - if ((int_value << (34 - SGL_EXP_LENGTH)) || Slow(sgl_value)) \ + if (((int_value << (34 - SGL_EXP_LENGTH)) != 0) || Slow(sgl_value)) \ Sall(sgl_value)++ #define Dint_isinexact_to_sgl(dint_valueA,dint_valueB) \ -((Dintp1(dint_valueA) << (33 - SGL_EXP_LENGTH)) || Dintp2(dint_valueB)) +(((Dintp1(dint_valueA) << (33 - SGL_EXP_LENGTH)) != 0) || Dintp2(dint_valueB)) #define Sgl_roundnearest_from_dint(dint_valueA,dint_valueB,sgl_value) \ if (Dintp1(dint_valueA) & 1<<(SGL_EXP_LENGTH - 2)) \ - if ((Dintp1(dint_valueA) << (34 - SGL_EXP_LENGTH)) || \ + if (((Dintp1(dint_valueA) << (34 - SGL_EXP_LENGTH)) != 0) || \ Dintp2(dint_valueB) || Slow(sgl_value)) Sall(sgl_value)++ #define Dint_isinexact_to_dbl(dint_value) \
CVS commit: src/sys/arch/hppa/stand/common
Module Name:src Committed By: christos Date: Tue Jan 8 19:14:08 UTC 2019 Modified Files: src/sys/arch/hppa/stand/common: pdc.c Log Message: no need for To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/stand/common/pdc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/common/pdc.c diff -u src/sys/arch/hppa/stand/common/pdc.c:1.3 src/sys/arch/hppa/stand/common/pdc.c:1.4 --- src/sys/arch/hppa/stand/common/pdc.c:1.3 Tue Jan 8 12:14:52 2019 +++ src/sys/arch/hppa/stand/common/pdc.c Tue Jan 8 14:14:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pdc.c,v 1.3 2019/01/08 17:14:52 christos Exp $ */ +/* $NetBSD: pdc.c,v 1.4 2019/01/08 19:14:08 christos Exp $ */ /* $OpenBSD: pdc.c,v 1.10 1999/05/06 02:27:44 mickey Exp $ */ @@ -71,7 +71,6 @@ #include #include #include -#include #include #include "dev_hppa.h"
CVS commit: src/sys/arch/hppa/stand/common
Module Name:src Committed By: christos Date: Tue Jan 8 17:14:52 UTC 2019 Modified Files: src/sys/arch/hppa/stand/common: pdc.c Log Message: Include for DEV_BSIZE/DEV_BSHIFT To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/stand/common/pdc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/common/pdc.c diff -u src/sys/arch/hppa/stand/common/pdc.c:1.2 src/sys/arch/hppa/stand/common/pdc.c:1.3 --- src/sys/arch/hppa/stand/common/pdc.c:1.2 Wed Sep 5 03:32:45 2018 +++ src/sys/arch/hppa/stand/common/pdc.c Tue Jan 8 12:14:52 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pdc.c,v 1.2 2018/09/05 07:32:45 riastradh Exp $ */ +/* $NetBSD: pdc.c,v 1.3 2019/01/08 17:14:52 christos Exp $ */ /* $OpenBSD: pdc.c,v 1.10 1999/05/06 02:27:44 mickey Exp $ */ @@ -61,6 +61,7 @@ * Utah $Hdr: pdc.c 1.8 92/03/14$ */ +#include #include #include "libsa.h" #include
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Wed Nov 14 10:58:04 UTC 2018 Modified Files: src/sys/arch/hppa/hppa: fpu.c machdep.c Log Message: Some fixes for QEMU/hppa. Don't call desidhash_l on pcxl2 as it doesn't support it. QEMU emulates this cpu and would trap on illegal instruction for the diag in desidhash_l Allow a FPU to be missing... more fixes are likely here. QEMU doesn't set C bit properly yet To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hppa/hppa/fpu.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/hppa/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/fpu.c diff -u src/sys/arch/hppa/hppa/fpu.c:1.24 src/sys/arch/hppa/hppa/fpu.c:1.25 --- src/sys/arch/hppa/hppa/fpu.c:1.24 Fri Apr 6 12:21:59 2012 +++ src/sys/arch/hppa/hppa/fpu.c Wed Nov 14 10:58:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu.c,v 1.24 2012/04/06 12:21:59 skrll Exp $ */ +/* $NetBSD: fpu.c,v 1.25 2018/11/14 10:58:04 skrll Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.24 2012/04/06 12:21:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.25 2018/11/14 10:58:04 skrll Exp $"); #include #include @@ -144,6 +144,12 @@ hppa_fpu_bootstrap(u_int ccr_enable) /* See if we have a present and functioning hardware FPU. */ fpu_present = (ccr_enable & HPPA_FPUS) == HPPA_FPUS; + if (!fpu_present) { + fpu_csw = 0; + curcpu()->ci_fpu_state = 0; + + return; + } KASSERT(fpu_present); /* Initialize the FPU and get its version. */ Index: src/sys/arch/hppa/hppa/machdep.c diff -u src/sys/arch/hppa/hppa/machdep.c:1.8 src/sys/arch/hppa/hppa/machdep.c:1.9 --- src/sys/arch/hppa/hppa/machdep.c:1.8 Mon Sep 3 16:29:24 2018 +++ src/sys/arch/hppa/hppa/machdep.c Wed Nov 14 10:58:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.8 2018/09/03 16:29:24 riastradh Exp $ */ +/* $NetBSD: machdep.c,v 1.9 2018/11/14 10:58:04 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2018/09/03 16:29:24 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2018/11/14 10:58:04 skrll Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -374,7 +374,7 @@ const struct hppa_cpu_info cpu_types[] = { "PA7300LC", "Velociraptor", "PCXL2", hpcxl2, HPPA_CPU_PCXL2, HPPA_FTRS_TLBU | HPPA_FTRS_BTLBU | HPPA_FTRS_HVT, "1.1e", - desidhash_l, itlb_l, dtlb_l, itlbna_l, dtlbna_l, tlbd_l, + NULL, itlb_l, dtlb_l, itlbna_l, dtlbna_l, tlbd_l, ibtlb_g, NULL, pbtlb_g, hpti_g }, #endif #ifdef HP8000_CPU @@ -809,9 +809,6 @@ cpuid(void) if (hppa_cpu_info->hci_chip_name == NULL) panic("bad model string for 0x%x", pdc_model.hwmodel); - else if (hppa_cpu_info->desidhash == NULL) - panic("no kernel support for %s", - hppa_cpu_info->hci_chip_name); /* * TODO: HPT on 7200 is not currently supported @@ -825,7 +822,10 @@ cpuid(void) cpu_hpt_init = hppa_cpu_info->hptinit; cpu_desidhash = hppa_cpu_info->desidhash; - cpu_revision = (*cpu_desidhash)(); + if (cpu_desidhash) + cpu_revision = (*cpu_desidhash)(); + else + cpu_revision = 0; /* force strong ordering for now */ if (hppa_cpu_ispa20_p())
CVS commit: src/sys/arch/hppa/stand
Module Name:src Committed By: skrll Date: Tue Nov 13 21:22:38 UTC 2018 Modified Files: src/sys/arch/hppa/stand: Makefile.buildboot src/sys/arch/hppa/stand/xxboot: Makefile Log Message: Apply -fno-delete-null-pointer-checks so PAGE0 is handled correctly netinstall.lif works again To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/stand/Makefile.buildboot cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/stand/xxboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/Makefile.buildboot diff -u src/sys/arch/hppa/stand/Makefile.buildboot:1.5 src/sys/arch/hppa/stand/Makefile.buildboot:1.6 --- src/sys/arch/hppa/stand/Makefile.buildboot:1.5 Tue Nov 13 21:20:11 2018 +++ src/sys/arch/hppa/stand/Makefile.buildboot Tue Nov 13 21:22:37 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.buildboot,v 1.5 2018/11/13 21:20:11 skrll Exp $ +# $NetBSD: Makefile.buildboot,v 1.6 2018/11/13 21:22:37 skrll Exp $ NOPIE=yes NOSSP=yes @@ -32,7 +32,7 @@ BINMODE= 444 CPPFLAGS+= -nostdinc -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. \ -I${.OBJDIR} -CFLAGS+= -Os -msoft-float -Wno-main +CFLAGS+= -Os -fno-delete-null-pointer-checks -msoft-float -Wno-main CFLAGS+= -fno-builtin CFLAGS+= -mdisable-fpregs -mfast-indirect-calls -mpa-risc-1-0 Index: src/sys/arch/hppa/stand/xxboot/Makefile diff -u src/sys/arch/hppa/stand/xxboot/Makefile:1.2 src/sys/arch/hppa/stand/xxboot/Makefile:1.3 --- src/sys/arch/hppa/stand/xxboot/Makefile:1.2 Sun Feb 21 14:50:05 2016 +++ src/sys/arch/hppa/stand/xxboot/Makefile Tue Nov 13 21:22:38 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2016/02/21 14:50:05 christos Exp $ +# $NetBSD: Makefile,v 1.3 2018/11/13 21:22:38 skrll Exp $ NODEBUG=yes PROG= xxboot @@ -15,7 +15,7 @@ CPPFLAGS+= -D__daddr_t=int32_t # ANSI C feature prevents from being relocatable #CPPFLAGS+= -traditional # would be best CPPFLAGS+= -Dconst= -COPTS+= -Os -funsigned-char -mdisable-fpregs -mpa-risc-1-0 +COPTS+= -Os -fno-delete-null-pointer-checks -funsigned-char -mdisable-fpregs -mpa-risc-1-0 .include
CVS commit: src/sys/arch/hppa/stand
Module Name:src Committed By: skrll Date: Tue Nov 13 21:20:11 UTC 2018 Modified Files: src/sys/arch/hppa/stand: Makefile.buildboot Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/stand/Makefile.buildboot Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/Makefile.buildboot diff -u src/sys/arch/hppa/stand/Makefile.buildboot:1.4 src/sys/arch/hppa/stand/Makefile.buildboot:1.5 --- src/sys/arch/hppa/stand/Makefile.buildboot:1.4 Tue Aug 29 09:17:43 2017 +++ src/sys/arch/hppa/stand/Makefile.buildboot Tue Nov 13 21:20:11 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.buildboot,v 1.4 2017/08/29 09:17:43 christos Exp $ +# $NetBSD: Makefile.buildboot,v 1.5 2018/11/13 21:20:11 skrll Exp $ NOPIE=yes NOSSP=yes @@ -24,7 +24,7 @@ S= ${.CURDIR}/../../../.. .PATH: ${.CURDIR}/../common SRCS= ${PROGSOURCE} ${COMMONSOURCE} ${DRIVERSOURCE} -NOMAN= +NOMAN= STRIPFLAG= BINMODE= 444 @@ -44,7 +44,7 @@ CPPFLAGS+= -DNO_NET COMMONSOURCE= cons.c dev_hppa.c dk.c itecons.c \ machdep.c milli_tiny.S pdc.c time.c -DRIVERSOURCE= +DRIVERSOURCE= ### find out what to use for libkern KERN_AS= library
CVS commit: src/sys/arch/hppa/stand/common
Module Name:src Committed By: riastradh Date: Wed Sep 5 07:32:45 UTC 2018 Modified Files: src/sys/arch/hppa/stand/common: pdc.c Log Message: One more min->uimin straggler confirmed by 201809042300Z autobuild. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/common/pdc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/common/pdc.c diff -u src/sys/arch/hppa/stand/common/pdc.c:1.1 src/sys/arch/hppa/stand/common/pdc.c:1.2 --- src/sys/arch/hppa/stand/common/pdc.c:1.1 Mon Feb 24 07:23:43 2014 +++ src/sys/arch/hppa/stand/common/pdc.c Wed Sep 5 07:32:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pdc.c,v 1.1 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: pdc.c,v 1.2 2018/09/05 07:32:45 riastradh Exp $ */ /* $OpenBSD: pdc.c,v 1.10 1999/05/06 02:27:44 mickey Exp $ */ @@ -101,7 +101,7 @@ pdc_init(void) err = (*pdc)(PDC_STABLE, PDC_STABLE_SIZE, pdcbuf, 0, 0); if (err >= 0) { - sstorsiz = min(pdcbuf[0],sizeof(sstor)); + sstorsiz = uimin(pdcbuf[0],sizeof(sstor)); err = (*pdc)(PDC_STABLE, PDC_STABLE_READ, 0, , sstorsiz); } @@ -203,7 +203,7 @@ iodcstrategy(void *devdata, int rw, dadd if (dp->last_blk <= blk && (dp->last_blk + dp->last_read) > blk) { twiddle(); offset = blk - dp->last_blk; - xfer = min(dp->last_read - offset, size); + xfer = uimin(dp->last_read - offset, size); size -= xfer; blk += xfer; #ifdef PDCDEBUG
CVS commit: src/sys/arch/hppa/spmath
Module Name:src Committed By: christos Date: Wed Jun 13 16:05:14 UTC 2018 Modified Files: src/sys/arch/hppa/spmath: Makefile.inc Log Message: revert previous MAKEOBJDIRPREFIX massaging To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/spmath/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/spmath/Makefile.inc diff -u src/sys/arch/hppa/spmath/Makefile.inc:1.11 src/sys/arch/hppa/spmath/Makefile.inc:1.12 --- src/sys/arch/hppa/spmath/Makefile.inc:1.11 Mon Jun 11 17:37:29 2018 +++ src/sys/arch/hppa/spmath/Makefile.inc Wed Jun 13 12:05:14 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.11 2018/06/11 21:37:29 christos Exp $ +# $NetBSD: Makefile.inc,v 1.12 2018/06/13 16:05:14 christos Exp $ # $OpenBSD: Makefile.inc,v 1.4 2001/03/29 03:58:17 mickey Exp $ # @@ -15,7 +15,7 @@ SPMATH_PROF= ${SPMATHDST}/spmath.po SPMATHMAKE= \ cd ${SPMATHDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \ MAKEOBJDIR=${SPMATHDST} ${MAKE} \ - CC=${CC:q} CFLAGS=${CFLAGS:S/MAKEOBJDIRPREFIX/MAKEOBJDIR/:q} \ + CC=${CC:q} CFLAGS=${CFLAGS:q} \ SPMATHCPPFLAGS=${CPPFLAGS:S@^-I.@-I. -I../../.@g:q} \ AS=${AS:q} AFLAGS=${AFLAGS:q} \ LD=${LD:q} STRIP=${STRIP:q} \
CVS commit: src/sys/arch/hppa/spmath
Module Name:src Committed By: christos Date: Mon Jun 11 21:37:29 UTC 2018 Modified Files: src/sys/arch/hppa/spmath: Makefile.inc Log Message: switch from MAKEOBJDIRPREFIX to MAKEOBJDIR. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hppa/spmath/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/spmath/Makefile.inc diff -u src/sys/arch/hppa/spmath/Makefile.inc:1.10 src/sys/arch/hppa/spmath/Makefile.inc:1.11 --- src/sys/arch/hppa/spmath/Makefile.inc:1.10 Sat May 26 21:14:50 2018 +++ src/sys/arch/hppa/spmath/Makefile.inc Mon Jun 11 17:37:29 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.10 2018/05/27 01:14:50 christos Exp $ +# $NetBSD: Makefile.inc,v 1.11 2018/06/11 21:37:29 christos Exp $ # $OpenBSD: Makefile.inc,v 1.4 2001/03/29 03:58:17 mickey Exp $ # @@ -15,7 +15,7 @@ SPMATH_PROF= ${SPMATHDST}/spmath.po SPMATHMAKE= \ cd ${SPMATHDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \ MAKEOBJDIR=${SPMATHDST} ${MAKE} \ - CC=${CC:q} CFLAGS=${CFLAGS:q} \ + CC=${CC:q} CFLAGS=${CFLAGS:S/MAKEOBJDIRPREFIX/MAKEOBJDIR/:q} \ SPMATHCPPFLAGS=${CPPFLAGS:S@^-I.@-I. -I../../.@g:q} \ AS=${AS:q} AFLAGS=${AFLAGS:q} \ LD=${LD:q} STRIP=${STRIP:q} \
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: kamil Date: Tue Feb 27 11:26:39 UTC 2018 Modified Files: src/sys/arch/hppa/include: mcontext.h Log Message: Implement _UC_MACHINE_INTRV() for hppa INTRV = integer return value For hppa this is R28 alias _REG_RET0. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/include/mcontext.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/mcontext.h diff -u src/sys/arch/hppa/include/mcontext.h:1.9 src/sys/arch/hppa/include/mcontext.h:1.10 --- src/sys/arch/hppa/include/mcontext.h:1.9 Thu Feb 15 15:53:56 2018 +++ src/sys/arch/hppa/include/mcontext.h Tue Feb 27 11:26:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.9 2018/02/15 15:53:56 kamil Exp $ */ +/* $NetBSD: mcontext.h,v 1.10 2018/02/27 11:26:39 kamil Exp $ */ #ifndef _HPPA_MCONTEXT_H_ #define _HPPA_MCONTEXT_H_ @@ -57,6 +57,7 @@ do { \ (uc)->uc_mcontext.__gregs[_REG_PCOQH] = (pc); \ (uc)->uc_mcontext.__gregs[_REG_PCOQT] = (pc) + 4; \ } while (/*CONSTCOND*/0) +#define _UC_MACHINE_INTRV(uc) ((uc)->uc_mcontext.__gregs[_REG_RET0]) static __inline void * __lwp_getprivate_fast(void)
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Wed Feb 21 10:42:16 UTC 2018 Modified Files: src/sys/arch/hppa/hppa: db_disasm.c Log Message: Avoid UB (shift of negative number) To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/hppa/db_disasm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/db_disasm.c diff -u src/sys/arch/hppa/hppa/db_disasm.c:1.16 src/sys/arch/hppa/hppa/db_disasm.c:1.17 --- src/sys/arch/hppa/hppa/db_disasm.c:1.16 Wed Jan 18 09:35:48 2012 +++ src/sys/arch/hppa/hppa/db_disasm.c Wed Feb 21 10:42:16 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.16 2012/01/18 09:35:48 skrll Exp $ */ +/* $NetBSD: db_disasm.c,v 1.17 2018/02/21 10:42:16 skrll Exp $ */ /* $OpenBSD: db_disasm.c,v 1.9 2000/04/18 20:02:45 mickey Exp $ */ @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.16 2012/01/18 09:35:48 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.17 2018/02/21 10:42:16 skrll Exp $"); #include #include @@ -865,23 +865,23 @@ struct majoropcode { #define Bi2(i) BitfR(i,6,13,_b613) /* fragmented field collating macros */ -#define Ima5(i) (Ima5S(i) ? Ima5M(i) | (-1<<4) : Ima5M(i)) +#define Ima5(i) (Ima5S(i) ? Ima5M(i) | (int)(~__BITS(3,0)) : Ima5M(i)) -#define Imc5(i) (Imc5S(i) ? Imc5M(i) | (-1<<4) : Imc5M(i)) +#define Imc5(i) (Imc5S(i) ? Imc5M(i) | (int)(~__BITS(3,0)) : Imc5M(i)) -#define Disp(i) (DispS(i) ? DispM(i) | (-1<<13) : DispM(i)) +#define Disp(i) (DispS(i) ? DispM(i) | (int)(~__BITS(12,0)) : DispM(i)) #define Im21(i) (Im21S(i) << 31 | Im21H(i) << 20 | Im21M1(i) << 18 | \ Im21M2(i) << 13 | Im21L(i) << 11) -#define Im11(i) (Im11S(i) ? Im11M(i) | (-1<<10) : Im11M(i)) +#define Im11(i) (Im11S(i) ? Im11M(i) | (int)(~__BITS(9,0)) : Im11M(i)) #define Bdisp(i) ((OffS(i) ? (Off5(i)<<11 | Off11L(i)<<10|Off11H(i)) \ -/* branch displacement (bytes) */ | (-1 << 16) \ +/* branch displacement (bytes) */ | (int)(~__BITS(15,0)) \ : (Off5(i)<<11|Off11L(i)<<10|Off11H(i))) << 2) #define Cbdisp(i) ((OffS(i) ? (Off11L(i) << 10 | Off11H(i)) \ - /* compare/branch disp (bytes) */ | (-1 << 11) \ + /* compare/branch disp (bytes) */ | (int)(~__BITS(10,0)) \ :Off11L(i) << 10 | Off11H(i)) << 2) #define Sr(i) (SrH(i)<<2 | SrL(i))
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: christos Date: Wed Nov 29 17:36:03 UTC 2017 Modified Files: src/sys/arch/hppa/include: signal.h Log Message: need sigtypes.h for sigset_t, since includes this directly. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/include/signal.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/signal.h diff -u src/sys/arch/hppa/include/signal.h:1.6 src/sys/arch/hppa/include/signal.h:1.7 --- src/sys/arch/hppa/include/signal.h:1.6 Sun Jan 2 13:07:02 2011 +++ src/sys/arch/hppa/include/signal.h Wed Nov 29 12:36:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: signal.h,v 1.6 2011/01/02 18:07:02 skrll Exp $ */ +/* $NetBSD: signal.h,v 1.7 2017/11/29 17:36:03 christos Exp $ */ /* $OpenBSD: signal.h,v 1.1 1998/06/23 19:45:27 mickey Exp $ */ @@ -33,6 +33,7 @@ */ #include +#include typedef int sig_atomic_t;
CVS commit: src/sys/arch/hppa/dev
Module Name:src Committed By: maya Date: Tue Oct 10 13:47:27 UTC 2017 Modified Files: src/sys/arch/hppa/dev: mongoose.c Log Message: Reorder to avoid null deref before null test To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/dev/mongoose.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/dev/mongoose.c diff -u src/sys/arch/hppa/dev/mongoose.c:1.3 src/sys/arch/hppa/dev/mongoose.c:1.4 --- src/sys/arch/hppa/dev/mongoose.c:1.3 Mon Mar 31 20:51:20 2014 +++ src/sys/arch/hppa/dev/mongoose.c Tue Oct 10 13:47:27 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mongoose.c,v 1.3 2014/03/31 20:51:20 christos Exp $ */ +/* $NetBSD: mongoose.c,v 1.4 2017/10/10 13:47:27 maya Exp $ */ /* $OpenBSD: mongoose.c,v 1.19 2010/01/01 20:28:42 kettenis Exp $ */ @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mongoose.c,v 1.3 2014/03/31 20:51:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mongoose.c,v 1.4 2017/10/10 13:47:27 maya Exp $"); #define MONGOOSE_DEBUG 9 @@ -325,12 +325,14 @@ mg_intr_disestablish(void *v, void *cook { struct hppa_isa_iv *iv = cookie; struct mongoose_softc *sc = v; - int irq = iv - sc->sc_iv; + int irq; volatile uint8_t *imr; if (!sc || !cookie) return; + irq = iv - sc->sc_iv; + if (irq < 8) imr = >sc_ctrl->imr0; else
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: christos Date: Wed Oct 4 23:04:42 UTC 2017 Modified Files: src/sys/arch/hppa/include: mutex.h Log Message: const me harder! To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/include/mutex.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/mutex.h diff -u src/sys/arch/hppa/include/mutex.h:1.12 src/sys/arch/hppa/include/mutex.h:1.13 --- src/sys/arch/hppa/include/mutex.h:1.12 Sun Sep 24 03:39:28 2017 +++ src/sys/arch/hppa/include/mutex.h Wed Oct 4 19:04:42 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mutex.h,v 1.12 2017/09/24 07:39:28 christos Exp $ */ +/* $NetBSD: mutex.h,v 1.13 2017/10/04 23:04:42 christos Exp $ */ /*- * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc. @@ -141,13 +141,13 @@ MUTEX_DEBUG_P(const volatile struct kmut } static inline int -MUTEX_SPIN_P(volatile struct kmutex *mtx) +MUTEX_SPIN_P(const volatile struct kmutex *mtx) { return mtx->mtx_owner == MUTEX_SPIN_FLAG; } static inline int -MUTEX_ADAPTIVE_P(volatile struct kmutex *mtx) +MUTEX_ADAPTIVE_P(const volatile struct kmutex *mtx) { return mtx->mtx_owner != MUTEX_SPIN_FLAG; }
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: christos Date: Sun Sep 24 07:39:28 UTC 2017 Modified Files: src/sys/arch/hppa/include: mutex.h Log Message: const me harder. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hppa/include/mutex.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/mutex.h diff -u src/sys/arch/hppa/include/mutex.h:1.11 src/sys/arch/hppa/include/mutex.h:1.12 --- src/sys/arch/hppa/include/mutex.h:1.11 Tue Nov 16 04:35:14 2010 +++ src/sys/arch/hppa/include/mutex.h Sun Sep 24 03:39:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mutex.h,v 1.11 2010/11/16 09:35:14 uebayasi Exp $ */ +/* $NetBSD: mutex.h,v 1.12 2017/09/24 07:39:28 christos Exp $ */ /*- * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc. @@ -106,7 +106,7 @@ MUTEX_SET_WAITERS(struct kmutex *mtx, ui } static inline int -MUTEX_HAS_WAITERS(volatile struct kmutex *mtx) +MUTEX_HAS_WAITERS(const volatile struct kmutex *mtx) { return mtx->mtx_waiters != 0; } @@ -135,7 +135,7 @@ MUTEX_DESTROY(struct kmutex *mtx) } static inline bool -MUTEX_DEBUG_P(struct kmutex *mtx) +MUTEX_DEBUG_P(const volatile struct kmutex *mtx) { return mtx->mtx_dodebug != 0; }
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: christos Date: Fri Sep 15 03:06:11 UTC 2017 Modified Files: src/sys/arch/hppa/conf: GENERIC Log Message: there is no netbsd 17 To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hppa/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/GENERIC diff -u src/sys/arch/hppa/conf/GENERIC:1.15 src/sys/arch/hppa/conf/GENERIC:1.16 --- src/sys/arch/hppa/conf/GENERIC:1.15 Thu Sep 14 03:58:41 2017 +++ src/sys/arch/hppa/conf/GENERIC Thu Sep 14 23:06:11 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.15 2017/09/14 07:58:41 mrg Exp $ +# $NetBSD: GENERIC,v 1.16 2017/09/15 03:06:11 christos Exp $ # # GENERIC machine description file # @@ -23,7 +23,7 @@ include "arch/hppa/conf/std.hppa" options INCLUDE_CONFIG_FILE # embed config file in kernel binary options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -#ident "GENERIC-$Revision: 1.15 $" +#ident "GENERIC-$Revision: 1.16 $" maxusers 32 # estimated number of users @@ -74,7 +74,7 @@ options DDB_HISTORY_SIZE=512 # enable h #makeoptions DEBUG="-g" # compile full symbol table # Compatibility options -include "conf/compat_netbsd17.config" +include "conf/compat_netbsd20.config" #options COMPAT_OSF1 # OSF1 binary compatibility #options COMPAT_LINUX # binary compatibility with Linux
CVS commit: src/sys/arch/hppa/stand/cdboot
Module Name:src Committed By: skrll Date: Fri Sep 1 07:29:56 UTC 2017 Modified Files: src/sys/arch/hppa/stand/cdboot: ld.script Log Message: Use the same linker script as sys/arch/hppa/stand/boot and fix the gcc 5.3 problem here as well. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/cdboot/ld.script Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/cdboot/ld.script diff -u src/sys/arch/hppa/stand/cdboot/ld.script:1.1 src/sys/arch/hppa/stand/cdboot/ld.script:1.2 --- src/sys/arch/hppa/stand/cdboot/ld.script:1.1 Mon Feb 24 07:23:43 2014 +++ src/sys/arch/hppa/stand/cdboot/ld.script Fri Sep 1 07:29:56 2017 @@ -1,6 +1,6 @@ -/* $NetBSD: ld.script,v 1.1 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: ld.script,v 1.2 2017/09/01 07:29:56 skrll Exp $ */ -/* $OpenBSD: ld.script,v 1.1 2003/03/28 22:42:26 mickey Exp $ */ +/* $OpenBSD: ld.script,v 1.2 1999/04/20 20:02:37 mickey Exp $ */ OUTPUT_FORMAT("elf32-hppa") OUTPUT_ARCH(hppa) @@ -12,18 +12,18 @@ SECTIONS { . = + SIZEOF_HEADERS; .text : { *(.text) - *(.text.*) + *(.text.1) *(.rodata) *(.rodata1) *($CODE$) - etext = .; - } = 0x08000240 + etext = ABSOLUTE(.); + } = 0x08000240 /* nop */ /* Read-write sections, merged into data segment: */ .data : { $global$ = .; *(.data) - *(.data1) + *(.data*) *(.sdata) *(.sdata2) *(.dynamic)
CVS commit: src/sys/arch/hppa/stand/boot
Module Name:src Committed By: skrll Date: Tue Aug 29 19:14:04 UTC 2017 Modified Files: src/sys/arch/hppa/stand/boot: ld.script Log Message: Ensure all data is captured under the edata symbol for srt0.S to relocate it correctly. gcc 5.3 marks some data as .data.rel.local, .data.rel or .data.rel.ro port-hppa/52484: lif images from -8 and HEAD not loadable/bootable over network To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/boot/ld.script Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/boot/ld.script diff -u src/sys/arch/hppa/stand/boot/ld.script:1.1 src/sys/arch/hppa/stand/boot/ld.script:1.2 --- src/sys/arch/hppa/stand/boot/ld.script:1.1 Mon Feb 24 07:23:43 2014 +++ src/sys/arch/hppa/stand/boot/ld.script Tue Aug 29 19:14:04 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ld.script,v 1.1 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: ld.script,v 1.2 2017/08/29 19:14:04 skrll Exp $ */ /* $OpenBSD: ld.script,v 1.2 1999/04/20 20:02:37 mickey Exp $ */ @@ -23,7 +23,7 @@ SECTIONS { .data : { $global$ = .; *(.data) - *(.data1) + *(.data*) *(.sdata) *(.sdata2) *(.dynamic)
CVS commit: src/sys/arch/hppa/stand
Module Name:src Committed By: christos Date: Tue Aug 29 09:17:43 UTC 2017 Modified Files: src/sys/arch/hppa/stand: Makefile.buildboot Makefile.inc Log Message: disable PIE and SSP To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/stand/Makefile.buildboot \ src/sys/arch/hppa/stand/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/Makefile.buildboot diff -u src/sys/arch/hppa/stand/Makefile.buildboot:1.3 src/sys/arch/hppa/stand/Makefile.buildboot:1.4 --- src/sys/arch/hppa/stand/Makefile.buildboot:1.3 Sat Apr 8 15:53:20 2017 +++ src/sys/arch/hppa/stand/Makefile.buildboot Tue Aug 29 05:17:43 2017 @@ -1,5 +1,7 @@ -# $NetBSD: Makefile.buildboot,v 1.3 2017/04/08 19:53:20 christos Exp $ +# $NetBSD: Makefile.buildboot,v 1.4 2017/08/29 09:17:43 christos Exp $ +NOPIE=yes +NOSSP=yes NODEBUG=yes RELOC= 12 HEAP_LIMIT=0x1c Index: src/sys/arch/hppa/stand/Makefile.inc diff -u src/sys/arch/hppa/stand/Makefile.inc:1.3 src/sys/arch/hppa/stand/Makefile.inc:1.4 --- src/sys/arch/hppa/stand/Makefile.inc:1.3 Sun Feb 21 09:50:05 2016 +++ src/sys/arch/hppa/stand/Makefile.inc Tue Aug 29 05:17:43 2017 @@ -1,5 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.3 2016/02/21 14:50:05 christos Exp $ +# $NetBSD: Makefile.inc,v 1.4 2017/08/29 09:17:43 christos Exp $ +NOSSP=yes NOPIE=yes NOCTF=yes BINDIR= /usr/mdec
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Sun Apr 2 08:31:10 UTC 2017 Modified Files: src/sys/arch/hppa/hppa: machdep.c Log Message: PR/52129: NetBSD/hppa 7.1 fails to boot on 712/60 Add 712/* models to cpu_model_cpuid To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/hppa/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/machdep.c diff -u src/sys/arch/hppa/hppa/machdep.c:1.6 src/sys/arch/hppa/hppa/machdep.c:1.7 --- src/sys/arch/hppa/hppa/machdep.c:1.6 Sun Oct 18 17:13:33 2015 +++ src/sys/arch/hppa/hppa/machdep.c Sun Apr 2 08:31:10 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.6 2015/10/18 17:13:33 maxv Exp $ */ +/* $NetBSD: machdep.c,v 1.7 2017/04/02 08:31:10 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.6 2015/10/18 17:13:33 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2017/04/02 08:31:10 skrll Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -861,6 +861,9 @@ cpu_model_cpuid(int modelno) case HPPA_BOARD_HPE25: case HPPA_BOARD_HPE35: case HPPA_BOARD_HPE45: + case HPPA_BOARD_HP712_60: + case HPPA_BOARD_HP712_80: + case HPPA_BOARD_HP712_100: case HPPA_BOARD_HP715_80: case HPPA_BOARD_HP715_64: case HPPA_BOARD_HP715_100:
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: christos Date: Sun Jan 15 18:03:12 UTC 2017 Modified Files: src/sys/arch/hppa/include: lock.h Log Message: undo paren change To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hppa/include/lock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/lock.h diff -u src/sys/arch/hppa/include/lock.h:1.18 src/sys/arch/hppa/include/lock.h:1.19 --- src/sys/arch/hppa/include/lock.h:1.18 Sun Jan 15 10:27:41 2017 +++ src/sys/arch/hppa/include/lock.h Sun Jan 15 13:03:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.18 2017/01/15 15:27:41 christos Exp $ */ +/* $NetBSD: lock.h,v 1.19 2017/01/15 18:03:12 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ #define HPPA_LDCW_ALIGN 16UL #define __SIMPLELOCK_ALIGN(p) \ -(volatile unsigned long *)(((uintptr_t)((p) + HPPA_LDCW_ALIGN - 1)) & \ +(volatile unsigned long *)uintptr_t)(p) + HPPA_LDCW_ALIGN - 1)) & \ ~(HPPA_LDCW_ALIGN - 1)) #define __SIMPLELOCK_RAW_LOCKED 0UL
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: christos Date: Sun Jan 15 15:27:41 UTC 2017 Modified Files: src/sys/arch/hppa/include: lock.h Log Message: more types for constants To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hppa/include/lock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/lock.h diff -u src/sys/arch/hppa/include/lock.h:1.17 src/sys/arch/hppa/include/lock.h:1.18 --- src/sys/arch/hppa/include/lock.h:1.17 Sat Jan 14 10:58:11 2017 +++ src/sys/arch/hppa/include/lock.h Sun Jan 15 10:27:41 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.17 2017/01/14 15:58:11 christos Exp $ */ +/* $NetBSD: lock.h,v 1.18 2017/01/15 15:27:41 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -39,10 +39,10 @@ #include -#define HPPA_LDCW_ALIGN 16 +#define HPPA_LDCW_ALIGN 16UL #define __SIMPLELOCK_ALIGN(p) \ -(volatile unsigned long *)(((uintptr_t)(p) + HPPA_LDCW_ALIGN - 1) & \ +(volatile unsigned long *)(((uintptr_t)((p) + HPPA_LDCW_ALIGN - 1)) & \ ~(HPPA_LDCW_ALIGN - 1)) #define __SIMPLELOCK_RAW_LOCKED 0UL
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: christos Date: Sat Jan 14 15:58:11 UTC 2017 Modified Files: src/sys/arch/hppa/include: lock.h Log Message: fix constant types To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/include/lock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/lock.h diff -u src/sys/arch/hppa/include/lock.h:1.16 src/sys/arch/hppa/include/lock.h:1.17 --- src/sys/arch/hppa/include/lock.h:1.16 Mon Apr 28 16:23:23 2008 +++ src/sys/arch/hppa/include/lock.h Sat Jan 14 10:58:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.16 2008/04/28 20:23:23 martin Exp $ */ +/* $NetBSD: lock.h,v 1.17 2017/01/14 15:58:11 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -45,8 +45,8 @@ (volatile unsigned long *)(((uintptr_t)(p) + HPPA_LDCW_ALIGN - 1) & \ ~(HPPA_LDCW_ALIGN - 1)) -#define __SIMPLELOCK_RAW_LOCKED 0 -#define __SIMPLELOCK_RAW_UNLOCKED 1 +#define __SIMPLELOCK_RAW_LOCKED 0UL +#define __SIMPLELOCK_RAW_UNLOCKED 1UL static __inline int __SIMPLELOCK_LOCKED_P(__cpu_simple_lock_t *__ptr)
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: christos Date: Fri Nov 25 02:27:43 UTC 2016 Modified Files: src/sys/arch/hppa/include: ptrace.h Log Message: fix register names To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/include/ptrace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/ptrace.h diff -u src/sys/arch/hppa/include/ptrace.h:1.5 src/sys/arch/hppa/include/ptrace.h:1.6 --- src/sys/arch/hppa/include/ptrace.h:1.5 Fri Sep 25 12:05:17 2015 +++ src/sys/arch/hppa/include/ptrace.h Thu Nov 24 21:27:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.5 2015/09/25 16:05:17 christos Exp $ */ +/* $NetBSD: ptrace.h,v 1.6 2016/11/25 02:27:43 christos Exp $ */ /* $OpenBSD: ptrace.h,v 1.2 1998/12/01 03:05:44 mickey Exp $ */ @@ -50,8 +50,8 @@ (r)->r_pcoqh = (v); \ (r)->r_pcoqt = (v) + 4; \ } while (/*CONSTCOND*/0) -#define PTRACE_REG_SP(r) (r)->r_out[30] -#define PTRACE_REG_INTRV(r) (r)->r_out[28] +#define PTRACE_REG_SP(r) (r)->r_regs[30] +#define PTRACE_REG_INTRV(r) (r)->r_regs[28] #define PTRACE_BREAKPOINT ((const uint8_t[]) { 0x00, 0x01, 0x00, 0x04 }) #define PTRACE_BREAKPOINT_SIZE 4
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: skrll Date: Mon May 9 15:23:23 UTC 2016 Modified Files: src/sys/arch/hppa/conf: majors.hppa Log Message: Use the MI usb majors To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/conf/majors.hppa Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/majors.hppa diff -u src/sys/arch/hppa/conf/majors.hppa:1.2 src/sys/arch/hppa/conf/majors.hppa:1.3 --- src/sys/arch/hppa/conf/majors.hppa:1.2 Thu Apr 23 23:22:51 2015 +++ src/sys/arch/hppa/conf/majors.hppa Mon May 9 15:23:23 2016 @@ -1,4 +1,4 @@ -# $NetBSD: majors.hppa,v 1.2 2015/04/23 23:22:51 pgoyette Exp $ +# $NetBSD: majors.hppa,v 1.3 2016/05/09 15:23:23 skrll Exp $ # # Device majors for hppa # @@ -52,3 +52,5 @@ device-major nsmb char 98 nsmb # Majors up to 143 are reserved for machine-dependent drivers. # New machine-independent driver majors are assigned in # sys/conf/majors. + +include "conf/majors.usb"
CVS commit: src/sys/arch/hppa/spmath
Module Name:src Committed By: christos Date: Mon Feb 29 18:22:06 UTC 2016 Modified Files: src/sys/arch/hppa/spmath: dfsqrt.c Log Message: PR/50870: David Binderman: Use logical and instead of arithmetic To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/spmath/dfsqrt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/spmath/dfsqrt.c diff -u src/sys/arch/hppa/spmath/dfsqrt.c:1.5 src/sys/arch/hppa/spmath/dfsqrt.c:1.6 --- src/sys/arch/hppa/spmath/dfsqrt.c:1.5 Sat Feb 4 12:03:09 2012 +++ src/sys/arch/hppa/spmath/dfsqrt.c Mon Feb 29 13:22:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dfsqrt.c,v 1.5 2012/02/04 17:03:09 skrll Exp $ */ +/* $NetBSD: dfsqrt.c,v 1.6 2016/02/29 18:22:06 christos Exp $ */ /* $OpenBSD: dfsqrt.c,v 1.5 2001/03/29 03:58:17 mickey Exp $ */ @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dfsqrt.c,v 1.5 2012/02/04 17:03:09 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dfsqrt.c,v 1.6 2016/02/29 18:22:06 christos Exp $"); #include "../spmath/float.h" #include "../spmath/dbl_float.h" @@ -158,7 +158,7 @@ dbl_fsqrt(dbl_floating_point *srcptr, db /* check for inexact */ if (Dbl_isnotzero(srcp1,srcp2)) { - if (!even_exponent & Dbl_islessthan(resultp1,resultp2,srcp1,srcp2)) { + if (!even_exponent && Dbl_islessthan(resultp1,resultp2,srcp1,srcp2)) { Dbl_increment(resultp1,resultp2); } guardbit = Dbl_lowmantissap2(resultp2);
CVS commit: src/sys/arch/hppa/spmath
Module Name:src Committed By: christos Date: Mon Feb 29 18:20:31 UTC 2016 Modified Files: src/sys/arch/hppa/spmath: sfsqrt.c Log Message: PR/50871: David Binderman: use logical and instead of arithmetic To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/spmath/sfsqrt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/spmath/sfsqrt.c diff -u src/sys/arch/hppa/spmath/sfsqrt.c:1.5 src/sys/arch/hppa/spmath/sfsqrt.c:1.6 --- src/sys/arch/hppa/spmath/sfsqrt.c:1.5 Sat Feb 4 12:03:10 2012 +++ src/sys/arch/hppa/spmath/sfsqrt.c Mon Feb 29 13:20:31 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sfsqrt.c,v 1.5 2012/02/04 17:03:10 skrll Exp $ */ +/* $NetBSD: sfsqrt.c,v 1.6 2016/02/29 18:20:31 christos Exp $ */ /* $OpenBSD: sfsqrt.c,v 1.5 2001/03/29 03:58:19 mickey Exp $ */ @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sfsqrt.c,v 1.5 2012/02/04 17:03:10 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sfsqrt.c,v 1.6 2016/02/29 18:20:31 christos Exp $"); #include "../spmath/float.h" #include "../spmath/sgl_float.h" @@ -150,7 +150,7 @@ sgl_fsqrt(sgl_floating_point *srcptr, sg /* check for inexact */ if (Sgl_isnotzero(src)) { - if (!even_exponent & Sgl_islessthan(result,src)) + if (!even_exponent && Sgl_islessthan(result,src)) Sgl_increment(result); guardbit = Sgl_lowmantissa(result); Sgl_rightshiftby1(result);
CVS commit: src/sys/arch/hppa/stand
Module Name:src Committed By: christos Date: Sun Feb 21 14:50:05 UTC 2016 Modified Files: src/sys/arch/hppa/stand: Makefile.buildboot Makefile.inc src/sys/arch/hppa/stand/xxboot: Makefile Log Message: move the NODEBUG to the boot blocks only. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/Makefile.buildboot cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/stand/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/xxboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/Makefile.buildboot diff -u src/sys/arch/hppa/stand/Makefile.buildboot:1.1 src/sys/arch/hppa/stand/Makefile.buildboot:1.2 --- src/sys/arch/hppa/stand/Makefile.buildboot:1.1 Mon Feb 24 02:23:43 2014 +++ src/sys/arch/hppa/stand/Makefile.buildboot Sun Feb 21 09:50:05 2016 @@ -1,5 +1,6 @@ -# $NetBSD: Makefile.buildboot,v 1.1 2014/02/24 07:23:43 skrll Exp $ +# $NetBSD: Makefile.buildboot,v 1.2 2016/02/21 14:50:05 christos Exp $ +NODEBUG=yes RELOC= 12 HEAP_LIMIT=0x1c #DEBUGFLAGS=-DDEBUG Index: src/sys/arch/hppa/stand/Makefile.inc diff -u src/sys/arch/hppa/stand/Makefile.inc:1.2 src/sys/arch/hppa/stand/Makefile.inc:1.3 --- src/sys/arch/hppa/stand/Makefile.inc:1.2 Sat Feb 20 22:33:18 2016 +++ src/sys/arch/hppa/stand/Makefile.inc Sun Feb 21 09:50:05 2016 @@ -1,8 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.2 2016/02/21 03:33:18 christos Exp $ +# $NetBSD: Makefile.inc,v 1.3 2016/02/21 14:50:05 christos Exp $ NOPIE=yes NOCTF=yes -NODEBUG=yes BINDIR= /usr/mdec .include Index: src/sys/arch/hppa/stand/xxboot/Makefile diff -u src/sys/arch/hppa/stand/xxboot/Makefile:1.1 src/sys/arch/hppa/stand/xxboot/Makefile:1.2 --- src/sys/arch/hppa/stand/xxboot/Makefile:1.1 Mon Feb 24 02:23:43 2014 +++ src/sys/arch/hppa/stand/xxboot/Makefile Sun Feb 21 09:50:05 2016 @@ -1,5 +1,6 @@ -# $NetBSD: Makefile,v 1.1 2014/02/24 07:23:43 skrll Exp $ +# $NetBSD: Makefile,v 1.2 2016/02/21 14:50:05 christos Exp $ +NODEBUG=yes PROG= xxboot NOMAN= # defined SRCS= start.S main.c readufs.c readufs_ffs.c readufs_lfs.c milli_tiny.S
CVS commit: src/sys/arch/hppa/stand
Module Name:src Committed By: christos Date: Sun Feb 21 03:33:18 UTC 2016 Modified Files: src/sys/arch/hppa/stand: Makefile.inc Log Message: No debug, pic, or ctf for standalone code. - debug makes things not fit - ctf is useless - pic does not work with the function call convention standalone uses To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/Makefile.inc diff -u src/sys/arch/hppa/stand/Makefile.inc:1.1 src/sys/arch/hppa/stand/Makefile.inc:1.2 --- src/sys/arch/hppa/stand/Makefile.inc:1.1 Mon Feb 24 02:23:43 2014 +++ src/sys/arch/hppa/stand/Makefile.inc Sat Feb 20 22:33:18 2016 @@ -1,8 +1,11 @@ -# $NetBSD: Makefile.inc,v 1.1 2014/02/24 07:23:43 skrll Exp $ +# $NetBSD: Makefile.inc,v 1.2 2016/02/21 03:33:18 christos Exp $ +NOPIE=yes +NOCTF=yes +NODEBUG=yes BINDIR= /usr/mdec -.include +.include COPTS+= -Wno-pointer-sign COPTS+= -fno-strict-aliasing
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: christos Date: Mon Jan 25 18:14:40 UTC 2016 Modified Files: src/sys/arch/hppa/include: cpu.h Log Message: Don't expose kernel structs to userland. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/cpu.h diff -u src/sys/arch/hppa/include/cpu.h:1.2 src/sys/arch/hppa/include/cpu.h:1.3 --- src/sys/arch/hppa/include/cpu.h:1.2 Thu Mar 6 14:02:58 2014 +++ src/sys/arch/hppa/include/cpu.h Mon Jan 25 13:14:40 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.2 2014/03/06 19:02:58 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.3 2016/01/25 18:14:40 christos Exp $ */ /* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */ @@ -86,6 +86,7 @@ enum hppa_cpu_type { mako /* PA8800 (mako) PA 2.0 */ }; +#ifdef _KERNEL /* * A CPU description. */ @@ -116,7 +117,6 @@ struct hppa_cpu_info { int (*hptinit)(vaddr_t, vsize_t); }; -#ifdef _KERNEL extern const struct hppa_cpu_info *hppa_cpu_info; extern int cpu_modelno; extern int cpu_revision;
CVS commit: src/sys/arch/hppa/spmath
Module Name:src Committed By: christos Date: Mon Jan 25 18:55:25 UTC 2016 Modified Files: src/sys/arch/hppa/spmath: Makefile.inc Log Message: use :Q to quote variables properly. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/spmath/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/spmath/Makefile.inc diff -u src/sys/arch/hppa/spmath/Makefile.inc:1.7 src/sys/arch/hppa/spmath/Makefile.inc:1.8 --- src/sys/arch/hppa/spmath/Makefile.inc:1.7 Sun Sep 6 11:34:55 2015 +++ src/sys/arch/hppa/spmath/Makefile.inc Mon Jan 25 13:55:25 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.7 2015/09/06 15:34:55 uebayasi Exp $ +# $NetBSD: Makefile.inc,v 1.8 2016/01/25 18:55:25 christos Exp $ # $OpenBSD: Makefile.inc,v 1.4 2001/03/29 03:58:17 mickey Exp $ # @@ -15,13 +15,13 @@ SPMATH_PROF= ${SPMATHDST}/spmath.po SPMATHMAKE= \ cd ${SPMATHDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \ MAKEOBJDIR=${SPMATHDST} ${MAKE} \ - CC='${CC}' CFLAGS='${CFLAGS}' \ - SPMATHCPPFLAGS='${CPPFLAGS:S@^-I.@-I. -I../../.@g}'\ - AS='${AS}' AFLAGS='${AFLAGS}' \ - LD='${LD}' STRIP='${STRIP}' \ - CPP='${CPP}' STRIP='${STRIP}' AR='${AR}' \ - NM='${NM}' LORDER='${LORDER}' \ - XMACHINE='${MACHINE}' XMACHINE_ARCH='${MACHINE_ARCH}' + CC=${CC:Q} CFLAGS=${CFLAGS:Q} \ + SPMATHCPPFLAGS=${CPPFLAGS:S@^-I.@-I. -I../../.@g:Q} \ + AS=${AS:Q} AFLAGS=${AFLAGS:Q} \ + LD=${LD:Q} STRIP=${STRIP:Q} \ + CPP=${CPP:Q} STRIP=${STRIP:Q} AR=${AR:Q} \ + NM=${NM:Q} LORDER=${LORDER:Q} \ + XMACHINE=${MACHINE:Q} XMACHINE_ARCH=${MACHINE_ARCH:Q} ${SPMATH}: .NOTMAIN .MAKE __always_make_spmath @echo making sure the spmath library is up to date...
CVS commit: src/sys/arch/hppa/stand/mkboot
Module Name:src Committed By: christos Date: Thu Jan 21 17:00:23 UTC 2016 Modified Files: src/sys/arch/hppa/stand/mkboot: mkboot.c Log Message: PR/50684: David Binderman: Fix memory leak To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/mkboot/mkboot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/mkboot/mkboot.c diff -u src/sys/arch/hppa/stand/mkboot/mkboot.c:1.1 src/sys/arch/hppa/stand/mkboot/mkboot.c:1.2 --- src/sys/arch/hppa/stand/mkboot/mkboot.c:1.1 Mon Feb 24 02:23:43 2014 +++ src/sys/arch/hppa/stand/mkboot/mkboot.c Thu Jan 21 12:00:23 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mkboot.c,v 1.1 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: mkboot.c,v 1.2 2016/01/21 17:00:23 christos Exp $ */ /* $OpenBSD: mkboot.c,v 1.9 2001/05/17 00:57:55 pvalchev Exp $ */ @@ -234,7 +234,7 @@ putfile(char *from_file, int to) int from, check_sum = 0; struct hppa_lifload load; Elf32_External_Ehdr elf_header; - Elf32_External_Phdr *elf_segments; + Elf32_External_Phdr *elf_segments = NULL; int i, header_count, memory_needed, elf_load_image_segment; if ((from = open(from_file, O_RDONLY)) < 0) @@ -356,6 +356,7 @@ putfile(char *from_file, int to) if (close(from) < 0) err(1, "%s", from_file); + free(elf_segments); return total; }
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Mon Jan 11 08:14:08 UTC 2016 Modified Files: src/sys/arch/hppa/include: db_machdep.h Log Message: PR port-hppa/50642: src/sys/arch/hppa/include/db_machdep.h:118: bad if test ? Correct the test for rfir and add one for rfi while I'm here. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hppa/include/db_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/db_machdep.h diff -u src/sys/arch/hppa/include/db_machdep.h:1.12 src/sys/arch/hppa/include/db_machdep.h:1.13 --- src/sys/arch/hppa/include/db_machdep.h:1.12 Wed Jan 18 09:35:48 2012 +++ src/sys/arch/hppa/include/db_machdep.h Mon Jan 11 08:14:08 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.h,v 1.12 2012/01/18 09:35:48 skrll Exp $ */ +/* $NetBSD: db_machdep.h,v 1.13 2016/01/11 08:14:08 skrll Exp $ */ /* $OpenBSD: db_machdep.h,v 1.5 2001/02/16 19:20:13 mickey Exp $ */ @@ -115,7 +115,8 @@ static __inline int inst_return(u_int in (ins & 0xfc00) == 0xe000; } static __inline int inst_trap_return(u_int ins) { - return (ins & 0xfc001fc0) == 0x0ca0; + return (ins & 0xfc001fe0) == 0x0c00 || + (ins & 0xfc001fe0) == 0x0ca0; } #define db_clear_single_step(r) ((r)->tf_ipsw &= ~PSW_R)
CVS commit: src/sys/arch/hppa/stand/xxboot
Module Name:src Committed By: christos Date: Sun Dec 13 18:38:23 UTC 2015 Modified Files: src/sys/arch/hppa/stand/xxboot: iplsum.c Log Message: PR/50532: David Binderman: Add missing fclose. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/xxboot/iplsum.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/xxboot/iplsum.c diff -u src/sys/arch/hppa/stand/xxboot/iplsum.c:1.1 src/sys/arch/hppa/stand/xxboot/iplsum.c:1.2 --- src/sys/arch/hppa/stand/xxboot/iplsum.c:1.1 Mon Feb 24 02:23:43 2014 +++ src/sys/arch/hppa/stand/xxboot/iplsum.c Sun Dec 13 13:38:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: iplsum.c,v 1.1 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: iplsum.c,v 1.2 2015/12/13 18:38:23 christos Exp $ */ /* * Calculate 32bit checksum of IPL and store in a certain location @@ -54,9 +54,11 @@ main(int argc, char *argv[]) return 1; } if ((len = fread(bootblk, 1, sizeof bootblk, fp)) <= IPLOFF) { + fclose(fp); fprintf(stderr, "%s: too short\n", argv[1]); return 1; } else if (len > BOOTSIZE) { + fclose(fp); fprintf(stderr, "%s: too long (%d vs %d)\n", argv[1], len, BOOTSIZE); return 1; }
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: uebayasi Date: Sun Sep 6 02:22:50 UTC 2015 Modified Files: src/sys/arch/hppa/conf: Makefile.hppa src/sys/arch/hppa/spmath: Makefile.inc Log Message: spmath.o is an MD library, not an MD object. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/conf/Makefile.hppa cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/spmath/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/Makefile.hppa diff -u src/sys/arch/hppa/conf/Makefile.hppa:1.4 src/sys/arch/hppa/conf/Makefile.hppa:1.5 --- src/sys/arch/hppa/conf/Makefile.hppa:1.4 Mon Aug 24 14:04:24 2015 +++ src/sys/arch/hppa/conf/Makefile.hppa Sun Sep 6 02:22:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.hppa,v 1.4 2015/08/24 14:04:24 uebayasi Exp $ +# $NetBSD: Makefile.hppa,v 1.5 2015/09/06 02:22:50 uebayasi Exp $ # Makefile for NetBSD # @@ -57,7 +57,8 @@ KERN_AS= obj ## ## (4) local objects, compile rules, and dependencies ## -MD_OBJS= locore.o ${LIBSPMATH} +MD_OBJS= locore.o +MD_LIBS= ${LIBSPMATH} MD_CFILES= MD_SFILES= ${HPPA}/hppa/locore.S Index: src/sys/arch/hppa/spmath/Makefile.inc diff -u src/sys/arch/hppa/spmath/Makefile.inc:1.5 src/sys/arch/hppa/spmath/Makefile.inc:1.6 --- src/sys/arch/hppa/spmath/Makefile.inc:1.5 Sat Sep 5 04:44:29 2015 +++ src/sys/arch/hppa/spmath/Makefile.inc Sun Sep 6 02:22:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.5 2015/09/05 04:44:29 uebayasi Exp $ +# $NetBSD: Makefile.inc,v 1.6 2015/09/06 02:22:50 uebayasi Exp $ # $OpenBSD: Makefile.inc,v 1.4 2001/03/29 03:58:17 mickey Exp $ # @@ -23,9 +23,6 @@ SPMATHMAKE= \ NM='${NM}' LORDER='${LORDER}' \ XMACHINE='${MACHINE}' XMACHINE_ARCH='${MACHINE_ARCH}' -spmath.o: ${SPMATH} - ln -sf ${SPMATH} $@ - ${SPMATH}: .NOTMAIN .MAKE __always_make_spmath @echo making sure the spmath library is up to date... @${SPMATHMAKE} spmath.o
CVS commit: src/sys/arch/hppa/spmath
Module Name:src Committed By: uebayasi Date: Sat Sep 5 04:44:29 UTC 2015 Modified Files: src/sys/arch/hppa/spmath: Makefile.inc Log Message: Fix build of hppa's spmath.o, as m68k's fpsp.o was done. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hppa/spmath/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/spmath/Makefile.inc diff -u src/sys/arch/hppa/spmath/Makefile.inc:1.4 src/sys/arch/hppa/spmath/Makefile.inc:1.5 --- src/sys/arch/hppa/spmath/Makefile.inc:1.4 Sat Feb 4 11:23:45 2006 +++ src/sys/arch/hppa/spmath/Makefile.inc Sat Sep 5 04:44:29 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.4 2006/02/04 11:23:45 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.5 2015/09/05 04:44:29 uebayasi Exp $ # $OpenBSD: Makefile.inc,v 1.4 2001/03/29 03:58:17 mickey Exp $ # @@ -23,6 +23,9 @@ SPMATHMAKE= \ NM='${NM}' LORDER='${LORDER}' \ XMACHINE='${MACHINE}' XMACHINE_ARCH='${MACHINE_ARCH}' +spmath.o: ${SPMATH} + ln -sf ${SPMATH} $@ + ${SPMATH}: .NOTMAIN .MAKE __always_make_spmath @echo making sure the spmath library is up to date... @${SPMATHMAKE} spmath.o
CVS commit: src/sys/arch/hppa/stand/xxboot
Module Name:src Committed By: dholland Date: Sun Aug 23 04:56:20 UTC 2015 Modified Files: src/sys/arch/hppa/stand/xxboot: readufs.h Log Message: Sync lfs changes with the x68k version of this code. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/stand/xxboot/readufs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/xxboot/readufs.h diff -u src/sys/arch/hppa/stand/xxboot/readufs.h:1.2 src/sys/arch/hppa/stand/xxboot/readufs.h:1.3 --- src/sys/arch/hppa/stand/xxboot/readufs.h:1.2 Thu Aug 20 07:50:08 2015 +++ src/sys/arch/hppa/stand/xxboot/readufs.h Sun Aug 23 04:56:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: readufs.h,v 1.2 2015/08/20 07:50:08 christos Exp $ */ +/* $NetBSD: readufs.h,v 1.3 2015/08/23 04:56:20 dholland Exp $ */ /* from Id: readufs.h,v 1.10 2003/12/16 13:54:11 itohy Exp */ /* @@ -24,7 +24,6 @@ union ufs_dinode { #endif #ifdef USE_LFS struct lfs32_dinode dil32; - struct lfs64_dinode dil64; #endif };
CVS commit: src/sys/arch/hppa/stand/xxboot
Module Name:src Committed By: christos Date: Thu Aug 20 07:50:08 UTC 2015 Modified Files: src/sys/arch/hppa/stand/xxboot: readufs.h readufs_lfs.c Log Message: minimal changes to get this to compile. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/xxboot/readufs.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/stand/xxboot/readufs_lfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/xxboot/readufs.h diff -u src/sys/arch/hppa/stand/xxboot/readufs.h:1.1 src/sys/arch/hppa/stand/xxboot/readufs.h:1.2 --- src/sys/arch/hppa/stand/xxboot/readufs.h:1.1 Mon Feb 24 02:23:43 2014 +++ src/sys/arch/hppa/stand/xxboot/readufs.h Thu Aug 20 03:50:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: readufs.h,v 1.1 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: readufs.h,v 1.2 2015/08/20 07:50:08 christos Exp $ */ /* from Id: readufs.h,v 1.10 2003/12/16 13:54:11 itohy Exp */ /* @@ -23,8 +23,8 @@ union ufs_dinode { struct ufs2_dinode di2; #endif #ifdef USE_LFS - struct ulfs1_dinode dil1; - struct ulfs2_dinode dil2; + struct lfs32_dinode dil32; + struct lfs64_dinode dil64; #endif }; Index: src/sys/arch/hppa/stand/xxboot/readufs_lfs.c diff -u src/sys/arch/hppa/stand/xxboot/readufs_lfs.c:1.2 src/sys/arch/hppa/stand/xxboot/readufs_lfs.c:1.3 --- src/sys/arch/hppa/stand/xxboot/readufs_lfs.c:1.2 Tue Jul 28 12:50:12 2015 +++ src/sys/arch/hppa/stand/xxboot/readufs_lfs.c Thu Aug 20 03:50:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: readufs_lfs.c,v 1.2 2015/07/28 16:50:12 christos Exp $ */ +/* $NetBSD: readufs_lfs.c,v 1.3 2015/08/20 07:50:08 christos Exp $ */ /* from Id: readufs_lfs.c,v 1.8 2003/12/16 13:54:11 itohy Exp */ /* @@ -20,7 +20,7 @@ #error LFS currently requires USE_UFS1 #endif -static struct ulfs1_dinode ifile_dinode; +static struct lfs32_dinode ifile_dinode; #define fsi (*ufsinfo) #define fsi_lfs fsi.fs_u.u_lfs @@ -156,7 +156,7 @@ get_lfs_inode(ino32_t ino, union ufs_din struct ufs_info *ufsinfo = ufs_info; daddr_t daddr; char *buf = alloca(fsi.bsize); - struct ulfs1_dinode *di, *diend; + struct lfs32_dinode *di, *diend; int i; /* Get fs block which contains the specified inode. */ @@ -173,7 +173,7 @@ get_lfs_inode(ino32_t ino, union ufs_din i = ino % fsi_lfs.ifpb; daddr = (fsi_lfs.version == 1) ? ((IFILE_V1 *) buf + i)-if_daddr - : ((IFILE *) buf + i)-if_daddr; + : ((IFILE32 *) buf + i)-if_daddr; } #ifdef DEBUG_WITH_STDIO printf(LFS(%d): daddr: %d\n, ino, (int) daddr); @@ -186,7 +186,7 @@ get_lfs_inode(ino32_t ino, union ufs_din RAW_READ(buf, daddr fsi.fsbtodb, fsi_lfs.ibsize); /* Search for the inode. */ - di = (struct ulfs1_dinode *) buf; + di = (struct lfs32_dinode *) buf; diend = di + fsi_lfs.inopb; for ( ; di diend; di++) @@ -210,7 +210,7 @@ found: #endif #endif - dibuf-dil1 = *di; + dibuf-dil32 = *di; return 0; }
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: uebayasi Date: Thu Aug 20 06:21:54 UTC 2015 Modified Files: src/sys/arch/hppa/conf: Makefile.hppa Log Message: Use ${KERNLDSCRIPT}. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/conf/Makefile.hppa Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/conf/Makefile.hppa diff -u src/sys/arch/hppa/conf/Makefile.hppa:1.2 src/sys/arch/hppa/conf/Makefile.hppa:1.3 --- src/sys/arch/hppa/conf/Makefile.hppa:1.2 Sat Nov 15 12:20:06 2014 +++ src/sys/arch/hppa/conf/Makefile.hppa Thu Aug 20 06:21:54 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.hppa,v 1.2 2014/11/15 12:20:06 uebayasi Exp $ +# $NetBSD: Makefile.hppa,v 1.3 2015/08/20 06:21:54 uebayasi Exp $ # Makefile for NetBSD # @@ -67,7 +67,8 @@ locore.o: ${HPPA}/hppa/locore.S ## ## (5) link settings ## -LINKSCRIPT= -T ${HPPA}/conf/ld.script +KERNLDSCRIPT= ${HPPA}/conf/ld.script +LINKSCRIPT= -T ${KERNLDSCRIPT} TEXTADDR?= 0020 LINKFLAGS_NORMAL= -X EXTRA_LINKFLAGS= -Map $@.map
CVS commit: src/sys/arch/hppa/stand/xxboot
Module Name:src Committed By: christos Date: Tue Jul 28 16:50:12 UTC 2015 Modified Files: src/sys/arch/hppa/stand/xxboot: readufs_lfs.c Log Message: fix build. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/stand/xxboot/readufs_lfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/stand/xxboot/readufs_lfs.c diff -u src/sys/arch/hppa/stand/xxboot/readufs_lfs.c:1.1 src/sys/arch/hppa/stand/xxboot/readufs_lfs.c:1.2 --- src/sys/arch/hppa/stand/xxboot/readufs_lfs.c:1.1 Mon Feb 24 02:23:43 2014 +++ src/sys/arch/hppa/stand/xxboot/readufs_lfs.c Tue Jul 28 12:50:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: readufs_lfs.c,v 1.1 2014/02/24 07:23:43 skrll Exp $ */ +/* $NetBSD: readufs_lfs.c,v 1.2 2015/07/28 16:50:12 christos Exp $ */ /* from Id: readufs_lfs.c,v 1.8 2003/12/16 13:54:11 itohy Exp */ /* @@ -104,7 +104,7 @@ try_lfs(void) if (sblk2.dlfs_magic == LFS_MAGIC) { if (fsi_lfs.version == 1) { -if (sblk.dlfs_otstamp sblk2.dlfs_otstamp) +if (sblk.dlfs_inopf sblk2.dlfs_inopf) s = sblk2; } else { if (sblk.dlfs_serial sblk2.dlfs_serial)
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: martin Date: Mon Mar 2 11:05:12 UTC 2015 Modified Files: src/sys/arch/hppa/hppa: trap.c Log Message: Send SIGBUS when accessing mmap() past end of file (handle EINVAL in fault path). While there, handle ENOMEM as well. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/hppa/hppa/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/trap.c diff -u src/sys/arch/hppa/hppa/trap.c:1.106 src/sys/arch/hppa/hppa/trap.c:1.107 --- src/sys/arch/hppa/hppa/trap.c:1.106 Thu Mar 6 19:02:58 2014 +++ src/sys/arch/hppa/hppa/trap.c Mon Mar 2 11:05:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.106 2014/03/06 19:02:58 skrll Exp $ */ +/* $NetBSD: trap.c,v 1.107 2015/03/02 11:05:12 martin Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.106 2014/03/06 19:02:58 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.107 2015/03/02 11:05:12 martin Exp $); /* #define INTRDEBUG */ /* #define TRAPDEBUG */ @@ -79,6 +79,7 @@ __KERNEL_RCSID(0, $NetBSD: trap.c,v 1.1 #include sys/acct.h #include sys/signal.h #include sys/device.h +#include sys/kauth.h #include sys/kmem.h #include sys/userret.h @@ -881,9 +882,29 @@ do_onfault: user_backtrace(frame, l, type); #endif KSI_INIT_TRAP(ksi); -ksi.ksi_signo = SIGSEGV; -ksi.ksi_code = (ret == EACCES ? - SEGV_ACCERR : SEGV_MAPERR); +switch (ret) { +case EACCES: + ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = SEGV_ACCERR; + break; +case ENOMEM: + ksi.ksi_signo = SIGKILL; + printf(UVM: pid %d (%s), uid %d + killed: out of swap\n, + p-p_pid, p-p_comm, + l-l_cred ? + kauth_cred_geteuid(l-l_cred) + : -1); + break; +case EINVAL: + ksi.ksi_signo = SIGBUS; + ksi.ksi_code = BUS_ADRERR; + break; +default: + ksi.ksi_signo = SIGSEGV; + ksi.ksi_code = SEGV_MAPERR; + break; +} ksi.ksi_trap = type; ksi.ksi_addr = (void *)va; trapsignal(l, ksi);
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: martin Date: Tue Jan 13 11:15:29 UTC 2015 Modified Files: src/sys/arch/hppa/include: fenv.h ieeefp.h Log Message: Properly separate fenv.h and ieeefp.h by moving all fenv defines over to the former. Now that they are decoupled, make rounding modes match the hardware bits. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hppa/include/fenv.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/include/ieeefp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/fenv.h diff -u src/sys/arch/hppa/include/fenv.h:1.1 src/sys/arch/hppa/include/fenv.h:1.2 --- src/sys/arch/hppa/include/fenv.h:1.1 Sat Dec 27 16:54:03 2014 +++ src/sys/arch/hppa/include/fenv.h Tue Jan 13 11:15:29 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.1 2014/12/27 16:54:03 martin Exp $ */ +/* $NetBSD: fenv.h,v 1.2 2015/01/13 11:15:29 martin Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,23 @@ #define _HPPA_FENV_H_ #include sys/stdint.h -#include machine/ieeefp.h + +typedef unsigned fenv_t; +typedef unsigned fexcept_t; + +#define FE_INEXACT 0x01 /* imprecise (loss of precision) */ +#define FE_UNDERFLOW 0x02 /* underflow exception */ +#define FE_OVERFLOW 0x04 /* overflow exception */ +#define FE_DIVBYZERO 0x08 /* divide-by-zero exception */ +#define FE_INVALID 0x10 /* invalid operation exception */ + +#define FE_ALL_EXCEPT 0x1f + +#define FE_TONEAREST (0) /* round to nearest representable number */ +#define FE_TOWARDZERO (19) /* round to zero (truncate) */ +#define FE_UPWARD (29) /* round toward positive infinity */ +#define FE_DOWNWARD (39) /* round toward negative infinity */ + __BEGIN_DECLS Index: src/sys/arch/hppa/include/ieeefp.h diff -u src/sys/arch/hppa/include/ieeefp.h:1.6 src/sys/arch/hppa/include/ieeefp.h:1.7 --- src/sys/arch/hppa/include/ieeefp.h:1.6 Mon Jan 12 09:14:45 2015 +++ src/sys/arch/hppa/include/ieeefp.h Tue Jan 13 11:15:29 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ieeefp.h,v 1.6 2015/01/12 09:14:45 mrg Exp $ */ +/* $NetBSD: ieeefp.h,v 1.7 2015/01/13 11:15:29 martin Exp $ */ /* * Written by J.T. Conklin, Apr 6, 1995 @@ -12,36 +12,20 @@ #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE) -typedef unsigned fenv_t; -typedef unsigned fexcept_t; - -#define FE_INEXACT 0x01 /* imprecise (loss of precision) */ -#define FE_UNDERFLOW 0x02 /* underflow exception */ -#define FE_OVERFLOW 0x04 /* overflow exception */ -#define FE_DIVBYZERO 0x08 /* divide-by-zero exception */ -#define FE_INVALID 0x10 /* invalid operation exception */ - -#define FE_ALL_EXCEPT 0x1f - -#define FE_TONEAREST 0 /* round to nearest representable number */ -#define FE_TOWARDZERO 1 /* round to zero (truncate) */ -#define FE_UPWARD 2 /* round toward positive infinity */ -#define FE_DOWNWARD 3 /* round toward negative infinity */ - #if !defined(_ISOC99_SOURCE) typedef int fp_except; -#define FP_X_INV FE_INVALID /* invalid operation exception */ -#define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */ -#define FP_X_OFL FE_OVERFLOW /* overflow exception */ -#define FP_X_UFL FE_UNDERFLOW /* underflow exception */ -#define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */ +#define FP_X_INV 0x10 /* invalid operation exception */ +#define FP_X_DZ 0x08 /* divide-by-zero exception */ +#define FP_X_OFL 0x04 /* overflow exception */ +#define FP_X_UFL 0x02 /* underflow exception */ +#define FP_X_IMP 0x01 /* imprecise (loss of precision) */ typedef enum { -FP_RN=FE_TONEAREST, /* round to nearest representable number */ -FP_RZ=FE_TOWARDZERO, /* round to zero (truncate) */ -FP_RP=FE_UPWARD, /* round toward positive infinity */ -FP_RM=FE_DOWNWARD /* round toward negative infinity */ +FP_RN=0, /* round to nearest representable number */ +FP_RZ=1, /* round to zero (truncate) */ +FP_RP=2, /* round toward positive infinity */ +FP_RM=3 /* round toward negative infinity */ } fp_rnd; #endif /* !_ISOC99_SOURCE */
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: mrg Date: Mon Jan 12 09:14:45 UTC 2015 Modified Files: src/sys/arch/hppa/include: ieeefp.h Log Message: use unsigned over uint32_t so that this file works without stdint.h being included before hand. fixes mknative-gcc problems, and likely others. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hppa/include/ieeefp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/include/ieeefp.h diff -u src/sys/arch/hppa/include/ieeefp.h:1.5 src/sys/arch/hppa/include/ieeefp.h:1.6 --- src/sys/arch/hppa/include/ieeefp.h:1.5 Sat Dec 27 16:54:03 2014 +++ src/sys/arch/hppa/include/ieeefp.h Mon Jan 12 09:14:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ieeefp.h,v 1.5 2014/12/27 16:54:03 martin Exp $ */ +/* $NetBSD: ieeefp.h,v 1.6 2015/01/12 09:14:45 mrg Exp $ */ /* * Written by J.T. Conklin, Apr 6, 1995 @@ -12,8 +12,8 @@ #if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE) -typedef uint32_t fenv_t; -typedef uint32_t fexcept_t; +typedef unsigned fenv_t; +typedef unsigned fexcept_t; #define FE_INEXACT 0x01 /* imprecise (loss of precision) */ #define FE_UNDERFLOW 0x02 /* underflow exception */