Page MenuHomeFreeBSD

hselasky (Hans Petter Selasky)
User

Projects

User Details

User Since
Nov 28 2014, 6:55 PM (445 w, 14 h)

Recent Activity

Yesterday

hselasky added inline comments to D40121: LinuxKPI: implement get_random_u32_inclusive().
Fri, Jun 9, 12:52 PM
hselasky added a comment to D40121: LinuxKPI: implement get_random_u32_inclusive().

Maybe add:
MPASS(ceil >= floor);

Fri, Jun 9, 12:52 PM
hselasky accepted D40124: LinuxKPI: implement timer_{delete,shutdown}_sync().

Looks good!

Fri, Jun 9, 12:48 PM
hselasky added a comment to D40120: LinuxKPI: implement mul_u64_u64_div_u64().
In D40120#921419, @bz wrote:
In D40120#918932, @bz wrote:

Hans, any suggestions on how to proceed?

@bz

Can you show me excatly where this function is needed?

https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-testing.git/tree/drivers/net/wireless/intel/iwlwifi/mvm/ptp.c#n74

In case this is going to be too complicated I'll add a "skeleton" in given we are unlikely going to use this much -- if at all -- anywhere.

Fri, Jun 9, 12:47 PM
hselasky added inline comments to D40121: LinuxKPI: implement get_random_u32_inclusive().
Fri, Jun 9, 12:32 PM

Wed, Jun 7

hselasky added a comment to D36795: Example of audio/MIDI with select(2) and poll(2).

Are there any updates here?

Wed, Jun 7, 10:59 PM
hselasky updated the diff for D40467: ld(1): Correctly define .init_array and .fini_array for all platforms..

@arichardson : Use SORT_BY_INIT_PRIORITY()

Wed, Jun 7, 10:57 PM
hselasky updated the diff for D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..

Change %03X to %07X to print subsystem values, now that I reverted the renumbering of the subsystem and order values.

Wed, Jun 7, 10:27 PM
hselasky added a comment to D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..

Oh also linker_file_lookup_set with a section name like that won't work on anything other than amd64, since link_elf relies on the start/stop symbols, not the section name.

Please tell me if I'm mistaken, but isn't that all controlled by the ldscripts we have?

I'm just about to test D40467 on aarch64. It seems to do the trick, at least as seen by objdump.

Wed, Jun 7, 10:21 PM
hselasky updated the diff for D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..

Fix a bug in sysinit_insert_sorted().

Wed, Jun 7, 10:19 PM
hselasky updated the diff for D40450: kernel: Change SYSINITs and SYSUNINITs to pass callback arguments AS-IS.

Fix wording. SYSUNINITs are only called on module unload.

Wed, Jun 7, 10:14 PM
hselasky added a comment to D40467: ld(1): Correctly define .init_array and .fini_array for all platforms..

@emaste : You added something similar a while back for amd64. Adding you for review.

Wed, Jun 7, 3:17 PM
hselasky added a reviewer for D40467: ld(1): Correctly define .init_array and .fini_array for all platforms.: emaste.
Wed, Jun 7, 3:17 PM
hselasky added a comment to D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..

Oh also linker_file_lookup_set with a section name like that won't work on anything other than amd64, since link_elf relies on the start/stop symbols, not the section name.

Wed, Jun 7, 3:16 PM
hselasky requested review of D40467: ld(1): Correctly define .init_array and .fini_array for all platforms..
Wed, Jun 7, 3:14 PM
hselasky updated the diff for D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..

Change from .ctors to .init_array and .dtors to .fini_array . This is what the default FreeBSD kernel toolchain currently outputs. Also noted by @jrtc27 .

Wed, Jun 7, 1:40 PM
hselasky added a comment to D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..

Finally, I'm highly unconvinced that it makes sense to dynamically register each sysinit individually.

Wed, Jun 7, 1:22 PM
hselasky added inline comments to D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..
Wed, Jun 7, 1:18 PM
hselasky added a comment to D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..

MFC after: 1 week

There is no way this can be MFC'ed, it is a big pile of KBI break.

Wed, Jun 7, 1:15 PM
hselasky updated the summary of D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..
Wed, Jun 7, 1:05 PM
hselasky added a comment to D40464: Use proper pointer type when initialising and uninitialising mutexes..

What do you think about this change?

Wed, Jun 7, 1:01 PM
hselasky requested review of D40464: Use proper pointer type when initialising and uninitialising mutexes..
Wed, Jun 7, 1:00 PM
hselasky updated the diff for D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..

