Page MenuHomeFreeBSD

mmel (Michal Meloun)
User

Projects

User Details

User Since
Feb 3 2015, 4:54 AM (598 w, 5 h)

Recent Activity

Today

mmel added inline comments to D57176: clk: Initial support for the SpacemiT K1 clock control units.
Tue, Jul 21, 6:47 AM

Wed, Jul 15

mmel added a comment to rG8ffb400bfd64: rk_gpio: defer level-IRQ EOI until source line is driven low.

Firstly, I must apologize. on my first response I didn't re-read the Rockchip TRM and instead relied on my own memory, which turned out to be a bad idea.

Wed, Jul 15, 8:58 AM

Tue, Jul 14

mmel added a comment to D58212: bsd.cpu.mk: Add a workaround for erratum 843419.
In D58212#1335515, @bz wrote:

I think the only thing I'd love to see is to tell users in the commit message how to apply this as it seems this needs to be done manually.

Tue, Jul 14, 8:27 AM
mmel accepted D58212: bsd.cpu.mk: Add a workaround for erratum 843419.
Tue, Jul 14, 7:34 AM

Mon, Jul 13

mmel committed rG920518cf2e75: FDT: implement fdt_ether_get_addr() (authored by mmel).
FDT: implement fdt_ether_get_addr()
Mon, Jul 13, 8:37 AM
mmel closed D58104: FDT: implement fdt_ether_get_addr().
Mon, Jul 13, 8:37 AM

Sun, Jul 12

mmel accepted D58182: rockchip: fix stack overflow in rk8xx_rtc.
Sun, Jul 12, 4:37 AM

Fri, Jul 10

mmel requested changes to D57176: clk: Initial support for the SpacemiT K1 clock control units.

It would be significantly better to use predefined classes for fixed rate, fixed divider, gates or so .

Fri, Jul 10, 7:35 AM
mmel added a comment to D58105: busdma, arm64: implement support for bus view of DMA address space.

At this stage, I do not want to introduce tables or hard-coded segment mappings
and/or limits for DMA memory allocation.
For flexibility, the primary interface should be based on functions. A default
implementation can always be added later if a sufficiently robust common case
is identified.

Fri, Jul 10, 7:04 AM

Thu, Jul 9

mmel added a reviewer for D58104: FDT: implement fdt_ether_get_addr(): bz.
Thu, Jul 9, 9:32 AM
mmel removed a reviewer for D58104: FDT: implement fdt_ether_get_addr(): bz.
Thu, Jul 9, 8:43 AM
mmel updated the diff for D58104: FDT: implement fdt_ether_get_addr().

remove redundant empty line

Thu, Jul 9, 8:42 AM
mmel retitled D58104: FDT: implement fdt_ether_get_addr() from FDT: implement fdt_ether_get_macaddr() to FDT: implement fdt_ether_get_addr().
Thu, Jul 9, 8:40 AM
mmel updated the diff for D58104: FDT: implement fdt_ether_get_addr().

update commit log

Thu, Jul 9, 8:24 AM
mmel updated the diff for D58104: FDT: implement fdt_ether_get_addr().

Rename function and fix cut&paste error

Thu, Jul 9, 8:22 AM

Wed, Jul 8

mmel added a comment to D58105: busdma, arm64: implement support for bus view of DMA address space.

That's a very good and valid question.
Combining the fact that the 'dma-ranges' DT property (which this change targets) can describe multiple discontinuous ranges and that PCI(e) mappings further depend on transaction types quickly opens a very large Pandora's box. Add chained DMA tags and the IOMMU into the mix, and the problem becomes even more complex.
The honest answer is: I don't know how to handle this in full generality right now.
Today, it remains the driver's responsibility to work with CPU addresses. Modernising busdma would require a significant amount of work, and I'm not confident I have the energy or deep enough knowledge to tackle it all at once.
This minimal implementation is intended only to enable RPi5 support for now, nothing more yet.

