Re: git: 70e64ba44941 - main - release.sh: Update GITROOT URL
On Wed, Dec 30, 2020, at 3:31 PM, Rodney W. Grimes wrote: > > > And no new mechanism in place to replace it? So, we have > > > no versioning of files in the final product any more? > > > > > > > No. We will not. > > That I take a very hard line against, that is IMHO a very big mistake. > Git has one main context where continuing to support expansion might make sense: When using git archive to create a tarball of a tree (for rolling a release or whatever), if the .gitattributes file has "export-subst" set for a file, it will do expansion at that time. However, I think it uses $Format$ instead of being able to define custom tags, so it's less convenient than $FreeBSD$ was. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 76ff03aef741 - main - powerpc: Fix copyin/copyout race condition
Note: This commit series is stuff salvaged from jhibbits' local tree. Apologies for the malformed commit messages, Piotr and I were discussing them in IRC earlier and I was under the mistaken assumption that they would get reworded before the push. On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=76ff03aef7411e601673dfc997bd6d691bd9a14e > > commit 76ff03aef7411e601673dfc997bd6d691bd9a14e > Author: Justin Hibbits > AuthorDate: 2020-12-08 22:49:25 + > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:44 + > > powerpc: Fix copyin/copyout race condition > > It's possible for a context switch, and CPU migration, to occur between > fetching the PCPU context and extracting the pc_curpcb. This can cause > the fault handler to be installed for the wrong thread, leading to a > panic in copyin()/copyout(). Since curthread is already in %r13, just > use that directly, as GPRs are migrated, so there is no migration race > risk. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: adf79abc35ff - main - Radix dump updates
[PowerPC] Update crash dump page tracking in Radix MMU Due to incorrect bookkeeping, the wrong pages were being dumped in some cases. Update the dump tracking to match the actual page liveness. Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=adf79abc35ff807644c5e43c3d4856b5a29e15ab > > commit adf79abc35ff807644c5e43c3d4856b5a29e15ab > Author: Justin Hibbits > AuthorDate: 2020-05-27 03:31:17 + > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:28 + > > Radix dump updates > --- > sys/powerpc/aim/mmu_radix.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c > index 5833739a25df..2373425afd30 100644 > --- a/sys/powerpc/aim/mmu_radix.c > +++ b/sys/powerpc/aim/mmu_radix.c > @@ -1216,6 +1216,7 @@ retry: > } > PV_STAT(atomic_add_int(&pc_chunk_count, 1)); > PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); > + dump_add_page(m->phys_addr); > pc = (void *)PHYS_TO_DMAP(m->phys_addr); > pc->pc_pmap = pmap; > pc->pc_map[0] = PC_FREE0; > @@ -1490,6 +1491,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct > rwlock **lockp) > PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); > /* Entire chunk is free; return it. */ > m_pc = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); > + dump_drop_page(m_pc->phys_addr); > mtx_lock(&pv_chunks_mutex); > TAILQ_REMOVE(&pv_chunks, pc, pc_lru); > break; > @@ -1579,6 +1581,7 @@ free_pv_chunk(struct pv_chunk *pc) > PV_STAT(atomic_add_int(&pc_chunk_frees, 1)); > /* entire chunk is free, return it */ > m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); > + dump_drop_page(m->phys_addr); > vm_page_unwire_noq(m); > vm_page_free(m); > } > @@ -1639,6 +1642,7 @@ retry: > } > PV_STAT(atomic_add_int(&pc_chunk_count, 1)); > PV_STAT(atomic_add_int(&pc_chunk_allocs, 1)); > + dump_add_page(m->phys_addr); > pc = (void *)PHYS_TO_DMAP(m->phys_addr); > pc->pc_pmap = pmap; > pc->pc_map[0] = PC_FREE0 & ~1ul;/* preallocated bit 0 */ > @@ -2095,6 +2099,10 @@ mmu_radix_late_bootstrap(vm_offset_t start, > vm_offset_t end) > pa = allocpages(DPCPU_SIZE >> PAGE_SHIFT); > dpcpu = (void *)PHYS_TO_DMAP(pa); > dpcpu_init(dpcpu, curcpu); > + > + crashdumpmap = (caddr_t)virtual_avail; > + virtual_avail += MAXDUMPPGS * PAGE_SIZE; > + > /* >* Reserve some special page table entries/VA space for temporary >* mapping of pages. > -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 6260bfb08742 - main - powerpc: Optimize copyinstr() to avoid repeatedly mapping user strings
Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=6260bfb0874280d3fb58ac52699e2aee6ecca8a8 > > commit 6260bfb0874280d3fb58ac52699e2aee6ecca8a8 > Author: Justin Hibbits > AuthorDate: 2020-06-04 18:15:15 + > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:35 + > > powerpc: Optimize copyinstr() to avoid repeatedly mapping user strings > > Currently copyinstr() uses fubyte() to read each byte from userspace. > However, this means that for each byte, it calls pmap_map_user_ptr() to > map the string into memory. This is needlessly wasteful, since the > string will rarely ever cross a segment boundary. Instead, map a > segment at a time, and copy as much from that segment as possible at a > time. > > Measured with the HPT pmap on powerpc64, this saves roughly 8% time on > buildkernel, and 5% on buildworld, in wallclock time. > --- > sys/powerpc/powerpc/copyinout.c | 46 > + > 1 file changed, 33 insertions(+), 13 deletions(-) > > diff --git a/sys/powerpc/powerpc/copyinout.c b/sys/powerpc/powerpc/copyinout.c > index 76965ad996b8..1528accc0e0e 100644 > --- a/sys/powerpc/powerpc/copyinout.c > +++ b/sys/powerpc/powerpc/copyinout.c > @@ -236,31 +236,51 @@ REMAP(copyin)(const void *udaddr, void *kaddr, size_t > len) > int > REMAP(copyinstr)(const void *udaddr, void *kaddr, size_t len, size_t *done) > { > + struct thread *td; > + pmap_t pm; > + jmp_buf env; > const char *up; > - char*kp; > - size_t l; > - int rv, c; > + char*kp, *p; > + size_t i, l, t; > + int rv; > > - kp = kaddr; > - up = udaddr; > + td = curthread; > + pm = &td->td_proc->p_vmspace->vm_pmap; > > + t = 0; > rv = ENAMETOOLONG; > > - for (l = 0; len-- > 0; l++) { > - if ((c = fubyte(up++)) < 0) { > + td->td_pcb->pcb_onfault = &env; > + if (setjmp(env)) { > + rv = EFAULT; > + goto done; > + } > + > + kp = kaddr; > + up = udaddr; > + > + while (len > 0) { > + if (pmap_map_user_ptr(pm, up, (void **)&p, len, &l)) { > rv = EFAULT; > - break; > + goto done; > } > > - if (!(*kp++ = c)) { > - l++; > - rv = 0; > - break; > + for (i = 0; len > 0 && i < l; i++, t++, len--) { > + if ((*kp++ = *p++) == 0) { > + i++, t++; > + rv = 0; > + goto done; > + } > } > + > + up += l; > } > > +done: > + td->td_pcb->pcb_onfault = NULL; > + > if (done != NULL) { > - *done = l; > + *done = t; > } > > return (rv); > -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: ac19bf854b8c - main - powerpc/aim: Add machine check handler for TLB multihit
Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=ac19bf854b8c0bedc793af0cb501f08c6612ccd5 > > commit ac19bf854b8c0bedc793af0cb501f08c6612ccd5 > Author: Justin Hibbits > AuthorDate: 2020-05-29 02:02:41 + > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:10 + > > powerpc/aim: Add machine check handler for TLB multihit > > Handle TLB multi-hit the same as ERAT multi-hit, by flushing the full > TLB. > --- > sys/powerpc/aim/aim_machdep.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sys/powerpc/aim/aim_machdep.c > b/sys/powerpc/aim/aim_machdep.c > index 8824e7447ea6..0ce7cf03403f 100644 > --- a/sys/powerpc/aim/aim_machdep.c > +++ b/sys/powerpc/aim/aim_machdep.c > @@ -563,7 +563,8 @@ cpu_machine_check(struct thread *td, struct > trapframe *frame, int *ucode) > /* SLB multi-hit is recoverable. */ > if ((frame->cpu.aim.dsisr & DSISR_MC_SLB_MULTIHIT) != 0) > return (0); > - if ((frame->cpu.aim.dsisr & DSISR_MC_DERAT_MULTIHIT) != 0) { > + if ((frame->cpu.aim.dsisr & > + (DSISR_MC_DERAT_MULTIHIT | DSISR_MC_TLB_MULTIHIT)) != 0) { > pmap_tlbie_all(); > return (0); > } > -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 7d7f26f5b613 - main - powerpc/radix_mmu: Apply errata fixes for POWER9 TLB invalidation bug
Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=7d7f26f5b613bf54ab30b86f9a03ca8bb3f10bb9 > > commit 7d7f26f5b613bf54ab30b86f9a03ca8bb3f10bb9 > Author: Justin Hibbits > AuthorDate: 2020-05-14 15:50:27 + > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:21 + > > powerpc/radix_mmu: Apply errata fixes for POWER9 TLB invalidation bug > > Found in Linux, the only apparent source of errata documentation. > --- > sys/powerpc/aim/mmu_radix.c | 20 +++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c > index cd067f96d90a..5833739a25df 100644 > --- a/sys/powerpc/aim/mmu_radix.c > +++ b/sys/powerpc/aim/mmu_radix.c > @@ -193,7 +193,19 @@ radix_tlbie(uint8_t ric, uint8_t prs, uint16_t is, > uint32_t pid, uint32_t lpid, > rs = ((uint64_t)pid << 32) | lpid; > rb = va | is | ap; > __asm __volatile(PPC_TLBIE_5(%0, %1, %2, %3, 1) : : > - "r" (rb), "r" (rs), "i" (ric), "i" (prs)); > + "r" (rb), "r" (rs), "i" (ric), "i" (prs) : "memory"); > +} > + > +static __inline void > +radix_tlbie_fixup(uint32_t pid, vm_offset_t va, int ap) > +{ > + > + __asm __volatile("ptesync" ::: "memory"); > + radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > + TLBIEL_INVAL_PAGE, 0, 0, va, ap); > + __asm __volatile("ptesync" ::: "memory"); > + radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > + TLBIEL_INVAL_PAGE, pid, 0, va, ap); > } > > static __inline void > @@ -202,6 +214,7 @@ radix_tlbie_invlpg_user_4k(uint32_t pid, vm_offset_t va) > > radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > TLBIEL_INVAL_PAGE, pid, 0, va, TLBIE_ACTUAL_PAGE_4K); > + radix_tlbie_fixup(pid, va, TLBIE_ACTUAL_PAGE_4K); > } > > static __inline void > @@ -210,6 +223,7 @@ radix_tlbie_invlpg_user_2m(uint32_t pid, vm_offset_t va) > > radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > TLBIEL_INVAL_PAGE, pid, 0, va, TLBIE_ACTUAL_PAGE_2M); > + radix_tlbie_fixup(pid, va, TLBIE_ACTUAL_PAGE_2M); > } > > static __inline void > @@ -234,6 +248,7 @@ radix_tlbie_invlpg_kernel_4k(vm_offset_t va) > > radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > TLBIEL_INVAL_PAGE, 0, 0, va, TLBIE_ACTUAL_PAGE_4K); > + radix_tlbie_fixup(0, va, TLBIE_ACTUAL_PAGE_4K); > } > > static __inline void > @@ -242,6 +257,7 @@ radix_tlbie_invlpg_kernel_2m(vm_offset_t va) > > radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > TLBIEL_INVAL_PAGE, 0, 0, va, TLBIE_ACTUAL_PAGE_2M); > + radix_tlbie_fixup(0, va, TLBIE_ACTUAL_PAGE_2M); > } > > /* 1GB pages aren't currently supported. */ > @@ -251,6 +267,7 @@ radix_tlbie_invlpg_kernel_1g(vm_offset_t va) > > radix_tlbie(TLBIE_RIC_INVALIDATE_TLB, TLBIE_PRS_PROCESS_SCOPE, > TLBIEL_INVAL_PAGE, 0, 0, va, TLBIE_ACTUAL_PAGE_1G); > + radix_tlbie_fixup(0, va, TLBIE_ACTUAL_PAGE_1G); > } > > static __inline void > @@ -2757,6 +2774,7 @@ setpte: > pmap_pv_promote_l3e(pmap, va, newpde & PG_PS_FRAME, lockp); > > pte_store(pde, PG_PROMOTED | newpde); > + ptesync(); > atomic_add_long(&pmap_l3e_promotions, 1); > CTR2(KTR_PMAP, "pmap_promote_l3e: success for va %#lx" > " in pmap %p", va, pmap); > -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 76ff03aef741 - main - powerpc: Fix copyin/copyout race condition
Approved-By: bdragon (in IRC) On Wed, Dec 30, 2020, at 4:45 PM, Piotr Kubaj wrote: > The branch main has been updated by pkubaj (ports committer): > > URL: > https://cgit.FreeBSD.org/src/commit/?id=76ff03aef7411e601673dfc997bd6d691bd9a14e > > commit 76ff03aef7411e601673dfc997bd6d691bd9a14e > Author: Justin Hibbits > AuthorDate: 2020-12-08 22:49:25 + > Commit: Piotr Kubaj > CommitDate: 2020-12-30 22:45:44 + > > powerpc: Fix copyin/copyout race condition > > It's possible for a context switch, and CPU migration, to occur between > fetching the PCPU context and extracting the pc_curpcb. This can cause > the fault handler to be installed for the wrong thread, leading to a > panic in copyin()/copyout(). Since curthread is already in %r13, just > use that directly, as GPRs are migrated, so there is no migration race > risk. > --- > sys/powerpc/powerpc/support.S | 16 ++-- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/sys/powerpc/powerpc/support.S b/sys/powerpc/powerpc/support.S > index 9ff1bcc02437..10d3192972d5 100644 > --- a/sys/powerpc/powerpc/support.S > +++ b/sys/powerpc/powerpc/support.S > @@ -61,6 +61,7 @@ > /* log_2(8 * WORD) */ > #define LOOP_LOG6 > #define LOG_WORD3 > +#define CURTHREAD %r13 > #else > #define LOADlwz > #define STORE stw > @@ -70,6 +71,7 @@ > /* log_2(8 * WORD) */ > #define LOOP_LOG5 > #define LOG_WORD2 > +#define CURTHREAD %r2 > #endif > > #ifdef AIM > @@ -149,32 +151,26 @@ > > #endif > > -#define PCPU(reg) mfsprg reg, 0 > - > #define SET_COPYFAULT(raddr, rpcb, len) \ > VALIDATE_ADDR_COPY(raddr, len) ;\ > - PCPU(%r9) ;\ > li %r0, COPYFAULT ;\ > - LOADrpcb, PC_CURPCB(%r9);\ > + LOADrpcb, TD_PCB(CURTHREAD) ;\ > STORE %r0, PCB_ONFAULT(rpcb) ;\ > > #define SET_COPYFAULT_TRUNCATE(raddr, rpcb, len)\ > VALIDATE_TRUNCATE_ADDR_COPY(raddr, len) ;\ > - PCPU(%r9) ;\ > li %r0, COPYFAULT ;\ > - LOADrpcb, PC_CURPCB(%r9);\ > + LOADrpcb, TD_PCB(CURTHREAD) ;\ > STORE %r0, PCB_ONFAULT(rpcb) > > #define SET_FUSUFAULT(raddr, rpcb) \ > VALIDATE_ADDR_FUSU(raddr) ;\ > - PCPU(%r9) ;\ > li %r0, FUSUFAULT ;\ > - LOADrpcb, PC_CURPCB(%r9);\ > + LOADrpcb, TD_PCB(CURTHREAD) ;\ > STORE %r0, PCB_ONFAULT(rpcb) > > #define CLEAR_FAULT_NO_CLOBBER(rpcb) \ > - PCPU(%r9) ;\ > - LOADrpcb, PC_CURPCB(%r9);\ > + LOADrpcb, TD_PCB(CURTHREAD) ;\ > li %r0, 0 ;\ > STORE %r0, PCB_ONFAULT(rpcb) > > -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: d26f2a50ff48 - main - powerpc64: Fix boot on virtual-mode OF (PowerMac G5)
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=d26f2a50ff48dacd38ba358d658882d51f7bdbc4 commit d26f2a50ff48dacd38ba358d658882d51f7bdbc4 Author: Brandon Bergren AuthorDate: 2021-02-07 22:05:41 + Commit: Brandon Bergren CommitDate: 2021-02-07 22:13:55 + powerpc64: Fix boot on virtual-mode OF (PowerMac G5) In 78599c32efed3247d165302a1fbe8d9203e38974, CFI endproc decoration was added to locore64.S. However, it missed the subtle detail that __restartkernel_virtual() falls through to __restartkernel(). This was causing boot failure on PowerMac G5, as it tried to execute the epilogue as code. Fix this by branching to __restartkernel() instead of intentionally running off the end of the function. While here, add some additional notes on how the virtual mode restart works. MFC after: 3 days --- sys/powerpc/aim/locore64.S | 10 ++ 1 file changed, 10 insertions(+) diff --git a/sys/powerpc/aim/locore64.S b/sys/powerpc/aim/locore64.S index 0bc0619620d9..f0a183c4b331 100644 --- a/sys/powerpc/aim/locore64.S +++ b/sys/powerpc/aim/locore64.S @@ -255,6 +255,16 @@ ASENTRY_NOPROF(__restartkernel_virtual) addi%r14, %r14, 1 cmpdi %r14, 16 blt 1b + + /* +* Now that we are set up with a temporary direct map, we can +* continue with __restartkernel. Translation will be switched +* back on at the rfid, at which point we will be executing from +* the temporary direct map we just installed, until the kernel +* takes over responsibility for the MMU. +*/ + bl __restartkernel + nop ASEND(__restartkernel_virtual) ASENTRY_NOPROF(__restartkernel) ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: d3338f3355a6 - main - Fix incorrect hypotl(3) result with subnormal numbers
On Wed, Feb 10, 2021, at 4:30 PM, Dimitry Andric wrote: > + volatile long double a = 0x1.b2933cafa0bb7p-16383L; > + volatile long double b = 0x1.fp-16351L; > + volatile long double e = 0x1.fp-16351L; These are compile errors on most platforms. I believe these constants are specific to the x86-centric 80-bit long double format, whereas all other platforms use either 64-bit or 128-bit long doubles. -- Brandon Bergren bdra...@imap.cc ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 145bf6c0af48 - main - Fix blackhole/reject routes.
o, sizeof(info)); > >> - bzero(&w, sizeof(w)); > >>nh = NULL; > >> > >>if (rtm->rtm_version != RTM_VERSION) { > >> @@ -1004,6 +1046,18 @@ route_output(struct mbuf *m, struct socket *so, > >> ...) > >>goto flush; > >>} > >> > >> + union sockaddr_union gw_saun; > >> + int blackhole_flags = rtm->rtm_flags & (RTF_BLACKHOLE|RTF_REJECT); > >> + if (blackhole_flags != 0) { > >> + if (blackhole_flags != (RTF_BLACKHOLE | RTF_REJECT)) > >> + error = fill_blackholeinfo(&info, &gw_saun); > >> + else > >> + error = EINVAL; > >> + if (error != 0) > >> + senderr(error); > >> + /* TODO: rebuild rtm from scratch */ > >> + } > >> + > >>switch (rtm->rtm_type) { > >>case RTM_ADD: > >>case RTM_CHANGE: > >> ___ > >> dev-commits-src-...@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all > >> To unsubscribe, send any mail to > >> "dev-commits-src-all-unsubscr...@freebsd.org" > >> > > > > > > -- > > Mateusz Guzik > > > > > -- > Mateusz Guzik > -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS.
On Thu, Feb 18, 2021, at 3:07 PM, Jessica Clarke wrote: > > But, I wonder, what does CALL_ELF mean? Is it for old 64bit PowerPC ABI, > > that was abandoned with the switch to ELFv2? > > Yes, _CALL_ELF == 2 for ELFv2. I highly doubt the defines were needed > for the ELFv1 ABI, but they're especially redundant now. Presumably > David's original fixed commit[1] added powerpc64 to that list because > TLS wasn't yet supported in LLVM; that happened later in 2012 and our > wiki changed it to being implemented in December 2012[2]. So I suspect > it should have been deleted 8 years ago. FreeBSD 13 will be the first ELFv2 release. FreeBSD 12 and below are ELFv1. The reason for the line was to avoid breaking things during the development period for ELFv2. Switching TLS on was one of the things I did at the same time as the official ELFv2 transition. See 2db975b0eb0f3378a39d63eeabe4e3617f4557f0. This is NOT an 8 year old change, but I believe it can go away in HEAD as long as the change isn't MFC'd to 12 or earlier. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS.
On Thu, Feb 18, 2021, at 6:00 PM, Jessica Clarke wrote: > > But TLS isn't broken for ELFv1? Otherwise jemalloc would die in a fire > and nothing would ever work. TLS should have been working for ELFv1 for > many years by this point. > > Jess It's not broken, but it's an ABI change to flip it back and forth. You get RuneLocale errors in the middle of installworld if you try and install a build with TLS enabled and have to do a double installworld to compensate for the crashes. For ABI stability reasons, it needs to stay on in 12 and below. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS.
On Thu, Feb 18, 2021, at 7:07 PM, Jessica Clarke wrote: > On 19 Feb 2021, at 00:03, Brandon Bergren wrote: > > Ok, so the mistake was not deleting it 8 years ago and instead leaving > it around to become part of the ABI. The issue you're referring to > specifically is __getCurrentRuneLocale and _ThreadRuneLocale (the > latter doesn't exist for __NO_TLS, and the former changes between > static inline and extern)? __NO_TLS should have blocked powerpc64 (and > mips) from becoming tier 2 IMO, but we're stuck with it, so yeah, it's > a major ABI break (frustratingly tiny but breaks the core system > libraries) and thus can't be MFC'ed. > > Jess Right. And I fixed it for powerpc64 for 13 finally becuase I had the excuse of "Well, we're switching to an entirely incompatible ABI due to lld not supporting ELFv1, so I might as well fix this one at the same time since we're forcing people to reinstall from scratch anyway." So yeah, in HEAD, all references to __NO_TLS can go away fully, in stable/13 the mips part probably has to stay (riscv can play the tier 3 card though), and in 12 it's baked in for life. The "(defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1))" part is no longer relevant for 13 or HEAD, since the ELFv2 transition is over and done with as of the end of 2019. I probably should have taken that part out last year, since it was meant to just be a temporary compatibility shim so that people could compile both the gcc4.2 ELFv1 and llvm ELFv2 versions of 13-CURRENT out of the same tree back when we were in the middle of switching over. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 3ae8d83d04a7 - main - Remove __NO_TLS.
MFC to stable/13 only, as MFCing to 12 or below would be an ABI break. On Tue, Feb 23, 2021, at 12:08 PM, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3ae8d83d04a7a6ec11b64c89ee60c180b0bde30e > > commit 3ae8d83d04a7a6ec11b64c89ee60c180b0bde30e > Author: Konstantin Belousov > AuthorDate: 2021-02-19 15:20:29 + > Commit: Konstantin Belousov > CommitDate: 2021-02-23 18:08:10 + > > Remove __NO_TLS. > > All supported platforms support thread-local vars and __thread. > > Reviewed by:emaste > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D28796 > --- -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 5001c579baff - main - [PowerPC64LE] pseries: Fix input buffering logic.
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=5001c579baff78719919d79ec054207aa2938dbd commit 5001c579baff78719919d79ec054207aa2938dbd Author: Brandon Bergren AuthorDate: 2021-02-25 18:55:58 + Commit: Brandon Bergren CommitDate: 2021-02-25 20:50:13 + [PowerPC64LE] pseries: Fix input buffering logic. In uart_phyp_get(), when the internal buffer is empty, we make a hypercall to retrieve up to 16 bytes of input data from the hypervisor. As this is specified to be returned in BE format, we need to do a 64-bit byte swap on the first and second half of the data. If the buffer being passed in was insufficient to return the fetched data, we store the remainder in the internal buffer and use it to satisfy the following calls to uart_phyp_get() until it is drained. However, in this case, we were accidentally byteswapping the internal buffer again. Move the byteswapping code to just after the hypercall so it only gets swapped when we're filling the buffer. Fixes arrow keys in qemu on pseries, among other console oddities. Sponsored by: Tag1 Consulting, Inc. MFC after: 3 days --- sys/powerpc/pseries/phyp_console.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/powerpc/pseries/phyp_console.c b/sys/powerpc/pseries/phyp_console.c index 84ab292dae94..484952177d51 100644 --- a/sys/powerpc/pseries/phyp_console.c +++ b/sys/powerpc/pseries/phyp_console.c @@ -295,6 +295,10 @@ uart_phyp_get(struct uart_phyp_softc *sc, void *buffer, size_t bufsize) err = phyp_pft_hcall(H_GET_TERM_CHAR, sc->vtermid, 0, 0, 0, &sc->inbuflen, &sc->phyp_inbuf.u64[0], &sc->phyp_inbuf.u64[1]); +#if BYTE_ORDER == LITTLE_ENDIAN + sc->phyp_inbuf.u64[0] = be64toh(sc->phyp_inbuf.u64[0]); + sc->phyp_inbuf.u64[1] = be64toh(sc->phyp_inbuf.u64[1]); +#endif if (err != H_SUCCESS) { uart_unlock(&sc->sc_mtx); return (-1); @@ -307,11 +311,6 @@ uart_phyp_get(struct uart_phyp_softc *sc, void *buffer, size_t bufsize) return (0); } -#if BYTE_ORDER == LITTLE_ENDIAN - sc->phyp_inbuf.u64[0] = be64toh(sc->phyp_inbuf.u64[0]); - sc->phyp_inbuf.u64[1] = be64toh(sc->phyp_inbuf.u64[1]); -#endif - if ((sc->protocol == HVTERMPROT) && (hdr == 1)) { sc->inbuflen = sc->inbuflen - 4; /* The VTERM protocol has a 4 byte header, skip it here. */ ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems.
This is mistakenly detecting pseries powerpc64* as an EFI platform and causing install to error out. Please add back the uname checks so this code doesn't run on powerpc*. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems.
On Sat, Feb 27, 2021, at 7:10 PM, Brandon Bergren wrote: > This is mistakenly detecting pseries powerpc64* as an EFI platform and > causing install to error out. Please add back the uname checks so this > code doesn't run on powerpc*. Specifically, the /boot/efi stuff in usr.sbin/bsdinstall/scripts/bootconfig should not run on mips / 32 bit ARM / powerpc* systems. I believe /boot/efi is always created so it can't be used to infer existence of EFI. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems.
On Sat, Feb 27, 2021, at 7:25 PM, Jessica Clarke wrote: > > 32-bit Arm can boot via EFI. Just mips* and powerpc*. > > Jess Ah, thanks. Yeah, that matches with which platforms mark the EFI option as BROKEN in src.opts.mk to prevent the tools from being built. > > -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems.
On Sat, Feb 27, 2021, at 8:39 PM, Warner Losh wrote: > > 32-bit Arm can boot via EFI. Just mips* and powerpc*. > > There was some rumblings of little endian powerpc64 efi, but I don't > think it's ready... I've never heard of such things. PAPR/LoPAPR/LoPAR (pseries) is specified as an OpenFirmware platform, and I don't see that changing in the future given the way it's baked into the spec. And PowerNV is a minimal-runtime-services platform where the runtime abstraction (OPAL) calls don't include any sort of way to access disk devices. Do you mean alternative firmware for PowerNV? I've heard people talking on and off about coreboot, but I don't see that becoming mainstream over the petitboot skiroot payload. I don't see the pseries virtualization requirements changing away from OpenFirmware in the future either, given the OpenFirmware requirement has been a constant all the way back to CHRP. > > Yea, we have long since switched our preferred boot on arm to EFI... > though we don't have installer images for 32bit arm, which is this > runs... so it's needed for correctness, but not a practical > difference... > > Warner -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems.
On Sun, Feb 28, 2021, at 2:25 PM, Warner Losh wrote: > Yes. I agree as well. I was just hoping to say just that: EFI is barely > theoretically possible, but in reality we'll likely never use it > > The net effect is that we don't want to install efi on powerpc on freebsd. > > Warner > Yeah. The code before the change excluded mips and powerpc platforms, and it should continue to do so instead of using the existence of a /boot/efi directory as the only clue. Currently bsdinstall bails out and leaves powerpc* in a half-installed state because the die in the uname case propagates to the main script, so it never runs the bits after the bootconfig. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: dd95b39235dd - main - [PowerPC64] Fix multiple issues in fpsetmask().
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=dd95b39235dd81c890aa3cce02a5bb7f91f23803 commit dd95b39235dd81c890aa3cce02a5bb7f91f23803 Author: Brandon Bergren AuthorDate: 2021-03-01 02:35:53 + Commit: Brandon Bergren CommitDate: 2021-03-01 02:37:48 + [PowerPC64] Fix multiple issues in fpsetmask(). Building R exposed a problem in fpsetmask() whereby we were not properly clamping the provided mask to the valid range. R initilizes the mask by calling fpsetmask(~0) on FreeBSD. Since we recently enabled precise exceptions, this was causing an immediate SIGFPE because we were attempting to set invalid bits in the fpscr. Properly limit the range of bits that can be set via fpsetmask(). While here, use the correct fp_except_t type instead of fp_rnd_t. Reported by:pkubaj (in IRC) MFC after: 1 week Sponsored by: Tag1 Consulting, Inc. --- lib/libc/powerpc64/gen/fpsetmask.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/powerpc64/gen/fpsetmask.c b/lib/libc/powerpc64/gen/fpsetmask.c index 4d63552470be..f5d52eec5482 100644 --- a/lib/libc/powerpc64/gen/fpsetmask.c +++ b/lib/libc/powerpc64/gen/fpsetmask.c @@ -43,11 +43,11 @@ fp_except_t fpsetmask(fp_except_t mask) { u_int64_t fpscr; - fp_rnd_t old; + fp_except_t old; __asm__("mffs %0" : "=f"(fpscr)); - old = (fp_rnd_t)((fpscr >> 3) & 0x1f); - fpscr = (fpscr & 0xff07) | (mask << 3); + old = (fp_except_t)((fpscr >> 3) & 0x1f); + fpscr = (fpscr & 0xff07) | ((mask & 0x1f) << 3); __asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr)); return (old); } ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 384ee7cc6e9e - main - [PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask().
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=384ee7cc6e9e4ddc91a6e9e623fcbbe5826bce38 commit 384ee7cc6e9e4ddc91a6e9e623fcbbe5826bce38 Author: Brandon Bergren AuthorDate: 2021-03-01 03:06:59 + Commit: Brandon Bergren CommitDate: 2021-03-01 03:11:29 + [PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask(). Building R on powerpc64 exposed a problem in fpsetmask() whereby we were not properly clamping the provided mask to the valid range. This same issue affects powerpc and powerpcspe. Properly limit the range of bits that can be set via fpsetmask(). While here, use the correct fp_except_t type instead of fp_rnd_t. Reported by:pkubaj, jhibbits (in IRC) Sponsored by: Tag1 Consulting, Inc. MFC after: 1 week --- lib/libc/powerpc/gen/fpsetmask.c| 6 +++--- lib/libc/powerpcspe/gen/fpsetmask.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/powerpc/gen/fpsetmask.c b/lib/libc/powerpc/gen/fpsetmask.c index 4d63552470be..f5d52eec5482 100644 --- a/lib/libc/powerpc/gen/fpsetmask.c +++ b/lib/libc/powerpc/gen/fpsetmask.c @@ -43,11 +43,11 @@ fp_except_t fpsetmask(fp_except_t mask) { u_int64_t fpscr; - fp_rnd_t old; + fp_except_t old; __asm__("mffs %0" : "=f"(fpscr)); - old = (fp_rnd_t)((fpscr >> 3) & 0x1f); - fpscr = (fpscr & 0xff07) | (mask << 3); + old = (fp_except_t)((fpscr >> 3) & 0x1f); + fpscr = (fpscr & 0xff07) | ((mask & 0x1f) << 3); __asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr)); return (old); } diff --git a/lib/libc/powerpcspe/gen/fpsetmask.c b/lib/libc/powerpcspe/gen/fpsetmask.c index e71b822d6e0b..2f48802d9ca3 100644 --- a/lib/libc/powerpcspe/gen/fpsetmask.c +++ b/lib/libc/powerpcspe/gen/fpsetmask.c @@ -42,11 +42,11 @@ fp_except_t fpsetmask(fp_except_t mask) { uint32_t fpscr; - fp_rnd_t old; + fp_except_t old; __asm__ __volatile("mfspr %0, %1" : "=r"(fpscr) : "K"(SPR_SPEFSCR)); - old = (fp_rnd_t)((fpscr >> 2) & 0x1f); - fpscr = (fpscr & 0xff83) | (mask << 2); + old = (fp_except_t)((fpscr >> 2) & 0x1f); + fpscr = (fpscr & 0xff83) | ((mask & 0x1f) << 2); __asm__ __volatile("mtspr %1,%0;isync" :: "r"(fpscr), "K"(SPR_SPEFSCR)); return (old); } ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems.
On Mon, Mar 1, 2021, at 11:54 AM, Nathan Whitehorn wrote: > The /boot/uboot in BSD.root.dist also looks like cruft to me, but maybe > best to leave for now? > -Nathan It's used on Book-E powerpc* in some cases (and the bootloader is compiled and installed there by default on powerpc*) but it's a regular directory. I don't believe there's any custom behavior to treat it as a mount point because setting up booting is a machine specific thing in this case, and the user is expected to do something like copy it to the boot server or a partition on the bootstrap media. For example, on the X5000, the boot firmware is stored on an onboard SD card that has space left to install loaders and stuff, but this is something that is set up by hand. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2.
On Tue, Mar 2, 2021, at 12:26 PM, Rodney W. Grimes wrote: > > This fails to apply the proper owner/group and mode values > using what ever defaults are in place of the process running > the build. Keep in mind that this is the root of a mounted filesystem in the case where it matters, and the filesystem being mounted there doesn't support proper modes anyway, so the mtree values are a bit irrelevant anyway as the actual control of that is in the fstab. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2.
OK, how about this as an idea then: Parse mount output to see if anything is mounted to /boot/efi directly? if mount -p | cut -f 2 | grep '^/boot/efi$'; then fi -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2.
grep -q rather. In any case, instead of checking for directory existence, checking whether something is actually mounted there. On Tue, Mar 2, 2021, at 9:34 PM, Brandon Bergren wrote: > OK, how about this as an idea then: > > Parse mount output to see if anything is mounted to /boot/efi directly? > > if mount -p | cut -f 2 | grep '^/boot/efi$'; then > .... > fi > > -- > Brandon Bergren > bdra...@freebsd.org > -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2.
On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: > What am I missing here? One place I am being told this is run in > an environment that may not even be an EFI booted system, and in > another place it is being used as a test if something is mounted > on it, which should only be true on an EFI booted system. That the script in question is a generic script that runs as part of bsdinstall on every platform and has to be universal. The actual *problem* here is that usr.sbin/bsdinstall/scripts/bootconfig has a default case that is *) die "Unsupported arch $(uname -m) for UEFI install" which then causes the main script to bail out, leaving the system in a half-installed state. If that had just been an exit 0 this would have never been a problem, I suppose. Before the original change that broke this, there was a check that the script was not running on powerpc or mips platforms before running the efi bits, but this got taken out. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: bad9fa56620e - main - [PowerPC] Fix AP bringup on 32-bit AIM SMP
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=bad9fa56620eb82395c5ab66d300e91a0222dde2 commit bad9fa56620eb82395c5ab66d300e91a0222dde2 Author: Brandon Bergren AuthorDate: 2021-03-06 21:26:16 + Commit: Brandon Bergren CommitDate: 2021-03-06 21:46:28 + [PowerPC] Fix AP bringup on 32-bit AIM SMP In r361544, the pmap drivers were converted to ifuncs. When doing so, this changed the call type of pmap functions to be called via the secure-plt stubs. These stubs depend on the TOC base being loaded to r30 to run properly. On SMP AIM (i.e. a dual processor G4 or running 32-bit on G5), since the APs were being started up from the reset vector instead of going through __start, they had never had r30 initialized properly, so when the cpu_reset code in trap_subr32.S attempted to branch to pmap_cpu_bootstrap(), it was loading the target from the wrong location. Ensure r30 is set up directly in the cpu_reset trap code, so we can make PLT calls as normal. Fixes boot on my SMP G4. Reviewed by:jhibbits MFC after: 3 days Sponsored by: Tag1 Consulting, Inc. --- sys/powerpc/aim/trap_subr32.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/powerpc/aim/trap_subr32.S b/sys/powerpc/aim/trap_subr32.S index 710a222fd84c..9664dcc92d2d 100644 --- a/sys/powerpc/aim/trap_subr32.S +++ b/sys/powerpc/aim/trap_subr32.S @@ -316,6 +316,7 @@ cpu_reset: 1: mflr%r1 addi%r1,%r1,(124-16)@l + lwz %r30,TRAP_TOCBASE(0) bl CNAME(cpudep_ap_early_bootstrap) lis %r3,1@l ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: bd94c8ab29c3 - main - [PowerPC] Fix NUMA checking for powernv
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=bd94c8ab29c3162bbb43973ee77ce245fe157fef commit bd94c8ab29c3162bbb43973ee77ce245fe157fef Author: Brandon Bergren AuthorDate: 2021-03-28 01:41:45 + Commit: Brandon Bergren CommitDate: 2021-03-28 01:42:49 + [PowerPC] Fix NUMA checking for powernv At this point in startup, vm_ndomains has not been initialized. Switch to checking kenv instead. Fixes incorrect NUMA information being set on multi-domain systems like Talos II. Submitted by: jhibbits MFC after: 2 weeks --- sys/powerpc/powernv/platform_powernv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/powernv/platform_powernv.c b/sys/powerpc/powernv/platform_powernv.c index 434b642a66a8..d7acc544c2ed 100644 --- a/sys/powerpc/powernv/platform_powernv.c +++ b/sys/powerpc/powernv/platform_powernv.c @@ -532,7 +532,9 @@ powernv_node_numa_domain(platform_t platform, phandle_t node) #ifndef NUMA return (0); #endif - if (vm_ndomains == 1) + i = 0; + TUNABLE_INT_FETCH("vm.numa.disabled", &i); + if (i) return (0); res = OF_getencprop(node, "ibm,associativity", ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 98727c6cd11e - main - Fix panic when using BOOTP to resolve root path.
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=98727c6cd11edb10617be0f421e485e0223185a5 commit 98727c6cd11edb10617be0f421e485e0223185a5 Author: Brandon Bergren AuthorDate: 2021-03-28 00:18:51 + Commit: Brandon Bergren CommitDate: 2021-03-28 19:02:40 + Fix panic when using BOOTP to resolve root path. When loading a direct-boot kernel, a temporary route is being installed, the NFS handle is acquired, and the temporary route is removed again. This was being done inside a net epoch, but since the krpc code is written using blocking APIs, we can't actually do that, because sleeping is not allowed during a net epoch. Exit and reenter the epoch so we are only in the epoch when doing the routing table manipulation. Fixes panic when booting my RB800 over NFS (where the kernel is loaded using RouterBOOT directly.) Reviewed by:melifaro Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D29464 --- sys/nfs/bootp_subr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c index fd0e0653a02c..2386a23084da 100644 --- a/sys/nfs/bootp_subr.c +++ b/sys/nfs/bootp_subr.c @@ -1682,9 +1682,11 @@ retry: NET_EPOCH_ENTER(et); bootpc_add_default_route(ifctx); + NET_EPOCH_EXIT(et); error = md_mount(&nd->root_saddr, nd->root_hostnam, nd->root_fh, &nd->root_fhsize, &nd->root_args, td); + NET_EPOCH_ENTER(et); bootpc_remove_default_route(ifctx); NET_EPOCH_EXIT(et); if (error != 0) { ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 5a08df100b58 - main - [PowerPC] Fix 32-bit Book-E panic due to pve leak
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=5a08df100b58911396e0cc1403f0504bc68461bd commit 5a08df100b58911396e0cc1403f0504bc68461bd Author: Brandon Bergren AuthorDate: 2021-03-29 22:59:19 + Commit: Brandon Bergren CommitDate: 2021-03-29 23:22:16 + [PowerPC] Fix 32-bit Book-E panic due to pve leak On an INVARIANTS kernel on 32-bit Book-E, we were panicing when running the libproc tests. This was caused by extra pv entries being generated accidentally by the pmap icache invalidation code. Use the same VA (i.e. 0) when freeing the temporary mapping, instead of some arbitrary address within the zero page. Failure to do this was causing kernel-side icache syncing to leak PVE entries when invalidating icache for a non page-aligned address, which would later result in pages erroneously showing up as mapped to vm_page. This bug was introduced in r347354 in 2019. Reviewed by:jhibbits (in irc) Sponsored by: Tag1 Consulting, Inc. --- sys/powerpc/booke/pmap_32.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/powerpc/booke/pmap_32.c b/sys/powerpc/booke/pmap_32.c index a9f8af0565f0..924eb223a2b6 100644 --- a/sys/powerpc/booke/pmap_32.c +++ b/sys/powerpc/booke/pmap_32.c @@ -748,14 +748,23 @@ mmu_booke_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) sync_sz = min(sync_sz, sz); if (valid) { if (!active) { - /* Create a mapping in the active pmap. */ + /* +* Create a mapping in the active pmap. +* +* XXX: We use the zero page here, because +* it isn't likely to be in use. +* If we ever decide to support +* security.bsd.map_at_zero on Book-E, change +* this to some other address that isn't +* normally mappable. +*/ addr = 0; m = PHYS_TO_VM_PAGE(pa); PMAP_LOCK(pmap); pte_enter(pmap, m, addr, PTE_SR | PTE_VALID, FALSE); - addr += (va & PAGE_MASK); - __syncicache((void *)addr, sync_sz); + __syncicache((void *)(addr + (va & PAGE_MASK)), + sync_sz); pte_remove(pmap, addr, PTBL_UNHOLD); PMAP_UNLOCK(pmap); } else ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 74f6cb0f316b - main - [PowerPC] Remove unused IPI type count tracking.
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=74f6cb0f316bc0f8fae0b7f31d78d041dc4d509e commit 74f6cb0f316bc0f8fae0b7f31d78d041dc4d509e Author: Justin Hibbits AuthorDate: 2020-09-24 15:00:31 + Commit: Brandon Bergren CommitDate: 2021-03-31 01:03:06 + [PowerPC] Remove unused IPI type count tracking. ipi_msg_count is inaccessible outside this file and is never read. It was introduced in the original SMP support code in r178628 and was never actually used anywhere. Remove it to slightly improve IPI performance. Submitted by: jhibbits MFC after: 1 week --- sys/powerpc/powerpc/mp_machdep.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/powerpc/powerpc/mp_machdep.c b/sys/powerpc/powerpc/mp_machdep.c index 619c344b69a7..a9f2aaf36adc 100644 --- a/sys/powerpc/powerpc/mp_machdep.c +++ b/sys/powerpc/powerpc/mp_machdep.c @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); volatile static int ap_awake; volatile static u_int ap_letgo; volatile static u_quad_t ap_timebase; -static u_int ipi_msg_cnt[32]; static struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; @@ -309,7 +308,6 @@ powerpc_ipi_handler(void *arg) return (FILTER_STRAY); while ((msg = ffs(ipimask) - 1) != -1) { ipimask &= ~(1u << msg); - ipi_msg_cnt[msg]++; switch (msg) { case IPI_AST: CTR1(KTR_SMP, "%s: IPI_AST", __func__); ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 895a22583df2 - main - [PowerPC] Fix ISA_206 subword atomics
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=895a22583df2524e144571430112df6e14ae8d66 commit 895a22583df2524e144571430112df6e14ae8d66 Author: Justin Hibbits AuthorDate: 2020-12-08 16:18:44 + Commit: Brandon Bergren CommitDate: 2021-03-31 01:23:04 + [PowerPC] Fix ISA_206 subword atomics The POWER7 subword atomics were not using the correct instructions for byte and halfword stores in the atomic_fcmpset code. This only affects builds with custom CFLAGS that have explicitly enabled ISA_206_ATOMICS. --- sys/powerpc/include/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index aa03165de46c..0b383a4ebdf6 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -777,7 +777,7 @@ atomic_fcmpset_char(volatile u_char *p, u_char *cmpval, u_char newval) "b 2f\n\t" /* we've succeeded */ "1:\n\t" "stbcx. %0, 0, %3\n\t" /* clear reservation (74xx) */ - "stwx %0, 0, %7\n\t" + "stbx %0, 0, %7\n\t" "li %0, 0\n\t" /* failure - retval = 0 */ "2:\n\t" : "=&r" (ret), "=m" (*p), "=m" (*cmpval) @@ -802,7 +802,7 @@ atomic_fcmpset_short(volatile u_short *p, u_short *cmpval, u_short newval) "b 2f\n\t" /* we've succeeded */ "1:\n\t" "sthcx. %0, 0, %3\n\t" /* clear reservation (74xx) */ - "stwx %0, 0, %7\n\t" + "sthx %0, 0, %7\n\t" "li %0, 0\n\t" /* failure - retval = 0 */ "2:\n\t" : "=&r" (ret), "=m" (*p), "=m" (*cmpval) ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 895a22583df2 - main - [PowerPC] Fix ISA_206 subword atomics
On Tue, Mar 30, 2021, at 8:23 PM, Brandon Bergren wrote: > The branch main has been updated by bdragon: Submitted by: jhibbits MFC after: 1 week ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: 895a22583df2 - main - [PowerPC] Fix ISA_206 subword atomics
On Tue, Mar 30, 2021, at 8:45 PM, Ravi Pokala wrote: > Submitted by: jhibbits > > Isn't that implied by > > > Author: Justin Hibbits > > AuthorDate: 2020-12-08 16:18:44 + Yeah, it is. I wasn't entirely sure the attribution was going to show up correctly in the email until I tried it though. I'll leave it out in the future, thanks. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: a5f07fa0c6b1 - main - powerpc/pseries: Add new hypercall definition, H_REGISTER_PROC_TBL
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=a5f07fa0c6b162964b414d00fab319fd13c61f57 commit a5f07fa0c6b162964b414d00fab319fd13c61f57 Author: Justin Hibbits AuthorDate: 2020-08-16 16:01:49 + Commit: Brandon Bergren CommitDate: 2021-03-31 02:22:21 + powerpc/pseries: Add new hypercall definition, H_REGISTER_PROC_TBL This will be used by the Radix MMU on pseries. MFC after: 1 week --- sys/powerpc/pseries/phyp-hvcall.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/pseries/phyp-hvcall.h b/sys/powerpc/pseries/phyp-hvcall.h index fdc6a774ce03..90f75807e56a 100644 --- a/sys/powerpc/pseries/phyp-hvcall.h +++ b/sys/powerpc/pseries/phyp-hvcall.h @@ -321,7 +321,9 @@ #define H_SET_MODE 0x31C /* Reserved ... */ #define H_GET_DMA_XLATES_L 0x324 -#define MAX_HCALL_OPCODE H_GET_DMA_XLATES_L +/* Reserved ... */ +#define H_REGISTER_PROC_TBL0x37c +#define MAX_HCALL_OPCODE H_REGISTER_PROC_TBL int64_t phyp_hcall(uint64_t opcode, ...); int64_t phyp_pft_hcall(uint64_t opcode, uint64_t flags, uint64_t pteidx, ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 0c9f52d4cebf - main - powerpc: Fix programmer's switch driver and add to GENERIC
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=0c9f52d4cebf18addbea45bd19abd910ba1ea43b commit 0c9f52d4cebf18addbea45bd19abd910ba1ea43b Author: Brandon Bergren AuthorDate: 2021-04-05 17:04:12 + Commit: Brandon Bergren CommitDate: 2021-04-05 17:04:12 + powerpc: Fix programmer's switch driver and add to GENERIC Older G4 and G3 models have a programmer's switch that can be used to generate an interrupt to drop into the debugger. This code hadn't been tested for a long time. It had been broken back in 2005 in r153050. Repair and modernize the code and add it to GENERIC. Reviewed by:jhibbits (approved w/ removal of unused sc_dev var) Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D29131 --- sys/powerpc/conf/GENERIC | 1 + sys/powerpc/powermac/pswitch.c | 46 -- 2 files changed, 14 insertions(+), 33 deletions(-) diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index dc3484d7f614..7854e89d17b7 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -215,6 +215,7 @@ device smu # Apple System Management Unit device adm1030 # Apple G4 MDD fan controller device atibl # ATI-based backlight driver for PowerBooks/iBooks device nvbl# nVidia-based backlight driver for PowerBooks/iBooks +device pswitch # Macio programmer's switch # ADB support device adb diff --git a/sys/powerpc/powermac/pswitch.c b/sys/powerpc/powermac/pswitch.c index df47b5ae6d1f..e2da0f534188 100644 --- a/sys/powerpc/powermac/pswitch.c +++ b/sys/powerpc/powermac/pswitch.c @@ -41,14 +41,15 @@ #include +#include #include #include struct pswitch_softc { - int sc_irqrid; - struct resource *sc_irq; - void*sc_ih; + int sc_irq_rid; + struct resource *sc_irq; + void*sc_ih; }; static int pswitch_probe(device_t); @@ -71,14 +72,15 @@ static driver_t pswitch_driver = { static devclass_t pswitch_devclass; -DRIVER_MODULE(pswitch, macio, pswitch_driver, pswitch_devclass, 0, 0); +EARLY_DRIVER_MODULE(pswitch, macgpio, pswitch_driver, pswitch_devclass, +0, 0, BUS_PASS_RESOURCE); static int pswitch_probe(device_t dev) { - char*type = macio_get_devtype(dev); + const char *type = ofw_bus_get_type(dev); - if (strcmp(type, "gpio") != 0) + if (strcmp(type, "programmer-switch") != 0) return (ENXIO); device_set_desc(dev, "GPIO Programmer's Switch"); @@ -89,43 +91,21 @@ static int pswitch_attach(device_t dev) { struct pswitch_softc *sc; - phandle_t node, child; - chartype[32]; - u_int irq[2]; sc = device_get_softc(dev); - node = macio_get_node(dev); - for (child = OF_child(node); child != 0; child = OF_peer(child)) { - if (OF_getprop(child, "device_type", type, 32) == -1) - continue; - - if (strcmp(type, "programmer-switch") == 0) - break; - } - - if (child == 0) { - device_printf(dev, "could not find correct node\n"); - return (ENXIO); - } - - if (OF_getprop(child, "interrupts", irq, sizeof(irq)) == -1) { - device_printf(dev, "could not get interrupt\n"); - return (ENXIO); - } - - sc->sc_irqrid = 0; - sc->sc_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_irqrid, - irq[0], irq[0], 1, RF_ACTIVE); + sc->sc_irq_rid = 0; + sc->sc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &sc->sc_irq_rid, RF_ACTIVE); if (sc->sc_irq == NULL) { device_printf(dev, "could not allocate interrupt\n"); return (ENXIO); } - if (bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC, + if (bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC | INTR_EXCL, pswitch_intr, NULL, dev, &sc->sc_ih) != 0) { device_printf(dev, "could not setup interrupt\n"); - bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irqrid, + bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irq_rid, sc->sc_irq); return (ENXIO); } ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
Re: git: 15dc713ceb57 - main - netmap: vtnet: add support for netmap offsets
On Wed, Apr 7, 2021, at 5:13 PM, Vincenzo Maffione wrote: > Oh, I'm sorry. That's just to silence the compiler because of the > unused variable addr. We only need the paddr output value in that > context. How about casting away the return value from the call directly then, instead of having addr in the first place? -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"
git: 6e1abda231bf - main - riscv: Remove old qemu compatibility code
The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=6e1abda231bf2a80c010aaff1b99254467420e50 commit 6e1abda231bf2a80c010aaff1b99254467420e50 Author: Brandon Bergren AuthorDate: 2021-04-27 16:07:34 + Commit: Brandon Bergren CommitDate: 2021-04-27 21:22:04 + riscv: Remove old qemu compatibility code During early qemu development, the /soc node was marked as compatible with "riscv-virtio-soc" instead of "simple-bus". This was changed in qemu 53f54508dae6 in Sep 2018, and predates the baseline required qemu version (5.0) for riscv by a wide margin. The generic simplebus code handles attachment in all cases nowadays. Sponsored by: Tag1 Consulting, Inc. Reviewed by:jrtc27, mhorne Differential Revision: https://reviews.freebsd.org/D30011 --- sys/conf/files.riscv | 1 - sys/riscv/riscv/soc.c | 112 -- 2 files changed, 113 deletions(-) diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index 7ecea016b9a3..c2d911cd68de 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -59,7 +59,6 @@ riscv/riscv/pmap.cstandard riscv/riscv/riscv_console.coptionalrcons riscv/riscv/riscv_syscon.c optionalext_resources syscon riscv_syscon fdt riscv/riscv/sbi.c standard -riscv/riscv/soc.c standard riscv/riscv/stack_machdep.coptionalddb | stack riscv/riscv/support.S standard riscv/riscv/swtch.Sstandard diff --git a/sys/riscv/riscv/soc.c b/sys/riscv/riscv/soc.c deleted file mode 100644 index 52d9c64a03de.. --- a/sys/riscv/riscv/soc.c +++ /dev/null @@ -1,112 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2018 Ruslan Bukin - * All rights reserved. - * - * This software was developed by SRI International and the University of - * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 - * ("CTSRD"), as part of the DARPA CRASH research programme. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include - -#include -#include - -struct soc_softc { - struct simplebus_softc simplebus_sc; - device_tdev; -}; - -static int -soc_probe(device_t dev) -{ - - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (!ofw_bus_is_compatible(dev, "riscv-virtio-soc")) - return (ENXIO); - - device_set_desc(dev, "RISC-V SoC"); - - return (BUS_PROBE_DEFAULT); -} - -static int -soc_attach(device_t dev) -{ - struct soc_softc *sc; - phandle_t node; - - sc = device_get_softc(dev); - sc->dev = dev; - - node = ofw_bus_get_node(dev); - if (node == -1) - return (ENXIO); - - simplebus_init(dev, node); - - /* -* Allow devices to identify. -*/ - bus_generic_probe(dev); - - /* -* Now walk the OFW tree and attach top-level devices. -*/ - for (node = OF_child(node); node > 0; node = OF_peer(node)) - simplebus_add_device(dev, node, 0, NULL, -1, NULL); - - return (bus_generic_attach(dev)); -} - -static int -soc_detach(device_t dev) -{ - - return (0); -} - -static device_method_t soc_methods[] = { - DEVMETHOD(device_probe, soc_probe), - DEVMETHOD(device_attach,soc_attach), - DEVMETHOD(device_detach,soc_detach), - DEVMETHOD_END -}; - -DEFINE_CLASS_1(soc, soc_dr
Re: git: 5d8fd932e418 - main - This brings into sync FreeBSD with the netflix versions of rack and bbr. This fixes several breakages (panics) since the tcp_lro code was committed that have been report
On Fri, May 7, 2021, at 11:30 AM, Michael Tuexen wrote: > > On 7. May 2021, at 18:11, Warner Losh wrote: > > > > Yea. If we can't enable it on powerpc, I have some ideas on how to keep > > these modules > > from building when RATELIMIT isn't enabled. > What is the problem on 32-bit PPC? Unfortunately, my G4 MacMini died > last year, but it > is fine on 64-bit PPC. Can test it on a POWER9 system. The powerpc LINT config explicitly disables RATELIMIT. I'm not sure why though, it looks like it was part of the conversion from automatically generated LINT to the manually curated one. -- Brandon Bergren bdra...@freebsd.org ___ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"