Keep "struct __hack" to force semicolon after SYSINIT() and SYSUNINIT().

Wed, Jun 7, 12:48 PM
hselasky abandoned D40193: kernel: Add automation to sort all constructors and destructors at compile time..

This revision is abandoned in favor of D40463 .

Wed, Jun 7, 12:38 PM
hselasky added a comment to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.

FYI: Here is my second take on the issue D40463 . Please have a look if you are interested.

Wed, Jun 7, 12:37 PM
hselasky requested review of D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..
Wed, Jun 7, 12:36 PM
hselasky updated the diff for D40450: kernel: Change SYSINITs and SYSUNINITs to pass callback arguments AS-IS.

Removed some VNET related changes (not related to this change).

Wed, Jun 7, 12:19 PM
hselasky requested review of D40450: kernel: Change SYSINITs and SYSUNINITs to pass callback arguments AS-IS.
Wed, Jun 7, 11:33 AM
hselasky requested review of D40449: acpi(4): Use MTX_SYSINIT() instead of custom code.
Wed, Jun 7, 11:26 AM

Mon, Jun 5

hselasky added inline comments to D40398: linuxkpi: Assert that "order" is sane.
Mon, Jun 5, 4:33 PM
hselasky added inline comments to D40398: linuxkpi: Assert that "order" is sane.
Mon, Jun 5, 2:47 PM

Sun, Jun 4

hselasky added inline comments to D40398: linuxkpi: Assert that "order" is sane.
Sun, Jun 4, 8:46 PM

Thu, Jun 1

hselasky accepted D40173: LinuxKPI: add devm_ioremap().