Wed, Jul 8, 2:36 PM
mmel added reviewers for D58106: ofw_pcib: add support for reading 'dma-ranges' property: adrian, arm64.
Wed, Jul 8, 12:06 PM
mmel added a reviewer for D58108: cgem: add support for ethernet on RP1 chip found on Raspberry Pi 5: arm64.
Wed, Jul 8, 11:48 AM
mmel requested review of D58108: cgem: add support for ethernet on RP1 chip found on Raspberry Pi 5.
Wed, Jul 8, 11:47 AM
mmel added a reviewer for D58107: simplebus: add support for reading 'dma-ranges' property: arm64.
Wed, Jul 8, 11:37 AM
mmel requested review of D58107: simplebus: add support for reading 'dma-ranges' property.
Wed, Jul 8, 11:37 AM
mmel requested review of D58106: ofw_pcib: add support for reading 'dma-ranges' property.
Wed, Jul 8, 11:34 AM
mmel requested review of D58105: busdma, arm64: implement support for bus view of DMA address space.
Wed, Jul 8, 11:32 AM
mmel added reviewers for D58104: FDT: implement fdt_ether_get_addr(): manu, adrian, arm64.
Wed, Jul 8, 11:30 AM
mmel requested review of D58104: FDT: implement fdt_ether_get_addr().
Wed, Jul 8, 11:29 AM
mmel added reviewers for D58103: FDT, clk_fixed: add gated-fixed-clock support and deferred initialization: manu, arm64.
Wed, Jul 8, 11:23 AM
mmel requested review of D58103: FDT, clk_fixed: add gated-fixed-clock support and deferred initialization.
Wed, Jul 8, 11:22 AM
mmel added reviewers for D58102: pci_dw: add support for 64-bit sized ATU windows: arm64, ARM.
Wed, Jul 8, 11:19 AM
mmel requested review of D58102: pci_dw: add support for 64-bit sized ATU windows.
Wed, Jul 8, 11:15 AM

Thu, Jun 25

mmel requested changes to D57732: arm64: mediatek: add initial MT7622/Banana Pi R64 support.

All of these clock drivers share too much common code. Firstly, why don't you subclass these from the base class in mdtk_clk.c? If that's not sufficient, why don't you use a new base class that implements all this glue and subclass it?

Thu, Jun 25, 10:54 AM · arm64

Wed, Jun 24

mmel accepted D57795: hym8563: Fix 32-bit powerpc build.

I would much rather have PowerPC adapt the clock, reset and other frameworks. After all, PowerPC .dts files use them, so I don't see a single reason why we could not include them in the PowerPC build.
The assumption that FDT means that all these frameworks would make the world much simpler.

Wed, Jun 24, 11:20 AM

May 27 2026

mmel added a comment to D55947: arm64: mte: handle synchronous tag check faults.

Aliasing SEGV_PKUERR and SEGV_MTEAERR breaks Qt6 (at least Qt6-base), as it has both in one switch. It seems Linux takes PKUERR as arch-independent.

May 27 2026, 4:06 PM

Apr 27 2026

mmel accepted D56651: if_awg: Add missing awg_poll() prototype.
Apr 27 2026, 5:35 AM

Apr 15 2026

mmel committed rG1dddb580f950: arm64: Define the .iplt section placement. (authored by mmel).
arm64: Define the .iplt section placement.
Apr 15 2026, 4:04 PM
mmel closed D56403: arm64: Define the .iplt section placement..
Apr 15 2026, 4:03 PM
mmel requested review of D56403: arm64: Define the .iplt section placement..
Apr 15 2026, 9:45 AM

Mar 21 2026

mmel accepted D55907: clk/broadcom: Add CPRMAN clkdev backend and peripheral clock node.

LGTM

Mar 21 2026, 4:21 PM

Mar 20 2026

mmel requested changes to D55907: clk/broadcom: Add CPRMAN clkdev backend and peripheral clock node.
Mar 20 2026, 8:17 AM

Feb 22 2026

