Page MenuHomeFreeBSD

mmel (Michal Meloun)
User

Projects

User Details

User Since
Feb 3 2015, 4:54 AM (609 w, 2 d)

Recent Activity

Sun, Oct 4

mmel added a comment to D46723: update TI clocks.

imho, this is a complete mess with no concept.
At the very least, why do you need these tables at all? What's missing from the DT?

Sun, Oct 4, 7:49 AM
mmel added a comment to D59124: arm/ti: attach EDMA3 against the split device tree binding.

I'm sorry, but how does this work? There are multiple instances of 'ti_edma3tc' in the device tree (DT), so which one is stored in the single global softc?

Sun, Oct 4, 7:15 AM · ARM

Fri, Oct 2

mmel added a comment to D60206: TI AM335x: ti_sysc enable/disable specific clocks.

The clock property is located in the parent node/driver because the parent node provides this clock for all its children. The children have no individual gate functionality, meaning the parent driver must enable the clock for them.

Fri, Oct 2, 10:32 AM

Thu, Oct 1

mmel added a reviewer for D46703: Add AM335X config file: mmel.
Thu, Oct 1, 5:23 PM · ARM
mmel accepted D60201: TI AM335x: ti_sysc simplebus updates.

Sorry again. Would it not be better to connect the TI back to the tinderbox/universe?

Thu, Oct 1, 4:32 PM
mmel accepted D60180: TI AM335x: am335x_pwmss fix.

oups, my mistake, sorry

Thu, Oct 1, 4:59 AM

Tue, Sep 29

mmel accepted D59191: dwc(4): support Synopsys IP version 4 and 5.

perfect, thanks.

Tue, Sep 29, 5:29 PM
mmel added a comment to D58812: arm64: mediatek: add initial MT7622/Banana Pi R64 support (revised).
  • Added simplebus_driver as a base class of all mt_clk based drivers.

Why to all? What about all the other objections?

Tue, Sep 29, 2:36 PM · arm64
mmel added a comment to D59191: dwc(4): support Synopsys IP version 4 and 5.

The IFCAP_VLAN_MTU indicates that the hardware can receive and transmit packets of up to 1504 bytes in length, so nothing more is necessary.
So, the only thing missing is the IPv6 CSUM (but it is advertised)

Tue, Sep 29, 1:35 PM

Mon, Sep 28

mmel requested changes to D60066: sff: add a shared EEPROM read helper and build sff(4) as a module.

This is another gross hack. In theory, we could add read and write functions to this device to access EEPROM context. However, publishing raw EEPROM context outside of this device context would break all layering rules and is therefore nonsense.

Mon, Sep 28, 8:25 AM
mmel added a comment to D60060: iicmux: do not walk a bogus OFW node on systems described by ACPI.

This is pure hack, imho. The ACPI mux, buses and their devices must be enumerated in exactly the same way as in the FDT case.

Mon, Sep 28, 6:18 AM · drivers, ARM

Sat, Sep 26

mmel added a comment to D59191: dwc(4): support Synopsys IP version 4 and 5.

The driver advertises the following: IFCAP_VLAN_MTU, IFCAP_HWCSUM and IFCAP_HWCSUM_IPV6. What happens if the user enables one of these? I only see that IFCAP_RXCSUM is implemented, albeit probably only partially. In all other cases, the driver either emits an invalid packet, is unable to receive a valid packet, or it panics.

Sat, Sep 26, 11:03 AM
mmel committed rGe2d42b0e6cc2: ofw: Convert simplebus to device_get_softc_class(). (authored by mmel).
ofw: Convert simplebus to device_get_softc_class().
Sat, Sep 26, 8:31 AM
mmel committed rG12c300412946: dpaa2: Don't return simplebus devinfo for a non-simplebus child (authored by mmel).
dpaa2: Don't return simplebus devinfo for a non-simplebus child
Sat, Sep 26, 8:31 AM
mmel closed D59837: ofw: Convert simplebus to device_get_softc_class()..
Sat, Sep 26, 8:31 AM
mmel closed D59836: dpaa2: Don't return simplebus devinfo for a non-simplebus child.
Sat, Sep 26, 8:31 AM

Mon, Sep 21

mmel accepted D59813: riscv intc: convert to a bus.
Mon, Sep 21, 7:52 PM
mmel added a comment to D59650: trap_cfi(9): introduce arm implementation.

I forgot about it yesterday. At worst, you can use .cfi_escape + DW_CFA_val_expression to select proper LR and SP directly in debugger.

Mon, Sep 21, 6:37 AM

Sun, Sep 20

mmel added a comment to D59813: riscv intc: convert to a bus.

You're definitely right, from an INTRNG point of view. Thanks.

Sun, Sep 20, 8:40 AM
mmel added a comment to D59650: trap_cfi(9): introduce arm implementation.

Of course, I don't know anything about annotating the trap frame.
However, adding instructions to the absolutely hot path(s) in the system to fix the debugger doesn't seem like a good idea to me.