There should be a newline before devm_ioremap( . Else looks good.

Thu, Jun 1, 8:36 AM
hselasky added a comment to D40124: LinuxKPI: implement timer_{delete,shutdown}_sync().

Why not just call del_timer_sync() instead of copying the code?

Thu, Jun 1, 8:35 AM
hselasky accepted D40138: LinuxKPI: add struct_group(...).

Tab after #define .

Thu, Jun 1, 8:34 AM
hselasky added a comment to D40120: LinuxKPI: implement mul_u64_u64_div_u64().
In D40120#918932, @bz wrote:

Hans, any suggestions on how to proceed?

Thu, Jun 1, 8:33 AM

Tue, May 30

hselasky accepted D40028: linuxkpi: Handle direct-mapped addresses in linux_free_kmem().

Change looks good, and the questions raised have been answered.

Tue, May 30, 7:51 PM

Sat, May 27

hselasky committed R11:46e258533e69: audio/virtual_oss: Update to 1.3.1 (authored by hselasky).
audio/virtual_oss: Update to 1.3.1
Sat, May 27, 11:16 AM

Tue, May 23

hselasky added inline comments to D40190: build: Fix for sporadic build failures..
Tue, May 23, 11:54 AM
hselasky added a comment to D40190: build: Fix for sporadic build failures..

CFLAGS is also a keyword. Which directory to look at first. Local or parent.

Tue, May 23, 7:09 AM
hselasky added a comment to D40192: build: Add missing dependencies when building kernel for amd64..
In D40192#915712, @kib wrote:
In D40192#915080, @kib wrote:

Perhaps you could add vdso_offset.h as a file to files.amd64, and there specify a dependency on .o together with empty build rule.

That's possible, but you still need the dependency keyword for the C-files in question. Either you depend on the "elf-vdso.so.o" or you depend on "vdso_offset.h". I don't know which is better.

Yes, vdso_offset.h would depend on the vdso. My point is that .c sources depend on vdso_offset.h, which would be a more correct dep edge, than vdso->.c (if possible to express).

Tue, May 23, 7:04 AM
hselasky added inline comments to D40190: build: Fix for sporadic build failures..
Tue, May 23, 6:58 AM
hselasky added a comment to D40191: build: Ensure assym.inc and offset.inc are generated in proper order..
The patch as is should work fine.

Though it is obviously a little confusing why we have both beforedepend and beforebuild dependencies.
You *could* put offset.inc and assym.inc into a list (naming the list is the hard bit 😉

Tue, May 23, 6:38 AM

Mon, May 22

hselasky added a comment to D40190: build: Fix for sporadic build failures..

I will check this a bit more before pushing and see if more developers have anything to say.

Mon, May 22, 10:55 PM
hselasky added a reverting change for rG805d759338a2: mlx4: Move DEFINE_MUTEX() outside function body.: rG47c887be4af7: Revert "mlx4: Move DEFINE_MUTEX() outside function body.".
Mon, May 22, 10:56 AM
hselasky committed rG47c887be4af7: Revert "mlx4: Move DEFINE_MUTEX() outside function body." (authored by hselasky).
Revert "mlx4: Move DEFINE_MUTEX() outside function body."
Mon, May 22, 10:55 AM
hselasky added a comment to D40192: build: Add missing dependencies when building kernel for amd64..
In D40192#915080, @kib wrote:

Does config(8) allow to specify that a build step produces more than one file? This is the problem causing the use of elf-vdso.so.o as a build indicator.

Mon, May 22, 8:39 AM

Sun, May 21

hselasky added inline comments to D40193: kernel: Add automation to sort all constructors and destructors at compile time..
Sun, May 21, 5:09 PM
hselasky added a comment to D40193: kernel: Add automation to sort all constructors and destructors at compile time..
In D40193#915024, @imp wrote:

I'll have to study this in detail... it's a bigger change than I thought it would be...

Sun, May 21, 5:06 PM
hselasky added a comment to D40192: build: Add missing dependencies when building kernel for amd64..
In D40192#915023, @imp wrote:

It would be better if we depended on the header files directly... but if these really are files otherwise not mentioned in the build system and are purely a side effect of the o creation then this is goid.

Sun, May 21, 5:03 PM
hselasky added a comment to D40191: build: Ensure assym.inc and offset.inc are generated in proper order..

@imp : Get me right: Maybe I need to += them to a new variable?

Sun, May 21, 5:01 PM
hselasky accepted D40084: LinuxKPI: fix WRITE_ONCE().

Looks good!

Sun, May 21, 4:38 PM
hselasky added a comment to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.

Sure, I'd be more than happy to test and review patches :)

Sun, May 21, 4:28 PM
hselasky committed rG805d759338a2: mlx4: Move DEFINE_MUTEX() outside function body. (authored by hselasky).
mlx4: Move DEFINE_MUTEX() outside function body.
Sun, May 21, 4:22 PM
hselasky requested review of D40193: kernel: Add automation to sort all constructors and destructors at compile time..
Sun, May 21, 4:16 PM
hselasky requested review of D40192: build: Add missing dependencies when building kernel for amd64..
Sun, May 21, 4:14 PM
hselasky requested review of D40191: build: Ensure assym.inc and offset.inc are generated in proper order..
Sun, May 21, 4:14 PM
hselasky requested review of D40190: build: Fix for sporadic build failures..
Sun, May 21, 4:12 PM

Sat, May 20

hselasky added inline comments to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
Sat, May 20, 8:14 AM
hselasky added a comment to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
Sorting 1125 sysinit items
117378 instructions with qsort()
5509157 instructions with bubble

And if the list is already sorted and you use insertion sort there instead of bubble sort, what is the time then? Can you get that into the list too?

I guess it will be something like 500x instead of your 50x.

--HPS

Yes that would obviously be faster but I don't have time to work on that. If you are planning to work on this and it's going to be ready for review in the near future I'd be happy to drop this patch.

However, using a pre-existing sorting function to obtain a noticeable speedup seems like a valid approach to me. Just because it could be done in a more optimal way at some hypothetical point in the future shouldn't mean we can't make incremental improvements on the way to an ideal solution. Otherwise things would never improve...

Sat, May 20, 8:10 AM

Fri, May 19

hselasky added a comment to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
Sorting 1125 sysinit items
117378 instructions with qsort()
5509157 instructions with bubble
Fri, May 19, 10:30 PM
hselasky added inline comments to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
Fri, May 19, 10:11 PM
hselasky requested changes to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
Fri, May 19, 3:29 PM
hselasky added inline comments to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
Fri, May 19, 3:28 PM
hselasky committed R11:66e584913830: sysutils/rshim-user-space: Update to version 2.0.8 (authored by hselasky).
sysutils/rshim-user-space: Update to version 2.0.8
Fri, May 19, 7:55 AM

Thu, May 18

hselasky added a comment to D40120: LinuxKPI: implement mul_u64_u64_div_u64().

@bz : Another thing coming to mind, is to apply the greatest common divisor between x,y,z. This computation is pretty cheap. When you have exact fractions, it doesn't look so good seeing rounding errors.

Thu, May 18, 6:06 AM
hselasky added a comment to D40120: LinuxKPI: implement mul_u64_u64_div_u64().
In D40120#913732, @bz wrote:

Please don't implement integers like floating point!

I think you need to do something exactly like below. I just quickly sketched this up. Can you verify it?

No

Thu, May 18, 5:59 AM

Wed, May 17

hselasky accepted D40123: LinuxKPI: add ns_to_timespec64().
Wed, May 17, 7:07 AM
hselasky requested changes to D40120: LinuxKPI: implement mul_u64_u64_div_u64().

Please don't implement integers like floating point!

Wed, May 17, 7:07 AM

Sat, May 13

hselasky added a reviewer for D40084: LinuxKPI: fix WRITE_ONCE(): brooks.
Sat, May 13, 6:53 PM
hselasky added inline comments to D40084: LinuxKPI: fix WRITE_ONCE().
Sat, May 13, 6:53 PM

May 11 2023

hselasky added a comment to D32504: kern/intr: remove "irq" from kernel event API.

Adding Drew, due to changing set affinity for IRQ vectors. Any comments?

May 11 2023, 9:01 AM
hselasky added a reviewer for D32504: kern/intr: remove "irq" from kernel event API: gallatin.
May 11 2023, 9:01 AM
hselasky added a comment to D32504: kern/intr: remove "irq" from kernel event API.

Can you rebase this patch?

May 11 2023, 8:58 AM

May 10 2023

hselasky added inline comments to D40028: linuxkpi: Handle direct-mapped addresses in linux_free_kmem().
May 10 2023, 2:08 PM
hselasky added a comment to D40028: linuxkpi: Handle direct-mapped addresses in linux_free_kmem().

@markj: How did you come to that conclusion? On amd64 DMAP_MAX_ADDRESS is KV4ADDR(DMPML4I + NDMPML4E, 0, 0, 0) = 0xfffff80000000000 + NDMPML4E*0x8000000000. On arm64 it is 0xffffff0000000000UL.

May 10 2023, 2:07 PM
hselasky added a comment to D40028: linuxkpi: Handle direct-mapped addresses in linux_free_kmem().

Could you figure out if VM_MAX_KERNEL_ADDRESS is inclusive or exclusive.

May 10 2023, 2:03 PM
hselasky added inline comments to D40028: linuxkpi: Handle direct-mapped addresses in linux_free_kmem().
May 10 2023, 1:57 PM
hselasky updated subscribers of D40028: linuxkpi: Handle direct-mapped addresses in linux_free_kmem().
sys/amd64/compile/GENERIC/machine/param.h:#define	INKERNEL(va) (((va) >= DMAP_MIN_ADDRESS && (va) < DMAP_MAX_ADDRESS) \
sys/amd64/compile/GENERIC/machine/vmparam.h:#define	DMAP_MAX_ADDRESS	KV4ADDR(DMPML4I + NDMPML4E, 0, 0, 0)
sys/amd64/compile/GENERIC/assym.inc:#define	DMAP_MAX_ADDRESS	0xfffffc0000000000
sys/amd64/include/param.h:#define	INKERNEL(va) (((va) >= DMAP_MIN_ADDRESS && (va) < DMAP_MAX_ADDRESS) \
sys/amd64/include/vmparam.h:#define	DMAP_MAX_ADDRESS	KV4ADDR(DMPML4I + NDMPML4E, 0, 0, 0)
sys/arm64/include/vmparam.h:#define	DMAP_MAX_ADDRESS	(0xffffff0000000000UL)
sys/arm64/include/vmparam.h:#define	DMAP_MAX_PHYSADDR	(dmap_phys_max)
sys/cddl/contrib/opensolaris/uts/common/sys/idmap.h:#define	IDMAP_MAX_DOOR_RPC		(256 * 1024)
sys/contrib/openzfs/include/os/freebsd/spl/sys/idmap.h:#define	IDMAP_MAX_DOOR_RPC		(256 * 1024)
sys/dev/hid/hidmap.h:#define	HIDMAP_MAX_MAPS	4
sys/powerpc/include/vmparam.h:#define	DMAP_MAX_ADDRESS	0xc007ffffffffffffUL
sys/powerpc/include/vmparam.h:#define	DMAP_MAX_ADDRESS	0xbfffffffUL
sys/riscv/include/vmparam.h:#define	DMAP_MAX_ADDRESS	(0xfffffff000000000UL)
sys/riscv/include/vmparam.h:#define	DMAP_MAX_PHYSADDR	(dmap_phys_max)
May 10 2023, 1:57 PM
hselasky added a comment to D32504: kern/intr: remove "irq" from kernel event API.

I can test this today, and report back. I think your change is OK. There may be different ways to enumerate interrupts, and passing a pointer may make more sense, for example software interrupts not connected to any specific hardware - right?

May 10 2023, 9:26 AM
hselasky requested changes to D40028: linuxkpi: Handle direct-mapped addresses in linux_free_kmem().
May 10 2023, 9:20 AM
hselasky added a comment to D40028: linuxkpi: Handle direct-mapped addresses in linux_free_kmem().

Two comments:

May 10 2023, 9:20 AM

May 4 2023

hselasky added a comment to D39770: uchcom: Try to fix upload to esp8266.

Ping.

May 4 2023, 8:26 AM

May 1 2023

hselasky committed rGd502d3fc72f1: opensm: Fix build with -Werror and -Wdate-time. (authored by freebsd_igalic.co).
opensm: Fix build with -Werror and -Wdate-time.
May 1 2023, 11:50 AM
hselasky committed rGa554ff467079: libmlx5: Add more ConnectX-6/7/8 HCA IDs to hca_table. (authored by hselasky).
libmlx5: Add more ConnectX-6/7/8 HCA IDs to hca_table.
May 1 2023, 11:50 AM

Apr 30 2023

hselasky committed rG699eed180783: mlx5: Don't give zero number of pages to the firmware. (authored by hselasky).
mlx5: Don't give zero number of pages to the firmware.
Apr 30 2023, 7:06 AM
hselasky committed rGe6f76b5b4d36: mlx5: Fix duplicate free of default flow rule in error case. (authored by hselasky).
mlx5: Fix duplicate free of default flow rule in error case.
Apr 30 2023, 7:05 AM
hselasky committed rG090e6cbc4d56: mlx5: Make mlx5_del_flow_rule() NULL safe. (authored by hselasky).
mlx5: Make mlx5_del_flow_rule() NULL safe.
Apr 30 2023, 7:05 AM
hselasky committed rG00e2c99eb73a: wsp: Add sysctl tunable for Z-Axis inversion (authored by wulf).
wsp: Add sysctl tunable for Z-Axis inversion
Apr 30 2023, 7:04 AM
hselasky committed rGfd7c07771f82: usb(4): Code refactoring as a pre-step for adding missing synchronization… (authored by hselasky).
usb(4): Code refactoring as a pre-step for adding missing synchronization…
Apr 30 2023, 7:04 AM
hselasky committed rGe7f8a67e1f88: uath(4): Fix incorrect byte-swapping and a buffer length check. (authored by hselasky).
uath(4): Fix incorrect byte-swapping and a buffer length check.
Apr 30 2023, 7:03 AM
hselasky committed rG517ccb7c8061: mlx4: purge EOL release compatibility (authored by ehem_freebsd_m5p.com).
mlx4: purge EOL release compatibility
Apr 30 2023, 7:00 AM
hselasky committed rG9529b980ed39: usb: tiny formatting nit (authored by imp).
usb: tiny formatting nit
Apr 30 2023, 7:00 AM
hselasky committed rG49012db42f3d: libc: Sorting is not needed when there are less than two elements (authored by hselasky).
libc: Sorting is not needed when there are less than two elements
Apr 30 2023, 7:00 AM
hselasky committed rGee5121192a77: libc: Add missing object size check to qsort_s(3) (authored by hselasky).
libc: Add missing object size check to qsort_s(3)
Apr 30 2023, 7:00 AM
hselasky committed rG9162793e44f0: mlx5: Remove unused debugfs node pointers. (authored by hselasky).
mlx5: Remove unused debugfs node pointers.
Apr 30 2023, 7:00 AM
hselasky committed rG4c002f0842e5: mlx5: Implement mlx5_core_modify_cq_by_mask(). (authored by hselasky).
mlx5: Implement mlx5_core_modify_cq_by_mask().
Apr 30 2023, 7:00 AM
hselasky committed rG3d052f97cef5: mlx5: Make MLX5_COMP_EQ_SIZE tunable. (authored by hselasky).
mlx5: Make MLX5_COMP_EQ_SIZE tunable.
Apr 30 2023, 7:00 AM
hselasky committed rGdecbf52b0b52: xhci: Rework 64-byte context support to avoid pointer abuse (authored by jrtc27).
xhci: Rework 64-byte context support to avoid pointer abuse
Apr 30 2023, 7:00 AM
hselasky committed rG0e81f07f3653: USB: adjust the Generic XHCI ACPI probe return value (authored by bz).
USB: adjust the Generic XHCI ACPI probe return value
Apr 30 2023, 7:00 AM