mmel committed rGd2dea8b46a8a: arm: Add EARLY_PRINTF for ns8250 on arm/aarch64 platforms. (authored by mmel).
arm: Add EARLY_PRINTF for ns8250 on arm/aarch64 platforms.
Feb 22 2026, 9:21 PM
mmel committed rGdc9a7b15b78b: HYM8563: Add HYM563 RTC driver to common config. (authored by mmel).
HYM8563: Add HYM563 RTC driver to common config.
Feb 22 2026, 5:55 PM
mmel committed rG9de43130f989: regulator_fixed: add support for 'gpios' property (authored by mmel).
regulator_fixed: add support for 'gpios' property
Feb 22 2026, 5:55 PM
mmel committed rG92c66dc5f872: pci_dw: improve pci_dw (authored by mmel).
pci_dw: improve pci_dw
Feb 22 2026, 5:55 PM
mmel committed rGf40ed4881e25: fdt,simple_mfd: Map memory as shareable. (authored by mmel).
fdt,simple_mfd: Map memory as shareable.
Feb 22 2026, 5:55 PM
mmel committed rG67fc0ff33d20: dtb: generate .DTB for some RK3588 based boards. (authored by mmel).
dtb: generate .DTB for some RK3588 based boards.
Feb 22 2026, 5:55 PM
mmel committed rG2ade7208068d: TCA64xx: Convert mutex to SX lock. (authored by mmel).
TCA64xx: Convert mutex to SX lock.
Feb 22 2026, 5:55 PM
mmel committed rG4840558e5219: OFW: Improve OFW_CPU. (authored by mmel).
OFW: Improve OFW_CPU.
Feb 22 2026, 5:54 PM
mmel committed rG6b77d34f4491: HYM8563: Add support for clock output. (authored by mmel).
HYM8563: Add support for clock output.
Feb 22 2026, 5:54 PM

Feb 20 2026

mmel accepted D55388: qoriq: fix spelling in device_set_desc().
Feb 20 2026, 9:45 AM

Feb 13 2026

mmel accepted D55268: elf_common.h: Add some AArch32 relocations.
Feb 13 2026, 6:26 AM

Feb 12 2026

mmel accepted D55255: libsys/arm: include ARM EABI unwind bits into libsys.

I'm not sure if anyone knows the exact, precise response. ARMv7 unwinding is pure mesh. All of my attempts to understand it ended with me turning off the computer and opening a bottle of good wine.
I think it's possible to write a backtrace that doesn't use it, but I also think it's used by the unwinder library, which is also used for backtraces.
My motivation was to be careful about security. If the executable implements real unwinder personalities, we should also use it for libsys

Feb 12 2026, 11:19 AM
mmel added a comment to D55255: libsys/arm: include ARM EABI unwind bits into libsys.

I understand that libsys might be the last frame.
However, this also means that the unwinder is supposed to call the function aeabi_unwind_cpp_pr0, found in the .ARM.exidx section of the corresponding object.
In your case, this is
buildin_trap().
Is this right?

Feb 12 2026, 9:10 AM
mmel added a comment to D55255: libsys/arm: include ARM EABI unwind bits into libsys.

Sorry for my poorly formulated question.
The hidden but not weak aeabi_unwind_cpp_pr* symbols means that we don't expect or want to process exceptions generated in libsys because the unwinder always ends in an abort/trap. So why don't we simply compile libsys with -fno-exceptions?

Feb 12 2026, 8:32 AM
mmel added a comment to D55255: libsys/arm: include ARM EABI unwind bits into libsys.

Should not these symbols also be marked as weak? Hidden symbols are not 'overloaded' in the same library. kib, jrtc27 any comment about this, please?

Feb 12 2026, 5:48 AM

Feb 5 2026

mmel closed D53993: ARM GICv3: Add support for non-coherent and/or bus address range limited DMA..

It was should be closed with 62e1227219f2f79a2ed7a672149dc3d774d25dd4, sorry.

