Page MenuHomeFreeBSD
Feed Advanced Search

Jun 19 2023

hselasky committed R11:b748369ff28d: sysutils/rshim-user-space: Update to version 2.0.9 (authored by hselasky).
sysutils/rshim-user-space: Update to version 2.0.9
Jun 19 2023, 7:26 AM

Jun 17 2023

hselasky accepted D40582: mlx4en(4): add missing newline to debug messages .

MFC after: 1 week

Jun 17 2023, 4:36 PM

Jun 16 2023

hselasky accepted D40448: Add generic ohci acpi driver.

Looks good. Did you remember the appropriate entries in sys/conf/files and sys/modules/usb/xxx ?

Jun 16 2023, 3:58 PM

Jun 12 2023

hselasky accepted D40486: LinuxKPI: cast jiffies_to_msecs() result.

I see now how Linux defines this macro / function. Sorry, my bad. I was just looking at the change itself, and wondering what happens to negative time differences ...

Jun 12 2023, 11:33 PM
hselasky added inline comments to D40486: LinuxKPI: cast jiffies_to_msecs() result.
Jun 12 2023, 2:28 PM

Jun 9 2023

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

Maybe add:
MPASS(ceil >= floor);

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

Looks good!

Jun 9 2023, 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.

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

Jun 7 2023

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

Are there any updates here?

Jun 7 2023, 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()

Jun 7 2023, 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.

Jun 7 2023, 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.

Jun 7 2023, 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().

Jun 7 2023, 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.

Jun 7 2023, 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.

Jun 7 2023, 3:17 PM
hselasky added a reviewer for D40467: ld(1): Correctly define .init_array and .fini_array for all platforms.: emaste.
Jun 7 2023, 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.

Jun 7 2023, 3:16 PM
hselasky requested review of D40467: ld(1): Correctly define .init_array and .fini_array for all platforms..
Jun 7 2023, 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 .

Jun 7 2023, 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.

Jun 7 2023, 1:22 PM
hselasky added inline comments to D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..
Jun 7 2023, 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.

Jun 7 2023, 1:15 PM
hselasky updated the summary of D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..
Jun 7 2023, 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?

Jun 7 2023, 1:01 PM
hselasky requested review of D40464: Use proper pointer type when initialising and uninitialising mutexes..
Jun 7 2023, 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().

Jun 7 2023, 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 .

Jun 7 2023, 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.

Jun 7 2023, 12:37 PM
hselasky requested review of D40463: kernel: Use the compiler supported constructor and destructor attributes to register sysinits..
Jun 7 2023, 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).

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

Jun 5 2023

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

Jun 4 2023

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

Jun 1 2023

hselasky accepted D40173: LinuxKPI: add devm_ioremap().

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

Jun 1 2023, 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?

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

Tab after #define .

Jun 1 2023, 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?

Jun 1 2023, 8:33 AM

May 30 2023

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

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

May 30 2023, 7:51 PM

May 27 2023

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

May 23 2023

hselasky added inline comments to D40190: build: Fix for sporadic build failures..
May 23 2023, 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.

May 23 2023, 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).

May 23 2023, 7:04 AM
hselasky added inline comments to D40190: build: Fix for sporadic build failures..
May 23 2023, 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 😉

May 23 2023, 6:38 AM

May 22 2023

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.

May 22 2023, 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.".
May 22 2023, 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."
May 22 2023, 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.

May 22 2023, 8:39 AM

May 21 2023

hselasky added inline comments to D40193: kernel: Add automation to sort all constructors and destructors at compile time..
May 21 2023, 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...

May 21 2023, 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.

May 21 2023, 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?

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

Looks good!

May 21 2023, 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 :)

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

May 20 2023

hselasky added inline comments to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
May 20 2023, 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...

May 20 2023, 8:10 AM

May 19 2023

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
May 19 2023, 10:30 PM
hselasky added inline comments to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
May 19 2023, 10:11 PM
hselasky requested changes to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
May 19 2023, 3:29 PM
hselasky added inline comments to D39916: mi_startup: sort sysinit array using qsort instead of bubble sort.
May 19 2023, 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
May 19 2023, 7:55 AM

May 18 2023

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.

May 18 2023, 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

May 18 2023, 5:59 AM

May 17 2023

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

Please don't implement integers like floating point!

May 17 2023, 7:07 AM

May 13 2023

hselasky added a reviewer for D40084: LinuxKPI: fix WRITE_ONCE(): brooks.
May 13 2023, 6:53 PM
hselasky added inline comments to D40084: LinuxKPI: fix WRITE_ONCE().
May 13 2023, 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