Sun, Sep 20, 8:10 AM

Sat, Sep 19

mmel committed rG4680109c6bc4: ARMADA 8040: Adapt ICU driver to updated device tree. (authored by mmel).
ARMADA 8040: Adapt ICU driver to updated device tree.
Sat, Sep 19, 8:52 AM
mmel added reviewers for D59837: ofw: Convert simplebus to device_get_softc_class().: adrian, jhibbits, dsl.
Sat, Sep 19, 8:17 AM
mmel added a reviewer for D59836: dpaa2: Don't return simplebus devinfo for a non-simplebus child: dsl.
Sat, Sep 19, 8:14 AM
mmel requested review of D59837: ofw: Convert simplebus to device_get_softc_class()..
Sat, Sep 19, 8:04 AM
mmel requested review of D59836: dpaa2: Don't return simplebus devinfo for a non-simplebus child.
Sat, Sep 19, 8:04 AM

Wed, Sep 16

mmel added inline comments to D59191: dwc(4): support Synopsys IP version 4 and 5.
Wed, Sep 16, 9:35 AM
mmel added a comment to D59191: dwc(4): support Synopsys IP version 4 and 5.

I still have a personal problem with ops. It looks too fine-grained to me, but this can be solved with the following commit if we find it necessary.

Wed, Sep 16, 9:14 AM

Fri, Sep 11

mmel committed rG477c594d9063: kobj: allow multiple inheritance with per-class softc (authored by mmel).
kobj: allow multiple inheritance with per-class softc
Fri, Sep 11, 2:10 PM
mmel closed D59115: kobj: allow multiple inheritance with per-class softc.
Fri, Sep 11, 2:10 PM

Sep 6 2026

mmel added inline comments to D59115: kobj: allow multiple inheritance with per-class softc.
Sep 6 2026, 5:47 PM
mmel updated the diff for D59115: kobj: allow multiple inheritance with per-class softc.

Address objections.

Sep 6 2026, 5:39 PM

Sep 1 2026

mmel updated the summary of D59115: kobj: allow multiple inheritance with per-class softc.
Sep 1 2026, 10:00 AM
mmel updated the summary of D59115: kobj: allow multiple inheritance with per-class softc.
Sep 1 2026, 9:59 AM
mmel updated the diff for D59115: kobj: allow multiple inheritance with per-class softc.
  • Rename the functions as agreed during the discussion.
  • Precompute the total size of class data.
  • Implement support for nested classes with optimisation for the most common cases.
Sep 1 2026, 9:51 AM

Aug 30 2026

mmel added a comment to D59264: vt_simplefb: support armv7 and U-Boot-placed framebuffer nodes.

Another thing: Wouldn't it be much cleaner to extend the implementation of pmap_mapdev_attr() for early boot phase of armv7? subr_devmap.c looks ready for this job.

Aug 30 2026, 7:00 AM · ARM, drivers
mmel added a comment to D59264: vt_simplefb: support armv7 and U-Boot-placed framebuffer nodes.

I'm not thrilled with this solution.
The standard pre-pmap_bootstrap() KVA is 128 MB, including:

  • kernel text/data/bss (section-mapped from KERNBASE);
  • early page tables (kern_pt1, kern_pt2tab and initial L2 pages);
  • whatever initarm() takes (dpcpu, stacks, msgbuf, etc.).
Aug 30 2026, 6:32 AM · ARM, drivers

Aug 27 2026

mmel added a comment to D59191: dwc(4): support Synopsys IP version 4 and 5.
In D59191#1358240, @br wrote:

Eqos driver does expect that the memory returned is non-cached, otherwise it would be incorrect to flush all the descriptors at once. Bus_dma could not figure out by itself which descriptor to flush if that is fully transparent to driver.

The EQOS driver expects coherent memory, not uncachable memory. But yes, on ARM, coherent memory can be realised as uncacheable if the device sits on a non-coherent bus, or as normal cacheable memory if the device sits on a DMA coherent bus (i.e. ACE). However, this decision lies with the busdma layer. The driver may request memory with a given characteristic, and the busdma layer is responsible for fulfilling that request.

If we must use uncached descriptors for all DMAs, then it is limitation, because having descriptors to reside in cached memory could be the more efficient and faster way to deal with them on heavy usage. That would require individual flushes.

There is no way to make cached memory coherent for a device that is not on a coherent bus. The golden rule is that the CPU can load a cache line or flush it at any time, irrespective of the executed code. This is the result of SMP, speculative reads and various streaming optimisations. Forget about this. Ask Adrian; MIPS gave us a big lesson in this area.

As descriptors operate on coherent memory, bus_dma_sync() can access them at any time without issue. Using a shorter bus_dma_sync() per descriptor doesn't make sense because bus_dma_sync() on coherent memory is a pure read or write barrier, nothing more.

For memory barries don't we prefer to use macroses like mb() instead of calling to busdma sync routines?
Current dwc(4) driver does that instead of busdma_sync. It makes it easier to read the code, and probably a bit faster for CPU.