Feb 5 2026, 5:07 PM

Feb 1 2026

mmel requested changes to D55013: Support for MT7531 Switch Driver.

At first look only:

    • the '#ifndef MT7531' is clearly incompatible with GENERIC kernel.
  • the defined FDT bindings between the NIC and the switch are not followed. Instead, a "brutal" hack (fdt_find_ethernet_prop_switch) is used.
  • the eqos driver changes is improper. All of these are should be in attached the phy driver.
Feb 1 2026, 9:57 AM
mmel committed rGd78cbf483fe7: arm: Implement kernel ifunc (authored by mmel).
arm: Implement kernel ifunc
Feb 1 2026, 8:18 AM
mmel closed D54970: arm: Implement kernel IFUNC.
Feb 1 2026, 8:18 AM

Jan 30 2026

mmel added inline comments to D54970: arm: Implement kernel IFUNC.
Jan 30 2026, 8:13 PM
mmel requested review of D54970: arm: Implement kernel IFUNC.
Jan 30 2026, 3:42 PM

Jan 3 2026

mmel added inline comments to D54475: nvme: Be more correct in busdma usage.
Jan 3 2026, 7:28 PM

Dec 3 2025

mmel committed rGef8a0ef2aa97: ofw: Fix 64-bit arithmetic in cpufreq_dt.c. (authored by mmel).
ofw: Fix 64-bit arithmetic in cpufreq_dt.c.
Dec 3 2025, 6:52 AM
mmel committed rG3e7d3361dd24: arm64: Add missing dtrace_isa.c (authored by mmel).
arm64: Add missing dtrace_isa.c
Dec 3 2025, 6:52 AM
mmel committed rG62e1227219f2: ARM GICv3: Add support for non-coherent and/or bus address range limited DMA. (authored by mmel).
ARM GICv3: Add support for non-coherent and/or bus address range limited DMA.
Dec 3 2025, 6:52 AM
mmel committed rGd14a985898ee: ofw: Add ofw_bus_is_machine_compat(). (authored by mmel).
ofw: Add ofw_bus_is_machine_compat().
Dec 3 2025, 6:52 AM
mmel closed D53992: ofw: Add ofw_bus_is_machine_compat().
Dec 3 2025, 6:52 AM

Nov 30 2025

mmel added inline comments to D53993: ARM GICv3: Add support for non-coherent and/or bus address range limited DMA..
Nov 30 2025, 7:24 PM
mmel added inline comments to D53993: ARM GICv3: Add support for non-coherent and/or bus address range limited DMA..
Nov 30 2025, 7:16 PM
mmel updated the diff for D53992: ofw: Add ofw_bus_is_machine_compat().

Use correct diff

Nov 30 2025, 9:00 AM
mmel updated the diff for D53993: ARM GICv3: Add support for non-coherent and/or bus address range limited DMA..

Use correct diff

Nov 30 2025, 8:59 AM
mmel requested review of D53993: ARM GICv3: Add support for non-coherent and/or bus address range limited DMA..
Nov 30 2025, 8:43 AM
mmel requested review of D53992: ofw: Add ofw_bus_is_machine_compat().
Nov 30 2025, 8:41 AM

Nov 24 2025

mmel added a comment to D53891: Fixes for dreaded assert in jemalloc page allocator AKA mmap(MAP_ANON) providing non-zeroed pages.
In D53891#1231630, @alc wrote:

Confirmed, this part is enough.

This makes sense to me. Suppose that the object has OBJ_ONEMAPPING set. On a memory-starved machine, we could have paged out all of the object's pages, so that the resident count would be zero. Then, if a hole is punched in a mapping to this object, then vm_map_entry_delete() will call vm_object_page_remove(), which will fail to release the swap space.

@mmel you have been testing on ARMv7, correct?

yes, and also on arm32 jail

Nov 24 2025, 6:43 PM
mmel added a comment to D53891: Fixes for dreaded assert in jemalloc page allocator AKA mmap(MAP_ANON) providing non-zeroed pages.

