Hang up at boot on armv5t
Warner Losh
imp at bsdimp.com
Thu Sep 28 09:29:55 UTC 2017
what happens if you back out these two chunks of the diff:
@@ -355,13 +572,13 @@ blist_print(blist_t bl)
*
* This is the core of the allocator and is optimized for the
* BLIST_BMAP_RADIX block allocation case. Otherwise, execution
- * time is proportional to log2(count) + log2(BLIST_BMAP_RADIX).
+ * time is proportional to log2(count) + bitpos time.
*/
static daddr_t
blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor)
{
u_daddr_t mask;
- int count1, hi, lo, mid, num_shifts, range1, range_ext;
+ int count1, lo, num_shifts, range1, range_ext;
if (count == BLIST_BMAP_RADIX) {
/*@@ -419,17 +636,10
@@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor)
/*
* The least significant set bit in mask marks the start of the
first
* available range of sufficient size. Clear all the bits but that
one,
- * and then perform a binary search to find its position.
+ * and then find its position.
*/
mask &= -mask;
- hi = BLIST_BMAP_RADIX - count1;
- while (lo + 1 < hi) {
- mid = (lo + hi) >> 1;
- if ((mask >> mid) != 0)
- lo = mid;
- else
- hi = mid;
- }
+ lo = bitpos(mask);
/*
* Set in mask exactly the bits being allocated, and clear them from
since bitpos doesn't start at BLIST_BMAP_RADIX - count1 for 'hi', but
instead assumes count1 is 0, and lo should start at 0 as well.
Warner
On Thu, Sep 28, 2017 at 1:39 AM, Mori Hiroki <yamori813 at yahoo.co.jp> wrote:
> Hi
>
> I found more hang up commit on armv5t.
>
> commit e7430120e9c80c0786dc0e9f54e336634932de4c(r323391)
> Author: alc <alc at FreeBSD.org>
> Date: Sun Sep 10 17:46:03 2017 +0000
>
> This is more complex commit. How make workaround on armv5t?
>
>
> ----- Original Message -----
> >From: Warner Losh <imp at bsdimp.com>
> >To: Mori Hiroki <yamori813 at yahoo.co.jp>; Mateusz Guzik <mjguzik at gmail.com
> >
> >Cc: "freebsd-arm at freebsd.org" <freebsd-arm at freebsd.org>
> >Date: 2017/9/27, Wed 13:01
> >Subject: Re: Hang up at boot on armv5t
> >
> >
> >Well, you could do something cheezy like #ifndef arm :)
> >
> >
> >If you do that in the latest sources, does it solve the problem?
> >
> >
> >diff --git a/sys/sys/systm.h b/sys/sys/systm.h
> >index ddebe0a6843..484784466a3 100644
> >--- a/sys/sys/systm.h
> >+++ b/sys/sys/systm.h
> >@@ -258,12 +258,14 @@ void hexdump(const void *ptr, int length,
> const char *hdr, int flags);
> > #define ovbcopy(f, t, l) bcopy((f), (t), (l))
> > void bcopy(const void * _Nonnull from, void * _Nonnull to, size_t len);
> > void bzero(void * _Nonnull buf, size_t len);
> >+#ifndef arm
> > #define bzero(buf, len) ({ \
> > if (__builtin_constant_p(len) && (len) <= 64) \
> > __builtin_memset((buf), 0, (len)); \
> > else \
> > bzero((buf), (len)); \
> > })
> >+#endif
> > void explicit_bzero(void * _Nonnull, size_t);
> >
> >
> > void *memcpy(void * _Nonnull to, const void * _Nonnull from, size_t
> len);
>
> I think "#ifndef __arm__" is good rather than "#ifndef arm".
>
> This is good before r323391.
>
> >
> >
> >And is this built with gcc or clang? What version?
>
> FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based on LLVM
> 5.0.0
> svn)
>
> Hiroki Mori
> >
> >
> >Warner
> >
> >
> >On Tue, Sep 26, 2017 at 9:55 PM, Mori Hiroki <yamori813 at yahoo.co.jp>
> wrote:
> >
> >Hi.
> >>
> >>I found out hang up problem cause of this commit.
> >>
> >>commit 20b4bc44be9bc985b74f8d5a01a24e 302e2a44ff
> >>Author: mjg <mjg at FreeBSD.org>
> >>Date: Fri Sep 8 20:09:14 2017 +0000
> >>
> >>How to fix these commit ?
> >>
> >>Hiroki Mori
> >>
> >>
> >>----- Original Message -----
> >>> From: Mori Hiroki <yamori813 at yahoo.co.jp>
> >>
> >>> To: "freebsd-arm at freebsd.org" <freebsd-arm at freebsd.org>
> >>> Cc:
> >>> Date: 2017/9/27, Wed 10:42
> >>> Subject: Re: Hang up at boot on armv5t
> >>>
> >>> Hi.
> >>>
> >>> I still investigate this problem.
> >>>
> >>> I found other problem.
> >>>
> >>> This commit make panic on armv5t(RT1310).
> >>>
> >>> commit 1db0a229476afafe06f2bc9749f673 8e6cc6d047
> >>> Author: markj <markj at FreeBSD.org>
> >>> Date: Thu Sep 7 21:43:39 2017 +0000
> >>>
> >>> https://gist.github.com/ yamori813/ dc3740085996af505d669446175170 6f
> >>>
> >>>
> >>> Hiroki Mori
> >>>
> >>>
> >>> ----- Original Message -----
> >>>> From: Mori Hiroki <yamori813 at yahoo.co.jp>
> >>>> To: Warner Losh <imp at bsdimp.com>
> >>>> Cc: "freebsd-arm at freebsd.org" <freebsd-arm at freebsd.org>
> >>>> Date: 2017/9/19, Tue 15:27
> >>>> Subject: Re: Hang up at boot on armv5t
> >>>>
> >>>> Hi
> >>>>
> >>>> ----- Original Message -----
> >>>>> From: Warner Losh <imp at bsdimp.com>
> >>>>> To: Mori Hiroki <yamori813 at yahoo.co.jp>
> >>>>> Cc: "freebsd-arm at freebsd.org" <freebsd-arm at freebsd.org>
> >>>>> Date: 2017/9/19, Tue 00:32
> >>>>> Subject: Re: Hang up at boot on armv5t
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Mon, Sep 18, 2017 at 12:59 AM, Mori Hiroki
> >>> <yamori813 at yahoo.co.jp>
> >>>> wrote:
> >>>>>
> >>>>> Hi
> >>>>>>
> >>>>>> Now head is hung up at boot on armv5t.
> >>>>>>
> >>>>>> KDB: debugger backends: ddb
> >>>>>> KDB: current backend: ddb
> >>>>>> Copyright (c) 1992-2017 The FreeBSD Project.
> >>>>>> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993,
> >>> 1994
> >>>>>> The Regents of the University of California. All rights
> >>>> reserved.
> >>>>>> FreeBSD is a registered trademark of The FreeBSD Foundation.
> >>>>>> FreeBSD 12.0-CURRENT #2 a3dbcdd(zrouter)-dirty: Mon Sep 11 18:04:22
> >>> JST
> >>>> 2017
> >>>>>> hiroki at microserver:/storage/ home/hiroki/obj/storage/home/
> >>>> hiroki/zrouter/tmp/
> >>>>>> arm.arm/storage/home/hiroki/ freebsd/sys/Buffalo_WZR2-G300N arm
> >>>>>> FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based
> >>> on
> >>>> LLVM 5.0.0
> >>>>>> svn)
> >>>>>>
> >>>>>> Last month build is fine.
> >>>>>>
> >>>>>> https://gist.github.com/ yamori813/ 88224f1c96c9c592fb611b12a15e4a
> >>> b5
> >>>>>
> >>>>>
> >>>>> You might want to do a binary search between the working and broken
> >>> builds
> >>>> to see where it breaks. Without that, it's hard to make progress.
> >>>>>
> >>>>>
> >>>>> Warner
> >>>>
> >>>>
> >>>> This is RT1310 build by sys/arm/ralink.
> >>>>
> >>>> I get debug log by VERBOSE_SYSINIT.
> >>>>
> >>>>
> >>>> Copyright (c) 1992-2017 The FreeBSD Project.
> >>>> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993,
> 1994
> >>>> The Regents of the University of California. All rights
> reserved.
> >>>> FreeBSD is a registered trademark of The FreeBSD Foundation.
> >>>> FreeBSD 12.0-CURRENT #1 a3dbcdd(zrouter)-dirty: Tue Sep 19 15:03:43
> JST
> >>> 2017
> >>>>
> >>> hiroki at microserver:/storage/ home/hiroki/obj/storage/home/
> hiroki/zrouter/tmp/
> >>>> arm.arm/storage/home/hiroki/ freebsd/sys/Buffalo_WZR2-G300N arm
> >>>> FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based
> on LLVM
> >>> 5.0.0
> >>>> svn)
> >>>> subsystem 1000000
> >>>> 0xc01c1674(0)... done.
> >>>> 0xc01d3a0c(0)... done.
> >>>> subsystem 1800000
> >>>> 0xc00b9cb4(0)... done.
> >>>> 0xc0097fc4(0)... done.
> >>>> 0xc0097c00(0xc0280580)...
> >>>>
> >>>> I checked last address by objdump -D.
> >>>>
> >>>> c0097c00 <malloc_init>:
> >>>> c0280580 <M_GEOM>:
> >>>>
> >>>> What is wrong ?
> >>>>
> >>>> I use git repository on build. If I change git branch then arm
> platform is
> >>> build
> >>>> take
> >>>>
> >>>> 6 hour by my server. It is very hard debugging.
> >>>>
> >>>> Hiroki Mori
> >>>>
> >>>> ______________________________ _________________
> >>>> freebsd-arm at freebsd.org mailing list
> >>>> https://lists.freebsd.org/ mailman/listinfo/freebsd-arm
> >>>> To unsubscribe, send any mail to
> >>> "freebsd-arm-unsubscribe@ freebsd.org"
> >>>>
> >>> ______________________________ _________________
> >>> freebsd-arm at freebsd.org mailing list
> >>> https://lists.freebsd.org/ mailman/listinfo/freebsd-arm
> >>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@ freebsd.org
> "
> >>>
> >>______________________________ _________________
> >>freebsd-arm at freebsd.org mailing list
> >>https://lists.freebsd.org/ mailman/listinfo/freebsd-arm
> >>To unsubscribe, send any mail to "freebsd-arm-unsubscribe@ freebsd.org"
> >>
> >
> >
> >
>
More information about the freebsd-arm
mailing list