#
…

2022-02-12

00:36sirn has quit [Server closed connection]
00:37sirn has joined #asahi-dev
00:45yuyichao has quit [Ping timeout: 480 seconds]
00:53user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:59user982492 has joined #asahi-dev
00:59user982492 has quit []
01:14Dcow[m] has quit [Server closed connection]
01:14Dcow[m]1 has joined #asahi-dev
01:14ianlienfa[m] has quit [Server closed connection]
01:14ianlienfa[m] has joined #asahi-dev
01:15jeh[m] has quit [Server closed connection]
01:15jeh[m] has joined #asahi-dev
01:18SocioProphet[m] has quit [Server closed connection]
01:18SocioProphet[m] has joined #asahi-dev
01:48yuyichao has joined #asahi-dev
01:50IvanMaksimovic[m] has quit [Server closed connection]
01:50IvanMaksimovic[m] has joined #asahi-dev
01:52user982492 has joined #asahi-dev
02:20Emantor has quit [Quit: ZNC - http://znc.in]
02:20Emantor has joined #asahi-dev
03:35phiologe has joined #asahi-dev
03:38PhilippvK has quit [Ping timeout: 480 seconds]
03:51drwhax[m]1 has quit [Server closed connection]
03:51drwhax[m]1 has joined #asahi-dev
03:53l3k[m] has quit [Server closed connection]
03:53l3k[m] has joined #asahi-dev
03:57RianSouzaSantos[m] has quit [Server closed connection]
03:57RianSouzaSantos[m] has joined #asahi-dev
04:02kov has quit [Quit: Coyote finally caught me]
04:02kov has joined #asahi-dev
04:04mini has quit [Server closed connection]
04:04mini has joined #asahi-dev
04:25ybk[m] has quit [Server closed connection]
04:26ybk[m] has joined #asahi-dev
04:31josipknezovic[m] has quit [Server closed connection]
04:31josipknezovic[m] has joined #asahi-dev
04:46NotHere[m] has quit [Server closed connection]
04:46NotHere[m] has joined #asahi-dev
04:48rethematrix[m] has quit [Server closed connection]
04:48rethematrix[m] has joined #asahi-dev
04:50Rhys[m]12 has quit [Server closed connection]
04:50Rhys[m]12 has joined #asahi-dev
05:07blasty has quit [Server closed connection]
05:07blasty has joined #asahi-dev
05:16chengsun_ has quit [Server closed connection]
05:16chengsun has joined #asahi-dev
05:23kit_ty_kate has quit [Server closed connection]
05:23kit_ty_kate has joined #asahi-dev
05:36akemin_dayo has quit [Server closed connection]
05:36akemin_dayo has joined #asahi-dev
05:42M0x8FF[m] has quit [Server closed connection]
05:42M0x8FF[m] has joined #asahi-dev
05:57DarkShadow44 has quit [Server closed connection]
05:57DarkShadow44 has joined #asahi-dev
05:58krirogn[m] has quit [Server closed connection]
05:58krirogn[m] has joined #asahi-dev
06:08NightsOnly[m] has quit [Server closed connection]
06:08NightsOnly[m] has joined #asahi-dev
06:50kenzie35 has quit []
06:56vup has quit [Server closed connection]
06:56c10l3 has quit [Server closed connection]
06:57c10l3 has joined #asahi-dev
07:05kenzie35 has joined #asahi-dev
07:08user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:53dhewg has quit [Server closed connection]
07:53dhewg has joined #asahi-dev
08:13milek7_ has joined #asahi-dev
08:13milek7 has quit [Server closed connection]
08:27bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:16the_lanetly_052 has quit [Ping timeout: 480 seconds]
10:06perigoso[m] has quit [Server closed connection]
10:06perigoso[m] has joined #asahi-dev
10:08nsklaus_ has quit [Quit: Textual IRC Client: www.textualapp.com]
11:00DanielHuisman[m] has quit [Server closed connection]
11:00DanielHuisman[m] has joined #asahi-dev
11:01Liam[m] has quit [Server closed connection]
11:01Liam[m] has joined #asahi-dev
11:01Ferluci[m] has quit [Server closed connection]
11:01Ferluci[m] has joined #asahi-dev
11:02DanStrong[m] has quit [Server closed connection]
11:02DanStrong[m] has joined #asahi-dev
11:02pulpy_orange2[m] has quit [Server closed connection]
11:02pulpy_orange2[m] has joined #asahi-dev
11:03retonlage[m] has quit [Server closed connection]
11:03retonlage[m] has joined #asahi-dev
11:04YichaoYu[m] has quit [Server closed connection]
11:04YichaoYu[m] has joined #asahi-dev
11:47mtjzh has joined #asahi-dev
12:29CDFH has quit [Server closed connection]
12:48mtjzh has quit [Remote host closed the connection]
13:04jannaumarcan: have you already thought about how to interact with arch linux? I'm wondering what I shall do about the broken rust package with 16k page size
13:05marcanthere's going to be a bunch of breakage due to 16K pages, yes; my plan is to not care for the first release so we can gather up everything that's broken :-)
13:05mtjzh has joined #asahi-dev
13:05jannauissue is that the x86 PKGBUILD uses jemalloc and jemalloc seems to assume that the build page size is the page size on the target
13:05marcanyeah, jemalloc again...
13:08jannauit has config option to specify a page size (as far as I understand it still works if the actual page size is smaller)
13:08marcanyeah, makes sense
13:08j`eyjannau: the iommu patch seems to be tested relatively well, why not just use that
13:08marcantbh we can probably just get ALARM to override that for us
13:10jannauI could ceate a pull request for alarm's PKGBUILD repo but I was wondering if they already know that there will be an influx of users with a CPU with 16k page size
13:11marcanI have talked with them, but I don't remember if I emphasized the 16K issue
13:11marcanneed to check my mail again :)
13:11marcanI can follow up though
13:13alyssawhat happened to sven's 4k patches
13:13mtjzh has quit [Ping timeout: 480 seconds]
13:13j`eyto be revived at some point
13:14jannauj`ey: I fear if we start that way it will be hard to convince people that packages should be fixed for 16k
13:14sventhey work fine but need some work to be accepted upstream and i've kinda abandoned them because nvme was more interesting
13:14kettenisalyssa: you stopped kicking sven ;)
13:14svenyeah, or that :D
13:15jannaumarcan: thanks
13:15j`eyjannau: I suppose
13:15alyssajannau: fair enough tbh
13:23svenin other news, the regs inside the phy-atc nodes in the ADT are a big mess. they have some entries that are e.g. 0xa4 byes long :/
13:26kettenisso now sven ahs abandoned nvme because atc is more interesting ;)
13:26j`eyAd infinitum
13:26sveni'm just waiting for marcan to confirm that the rtkit library is in a good shape and for axboe (he's one of the nvme maintainers) to look into sharing tags across both queues to submit it
13:39mtjzh has joined #asahi-dev
13:46ChaosPrincess has quit [Quit: WeeChat 3.4]
13:47ChaosPrincess has joined #asahi-dev
13:47mtjzh has quit [Ping timeout: 480 seconds]
13:47vup has joined #asahi-dev
13:58mtjzh has joined #asahi-dev
14:06mtjzh has quit [Ping timeout: 480 seconds]
14:31mtjzh has joined #asahi-dev
14:39mtjzh has quit [Ping timeout: 480 seconds]
14:58mtjzh has joined #asahi-dev
15:06mtjzh has quit [Ping timeout: 480 seconds]
15:15mtjzh has joined #asahi-dev
16:22mtjzh has quit [Ping timeout: 480 seconds]
16:30mtjzh has joined #asahi-dev
16:39mtjzh has quit [Ping timeout: 480 seconds]
17:00bisko has joined #asahi-dev
17:03mtjzh has joined #asahi-dev
17:58axboe has joined #asahi-dev
17:58axboestarting to look at adding a cpufreq driver
17:59axboeall I got so far is the m1n1 cpufreq entry, does anything else exist describing the pstate values?
18:00j`eybut I know that marcan wanted to rewrite it for some reason
18:00axboeah shoot, didn't find anything
18:00axboethanks, that's very useful
18:01user982492 has joined #asahi-dev
18:06axboelooks like it, yes
18:11mtjzh has quit [Ping timeout: 480 seconds]
18:12axboe has quit [Quit: leaving]
18:17bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:21mtjzh has joined #asahi-dev
18:28user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:29user982492 has joined #asahi-dev
18:29mtjzh has quit [Ping timeout: 480 seconds]
18:30user982492 has quit []
18:30user982492 has joined #asahi-dev
18:33user982492 has quit []
18:35user982492 has joined #asahi-dev
18:35user982492 has quit []
18:48axboe has joined #asahi-dev
18:48axboewell that failed miserably, lol
18:49eragon has joined #asahi-dev
18:49axboewill take a look later today when I've got some more time to fiddle with this
18:53mtjzh has joined #asahi-dev
19:27jannauaxboe: seems to work if you yank the mcc
19:28jannauaxboe: your disabled cpu core might cause troubles
19:32mtjzh has quit [Remote host closed the connection]
19:32mtjzh has joined #asahi-dev
19:38axboejannau: was considering that it might be because p7..p8 aren't here
19:39axboejannau: will give that a shot!
19:40axboe has quit [Quit: brb]
19:40jannaumaybe not system was not really stable
19:43axboe has joined #asahi-dev
19:43axboejannau: yep booted with that, let's see...
19:44mtjzh has quit [Remote host closed the connection]
19:45axboeanyone noticed that irq/101-0-003a ends up in D state after charger has been plugged/unplugged?
19:45axboeoot@m1:~# cat /proc/462/stack
19:45axboe[<0>] pasemi_smb_waitready+0x40/0xe0
19:45axboe[<0>] __i2c_transfer+0x164/0x7a0
19:45axboe[<0>] msleep+0x2c/0x3c
19:45axboe[<0>] pasemi_i2c_xfer+0x134/0x1c0
19:45axboe[<0>] i2c_transfer+0x5c/0xf4
19:45axboe[<0>] regmap_i2c_read+0x58/0xa0
19:45axboe[<0>] _regmap_raw_read+0xdc/0x2cc
19:45axboe[<0>] regmap_raw_read+0x190/0x27c
19:45axboe[<0>] tps6598x_block_read+0x44/0xc0 [tps6598x]
19:45axboe[<0>] cd321x_interrupt+0x40/0x250 [tps6598x]
19:45axboe[<0>] irq_thread_fn+0x28/0x94
19:45axboe[<0>] irq_thread+0x150/0x27c
19:45axboe[<0>] kthread+0x108/0x110
19:46axboe[<0>] ret_from_fork+0x10/0x20
19:46axboe(scaling does seem to work fine now, fwiw)
19:46mtjzh has joined #asahi-dev
19:47axboethis should certainly help the battery time, was running fully clocked up before
19:57axboe has quit [Quit: brb]
19:58sventhat interrupt comes from the usb pd controller
19:58axboe has joined #asahi-dev
19:58jannaumy instalility with mcc was apparently caused by using "apple,num-channels = <8>;" for the m1 max
19:59jannaupowertop is not made for 10 cores with 16 pstates
20:02axboejannau: heh indeed
20:03jannaustill not stable, might be related to "nvme-apple 393cc0000.nvme: I/O 32(aq:0) timeout: completion polled"
20:03user982492 has joined #asahi-dev
20:04mtjzh has quit [Remote host closed the connection]
20:04jannauseen 4 times with I/O 8(aq:0), I/O 24(aq:0) and I/O 32(aq:0)
20:04axboemissed interrypt
20:04axboeI haven't seen that here
20:15jannauaxboe: are you using the magsafe connector for charging? I can't reproduce it here
20:18axboejannau: nope, usb-c
20:20axboejannau: happens here every time, fwiw
20:20mtjzh has joined #asahi-dev
20:23jannauack, reproduced with usb-c
20:23jannaudoesn't happen with the magsafe charger
20:24axboe(usb-c is more convenient for me, as other laptops in the house can use it too...)
20:25axboehaven't even tried the included charger yet :)
20:28mtjzh has quit [Ping timeout: 480 seconds]
20:45svendoes it get stuck in that D state? it's waiting for an i2c transaction to finish there
20:45svenor does the interrupt just keep firing?
20:46axboesven: it does
20:47axboeI can try and debug it, only visible thing is that it sits in D all the time
20:47axboebut it's doing 1 msec sleeps there and timing out after 10 tries, so retries must be coming from elsewhere
20:49svenmy first guess was that we don't ack the interrupt in cd321x_interrupt correctly but I don't see how yet
20:50svencd321x is that usb pd chip and there should be a "plug event" firing
20:50svenbut we handle that one correctly
20:53jannauit appears to be a read and not a write. maybe the same problem as in m1n1 with not using Repeat-Start
20:55sveni don't think the i2c transaction it the problem. it should timeout and complain if it was
20:56svenhuh, m1n1 has #define CD3218B12_IRQ_WIDTH 9 but the kernel driver effectively only considers 8 bytes
20:57svenhrm, but that shouldn't matter since we hand over to linux with all irqs in that chip disabled
20:57jannauI was thinking of that as well, I think the data sheet has only 8 bytes and apple's variant
20:58jannauhas one additional one
20:58jannaudon't we restore the state anymore?
20:58sveni think only when running something in the hypervisor
21:01svenlooks like i can't easily convinced my mac mini to "charge" from a usb-c port :D
21:02svenand just plugging in a normal cable doesn't seem to trigger that here
21:03jannauwe don't disable the tps irqs for the direct payload boot as we do not init usb at all
21:03svencan anyone of you boot with tps6598 trace events enabled?
21:03svensomething like tp_printk trace_event=tps6598:* in the bootargs should work
21:10bpye4 has joined #asahi-dev
21:16bpye has quit [Ping timeout: 480 seconds]
21:16bpye4 is now known as bpye
21:24axboesven: sure, I can try that
21:25jannausven: full of empty "cd321x_irq: event="
21:25axboesven: I enabled ftrace, so I can just do it from there
21:25axboelooks like jannau beat me to it
21:26jannauit is 'trace_event=tps6598x:*'
21:26axboecd321x_irq filter tps6598x_irq tps6598x_status
21:26axboeenable tps6598x_data_status tps6598x_power_status
21:26axboewhich ones do you want?
21:26svenalright. unhandled interrupt then
21:27svenI was looking for the cd321x_irq
21:28axboeso we're not really stuck, we just keep doing that read path and needing at least one loop
21:29axboehence I see it in msleep() all the time
21:29svenI think so
21:30svenand it doesn’t trigger the spurious irq detection because i2c is just too slow
21:31mtjzh has joined #asahi-dev
21:31axboeif event == 0, should we still clear ints?
21:31amw has quit [Ping timeout: 480 seconds]
21:31sventhe public data sheet claims the irq will only trigger when event is not zero
21:32axboeI'll give it a spin...
21:32sventhis irq is also shared across all tps chips. But I think we have them all declared in the device tree
21:32svenyeah, it can’t hurt to try..
21:33axboe has quit [Quit: rebooting]
21:34axboe has joined #asahi-dev
21:34axboeok let's try
21:34axboe irq/101-0-003a-378 [005] ..... 68.054988: cd321x_irq: event=
21:34axboetons of these, like jannau saw too
21:35axboeevery 0.012s
21:35user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:36axboedoes it need the status reg read too? I should find the documentation :)
21:37axboe has quit []
21:38amw has joined #asahi-dev
21:39mtjzh has quit [Ping timeout: 480 seconds]
21:39axboe has joined #asahi-dev
21:39sventhe interrupts are changed in the apple-variant but many other things are the same
21:39axboeno difference
21:39svenwait… why does only one interrupt thread do that?
21:40sventhere should be a few that all trigger in the same interrupt
21:47mtjzh has joined #asahi-dev
21:48user982492 has joined #asahi-dev
21:55mtjzh has quit [Ping timeout: 480 seconds]
22:05svenokay, shot in the dark: do your USB ports work more than once? is the dwc3 controller running dual mode?
22:06axboesven: haven't used usb yet...
22:06axboehow do I check the dwc3?
22:06jannauthe problem seems to be that interrupts for the other ports are disabled
22:07axboedmesg | grep -i dwc 0.003s
22:07axboe[ 1.828663] dwc3 702280000.usb: Adding to iommu group 2
22:07axboe[ 1.828728] dwc3 702280000.usb: Configuration mismatch. dr_mode forced to host
22:07axboe[ 1.875628] dwc3 b02280000.usb: Adding to iommu group 3
22:07axboe[ 1.875752] dwc3 b02280000.usb: Configuration mismatch. dr_mode forced to host
22:07axboe[ 1.913059] dwc3 f02280000.usb: Adding to iommu group 4
22:07axboe[ 1.913114] dwc3 f02280000.usb: Configuration mismatch. dr_mode forced to host
22:07svenokay, I wonder if the cd321x chips probe correctly if the dwc3 is in host mode only
22:07jannauif I comment the type-c connectors in the dts all four cd321x have interrupts enabled
22:10sventhat explains the “empty” irq status
22:10sventhe other tps gets that “plug event” and pulls the irq line low but the kernel only checks the MagSafe tps one and doesn’t see any interrupts there
22:11svenI wonder why they are disabled though
22:12mtjzh has joined #asahi-dev
22:12sventhe probe function writes the irq mask pretty early and has lots of failure paths that don’t clean it up afterwards
22:17axboesven: that's it
22:20mtjzh has quit [Ping timeout: 480 seconds]
22:20axboesven: ^^ fixes it
22:22jannaufwnode_usb_role_switch_get() fails
22:22axboealternatively, enable mask could be moved
22:22axboebut proves your theory at least
22:23svennice :)
22:25svenjannau: probably because the dwc3 controller was forced to host mode which will also break usb hot plug with the current workaround
22:28svenjannau: actually, usb/role.h has a stub for that function when !IS_ENABLED(CONFIG_USB_ROLE_SWITCH)
22:29svenhrm, but that would always fail then
22:29jannaufails with -EPROBE_DEFER
22:29kenzie35 has quit []
22:29sventhat's fine the first time if it probed dwc3 before the cd321x
22:30sveneither way, axboe's interrupt mask fix is a good idea anyway
22:31kenzie35 has joined #asahi-dev
22:31jannauyes, not a problem in mainline due to the missing usb nodes
22:32jannauit returns -EPROBE_DEFER 7 times after dwc3 is probed, once before
22:45mtjzh has joined #asahi-dev
22:53mtjzh has quit [Ping timeout: 480 seconds]
23:04mtjzh has joined #asahi-dev
23:29user982492 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
…