Confirmed, this part is enough.

Nov 24 2025, 5:28 PM
mmel accepted D53891: Fixes for dreaded assert in jemalloc page allocator AKA mmap(MAP_ANON) providing non-zeroed pages.

After another day of extensive testing, I can confirm that everything is working properly.

Nov 24 2025, 8:08 AM

Nov 4 2025

mmel accepted D53546: mmc_fdt: handle broken-cd property.
Nov 4 2025, 8:01 PM

Sep 30 2025

mmel accepted D52783: gpioc: fix race in ioctl(GPIOCONFIGEVENTS).
Sep 30 2025, 10:13 AM
mmel added inline comments to D52783: gpioc: fix race in ioctl(GPIOCONFIGEVENTS).
Sep 30 2025, 7:52 AM
mmel added inline comments to D52783: gpioc: fix race in ioctl(GPIOCONFIGEVENTS).
Sep 30 2025, 7:23 AM
mmel added inline comments to D52783: gpioc: fix race in ioctl(GPIOCONFIGEVENTS).
Sep 30 2025, 6:43 AM

Sep 17 2025

mmel accepted D52309: rk_tsadc: use tsadc_temp_to_raw for shutdown_temp.

I apologize, I forgot about that. I thought I had already completed all phabricator tasks.

Sep 17 2025, 10:05 AM

Aug 29 2025

mmel added a comment to D52197: gpio: implement bus_setup_intr and bus_teardown_intr.

These are needed for cross-tree allocation of interrupts (and probably also pins). For example, in FDT, a device from another tree path, typically an I2C or SPI, may have its IRQ pin connected to GPIO.
A driver from another tree path can therefore use an GPIO based interrupt. These allocations are processed by the controller itself (due to FDT references), but by gpiobus.
@andrew is right, at least (de)activate_resource is necessary, but I'm not sure yet whether other resource list oriented methods are also needed.

Aug 29 2025, 7:28 AM

Aug 28 2025

mmel added a comment to D52197: gpio: implement bus_setup_intr and bus_teardown_intr.

I just found a similar problem with rockchip gpio. Implementing interrupt methods is not enough, we also need all the methods for resources. This led me to the idea that we could create a new class in which all these methods (interrupts and resources) would be implemented (by using bus_generic_<foo>), and then subclass all bus-like drivers from it. It's clean, simple, and saves a lot of lines...
@jhb, do you have any comments on this?

Aug 28 2025, 8:00 AM

Aug 27 2025

mmel accepted D51932: gpio: make gpioc a child of gpiobus.
Aug 27 2025, 4:47 AM
mmel accepted D52172: gpio: add GPIO_GET_PIN_LIST.
Aug 27 2025, 4:27 AM

Aug 26 2025

mmel added a comment to D51932: gpio: make gpioc a child of gpiobus.

We can introduce a new method, such as

METHOD  get_pin_list{
 device_t dev;
 device_t bus;
 uint32_t *pin_list;
};

which fills a pre-allocated array with the controller pin numbers, with a default implementation based on GPIO_PIN_MAX() (assuming it returns the number of controller pins - 1) and sequential numbering starting with pin number 0.
This way, we can obtain a list of pins for all 'standard' controllers without any changes to their code, but we retain the option to modify it for 'more creative' ones.

Consider this only as a first quick attempt to solve this puzzle.

That sounds good :)
Although I don't see why we would need the gpiobus dev.

Right, it's not necessary. Please ignore it.

Aug 26 2025, 4:33 PM
mmel accepted D51931: gpiobus: add pin_config_32 and pin_access_32.
Aug 26 2025, 4:08 PM

Aug 25 2025

mmel added a comment to D51932: gpio: make gpioc a child of gpiobus.

We can introduce a new method, such as

METHOD  get_pin_list{
 device_t dev;
 device_t bus;
 uint32_t *pin_list;
};