bus_dma_sync() should be used here. However, we do not yet have a proper operation for this, so rmb()/wmb() can be tolerated.

Aug 27 2026, 12:55 PM
mmel added a comment to D59191: dwc(4): support Synopsys IP version 4 and 5.
In D59191#1357815, @br wrote:

I have spent a few days on eqos(4) but did not get it working.

I also think that rqos should be merged back into dwc.

Aug 27 2026, 9:01 AM
mmel added a comment to D59188: mdio: Add new mdio FDT driver.

I see all this, but I'm not able to understand how it should work.

Aug 27 2026, 8:05 AM

Aug 26 2026

mmel added a comment to D59115: kobj: allow multiple inheritance with per-class softc.

I'm also fine with it, thanks. Is the device_get_softc_class() function OK? That's actually the one I had the most trouble with.

Aug 26 2026, 12:52 PM
mmel added a comment to D59188: mdio: Add new mdio FDT driver.

How does this correspond with the MII bus? Shouldn't we combine these two drivers into one?

Aug 26 2026, 5:34 AM

Aug 24 2026

mmel added a comment to D59115: kobj: allow multiple inheritance with per-class softc.

kobj_total_data_size looks good — thanks!
kobj_instance_data_offset seems too long to me, and 'instance' is not entirely precise. Can we shorten it to kobj_data_offset?

Aug 24 2026, 2:14 PM
mmel added a comment to D59115: kobj: allow multiple inheritance with per-class softc.

This is one of my dilemmas. KOBJ consistently uses 'baseclass', but 'kobj_offsetof_baseclass' or 'kobj_baseclass_offsetof' looks ugly, especially since these could also be used for the main/leaf class.

Aug 24 2026, 6:41 AM
mmel added a comment to D59115: kobj: allow multiple inheritance with per-class softc.
In D59115#1355807, @kib wrote:

kobj should not mention 'softc', it is not limited to the driver support. It should be named more generally.

Completely agree, but despite my best efforts, I can't figure out which word to use instead of “softc”

Aug 24 2026, 6:19 AM

Aug 23 2026

mmel added reviewers for D59115: kobj: allow multiple inheritance with per-class softc: alc, imp, kib, adrian, jhibbits.
Aug 23 2026, 7:02 AM
mmel requested review of D59115: kobj: allow multiple inheritance with per-class softc.
Aug 23 2026, 7:00 AM

Aug 17 2026

mmel added a comment to D58812: arm64: mediatek: add initial MT7622/Banana Pi R64 support (revised).

Not exactly. The D57176 has nothing to do with simplebus; all of its clock nodes in the DT are leaf nodes.

Aug 17 2026, 5:49 AM · arm64

Aug 16 2026

mmel added a comment to D58812: arm64: mediatek: add initial MT7622/Banana Pi R64 support (revised).

Sorry, I was too brief. In the past, Martin gave me many versions of the clock code for pre-review, so I have a tendency to respond briefly.
The issue is the audsys/audiosys driver (at least, I didn't check the other clocks). It is not a leaf node, but it has subnodes, so it must implement the simplebus class together with the MT_CLK class. This is impossible in the current situation because both classes have their own softc.
The audsys driver version in review only derives simplebus, which means it cannot work at all. It doesn't have a method for physical access to clock related registers or locking functions (CLKDEV interface).

Aug 16 2026, 5:02 AM · arm64

Aug 15 2026

mmel requested changes to D58812: arm64: mediatek: add initial MT7622/Banana Pi R64 support (revised).

This code is fundamentally incomplete and unusable in its current state.

  • All PLL clocks are crudely faked with fixed clock events instead of being dynamic, without any check.
  • The UART silently accepts and programs invalid baud rates without any error reporting.
    • pinctrl implements barely ~10% of the properties defined in the bindings, rendering it effectively useless. -Several clock driver nodes (simplebus being a clear example) lack required functionality and must be rewritten from scratch.

This code is nowhere near ready and demands substantial rework. I'm sorry, but the quality of this AI slope is significantly below my acceptance limit.

Aug 15 2026, 8:25 PM · arm64
mmel accepted D57176: clk: Initial support for the SpacemiT K1 clock control units.
Aug 15 2026, 5:54 AM

Jul 21 2026

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

Jul 15 2026

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.

Jul 15 2026, 8:58 AM

Jul 14 2026

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.

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

Jul 13 2026

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

Jul 12 2026

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

Jul 10 2026

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 .

Jul 10 2026, 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.

Jul 10 2026, 7:04 AM

Jul 9 2026

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

remove redundant empty line

Jul 9 2026, 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().
Jul 9 2026, 8:40 AM
mmel updated the diff for D58104: FDT: implement fdt_ether_get_addr().

update commit log

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

Rename function and fix cut&paste error

Jul 9 2026, 8:22 AM

Jul 8 2026

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.

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

Jun 25 2026

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?

Jun 25 2026, 10:54 AM · arm64

Jun 24 2026

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.

Jun 24 2026, 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