which fills a pre-allocated array with the controller pin numbers, with a default implementation based on GPIO_PIN_MAX() (assuming it returns the number of controller pins - 1) and sequential numbering starting with pin number 0.
This way, we can obtain a list of pins for all 'standard' controllers without any changes to their code, but we retain the option to modify it for 'more creative' ones.

Aug 25 2025, 6:40 AM
mmel added a comment to D51931: gpiobus: add pin_config_32 and pin_access_32.

That seems fine to me. Unfortunately, I just found that config32 has num_pins as an argument, so it may not work on all 32 bits :( I didn't notice that before, sorry.

Aug 25 2025, 6:17 AM

Aug 21 2025

mmel added a comment to D51931: gpiobus: add pin_config_32 and pin_access_32.

Gpiobus should convert these virtual pin numbers to real ones (gpio controller) using IVARS and can assume absolutely nothing about the ordering/sequencing of these translated numbers.

Yeah I missed the ordering part, like the other review. I guess that means we can't check if they're all in the ivars before passing the call to the controller. All we can do in that case is make sure that devi->npins >= 32?

IMHO no, we should check if they are all in ivars, sequentially, starting with first_pin. See later.

The controller (i.e. using gpio ifc) access_32/configure_32 expects to work on 32/npins consecutive pin numbers. This means that the corresponding gpiobus methods must only work on slaves with 32/npins or more consecutive pin mappings.

Aug 21 2025, 3:04 PM
mmel added inline comments to D51932: gpio: make gpioc a child of gpiobus.
Aug 21 2025, 2:29 PM
mmel added inline comments to D51932: gpio: make gpioc a child of gpiobus.
Aug 21 2025, 10:21 AM
mmel added a comment to D51931: gpiobus: add pin_config_32 and pin_access_32.

Sorry, but this is making less and less sense to me.

Aug 21 2025, 9:56 AM
mmel added a comment to D47919: Add StarFive JH7110's PCIE controller driver.

Theoretically, every interrupt controller should implement all 3 of these functions.

Aug 21 2025, 8:31 AM

Aug 20 2025

mmel accepted D51931: gpiobus: add pin_config_32 and pin_access_32.

Oups, my bad. I didn't realize that these are exposed by the ioct().
Only, Could you please check if the entire pin range
is within bound?

Aug 20 2025, 7:38 AM

Aug 18 2025

mmel added a comment to D51932: gpio: make gpioc a child of gpiobus.

I like this step. But please give me one more day to re-analyze it.

Aug 18 2025, 6:36 AM
mmel added a comment to D51931: gpiobus: add pin_config_32 and pin_access_32.

pin_config_32 doesn't make sense to me at the moment. Ian created it at a time when we could only configure the direction of pins and only for specific hardware (if I remember correctly, iMX51). Now there is no chance that it could be implemented for current hardware and pin flags. Configuration settings are almost never atomic for a single pin, let alone for multiple pins.

Aug 18 2025, 6:27 AM

Aug 11 2025

mmel accepted D51578: gpio: remove gpiobus_attach_bus.

Thanks for patience, I know how much frustrating can be these change requests based on "subjective" nuances .

Aug 11 2025, 5:43 AM

Aug 10 2025

mmel added a comment to D51578: gpio: remove gpiobus_attach_bus.

I apologize. I should not write reviews when I am short on time.
I wanted to say that I fully agree with jhb. The gpiobus_attach_bus() function is too limited to be generally useful.
That is why I vote to replace it with the gpiobus_add_bus() function and explicit bus_attach_children().

Aug 10 2025, 6:31 AM

Aug 8 2025

mmel added a comment to D51578: gpio: remove gpiobus_attach_bus.

Sorry for the delayed response, I've very busy in real life again.

Aug 8 2025, 5:56 AM

Aug 7 2025

mmel committed rGe4bfe8e96615: arm: Generate the kernel.bin file in zImage format. (authored by mmel).
arm: Generate the kernel.bin file in zImage format.
Aug 7 2025, 4:45 PM