Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microphones via AOP (+ a few SEP bits). #342

Closed
Closed
Changes from 1 commit
Commits
Show all changes
606 commits
Select commit Hold shift + click to select a range
c4ecea5
rust: io_buffer: Disable clippy::undocumented_unsafe_blocks lint
asahilina May 8, 2024
fc57e0b
*RFL import: kernel::user_ptr
asahilina Feb 16, 2023
23a7a81
fixup! *RFL import: kernel::user_ptr
jannau Nov 9, 2024
129653d
rust: user_ptr: Disable clippy::undocumented_unsafe_blocks lint
asahilina May 8, 2024
53977a4
MISSING SIGNOFFS: rust: Add PAGE_SIZE constant to kernel crate
asahilina Feb 16, 2023
55a9263
*RFL import: kernel::module_param
asahilina Feb 16, 2023
5cd8a05
fixup! *RFL import: kernel::module_param
jannau Nov 9, 2024
d96f40d
rust: module_param: Tolerate a trailing newline when parsing
asahilina Oct 21, 2022
3dd6c83
rust: module_param: Disable clippy::undocumented_unsafe_blocks lint
asahilina May 8, 2024
d203076
*RFL import: kernel::delay
asahilina Feb 16, 2023
3183a33
rust: of: Add OF node abstraction
asahilina Oct 21, 2022
fc09916
fixup! rust: of: Add OF node abstraction
jannau Nov 9, 2024
c41e468
rust: Fix x86 build
marcan Nov 12, 2023
53a2730
rust: of: Add parse_phandle_by_name()
jannau Nov 10, 2024
eb998a7
HACK: rust: of: add as_raw()
jannau Nov 10, 2024
6521972
*RFL import: kernel::io_mem
asahilina Feb 16, 2023
326a845
rust: platform: add `ioremap_resource` and `get_resource` methods
Feb 8, 2022
0f55d31
fixup! rust: platform: add `ioremap_resource` and `get_resource` methods
jannau Nov 10, 2024
3401184
rust: kernel: platform: Add Device.set_dma_masks()
asahilina Sep 7, 2022
99b38ed
fixup! rust: kernel: platform: Add Device.set_dma_masks()
jannau Nov 10, 2024
373291b
rust: Add ioremap_np support to io_mem & friends
asahilina Sep 21, 2022
7167c3d
rust: platform: Add platform::Device::get_device()
jannau Nov 10, 2024
49708ef
*RFL import: macros::module params functionality & deps
asahilina Feb 16, 2023
a121fcc
Revert "rust: remove `params` from `module` macro example"
jannau May 13, 2024
e92a907
rust: macros: module: Functionally revert commit 7044dcff8301
jannau Nov 10, 2024
fae6615
rust: block: rnull: Adapt to asahi's rust base branch
jannau Sep 16, 2024
b0fb832
*RFL import: Rest of kernel::error::code::*
asahilina Feb 16, 2023
4e7cb02
rust: bindings: Add resource_size wrapper
asahilina Sep 7, 2022
5580319
rust: Allow feature allocator_api
asahilina Feb 16, 2023
9dc1769
rust: Add missing impl_trait_in_assoc_type feature
marcan Nov 19, 2023
38f1e5a
rust: bindgen: Exclude list functions with unsupported ABIs
asahilina Nov 22, 2023
2b1fab7
*RFL import: kernel::KParamGuard & friends
asahilina Feb 16, 2023
8af7401
rust: init: Add default() utility function
asahilina May 8, 2024
08f8a1c
rust: init: Disable clippy::undocumented_unsafe_blocks lint
asahilina May 8, 2024
0f9ca11
rust: init: macros: Disable clippy::undocumented_unsafe_blocks lint
asahilina May 8, 2024
6333abd
rust: print: Disable clippy::undocumented_unsafe_blocks lint
asahilina May 8, 2024
8cc72cf
kernel: str: Add/fix SAFETY comments
asahilina May 8, 2024
94cf54e
rust: kernel: workqueue: Disable clippy::undocumented_unsafe_blocks lint
asahilina May 8, 2024
06c02e5
rust: Enable clippy::undocumented_unsafe_blocks lint
asahilina May 8, 2024
b292a23
rust: Add time_namespace helpers
asahilina Nov 3, 2024
68a5301
rust: add unstable feature associated_type_defaults
jannau Nov 10, 2024
e16f393
HID: magicmouse: use struct input_mt_pos for X/Y
jannau Dec 15, 2021
cca476e
HID: magicmouse: use ops function pointers for input functionality
jannau Dec 15, 2021
d8e3661
HID: magicmouse: add support for Macbook trackpads
jannau Dec 16, 2021
4f2d520
WIP: HID: transport: spi: add Apple SPI transport
jannau Dec 10, 2021
0634e55
HID: add HOST vendor/device IDs for Apple MTP devices
marcan Jul 7, 2022
ab27e6a
HID: core: Handle HOST bus type when announcing devices
marcan Jul 7, 2022
f644dd6
hid: apple: Bind to HOST devices for MTP
marcan Jul 7, 2022
5b69f87
hid: magicmouse: Add MTP multi-touch device support
marcan Jul 7, 2022
b7605bb
soc: apple: Add DockChannel driver
marcan Jul 7, 2022
abc5716
hid: Add Apple DockChannel HID transport driver
marcan Jul 7, 2022
34ed1b4
soc: apple: Add RTKit helper driver
marcan Jul 3, 2022
f074f2c
HID: transport: spi: Check status message after transmits
jannau Dec 11, 2022
7a666a0
HID: magicmouse: Add .reset_resume for SPI trackpads
jannau Dec 11, 2022
96bd04b
HID: transport: spi: Add suspend support
jannau Dec 11, 2022
07f9ba4
HID: Bump maximum report size to 16384
marcan Apr 10, 2023
fe1f1b4
HID: magicmouse: Handle touch controller resets on SPI devices
marcan Apr 30, 2023
754c09b
HID: transport: spi: Implement GET FEATURE
marcan Dec 3, 2023
b051957
HID: magicmouse: Query device dimensions via HID report
marcan Dec 3, 2023
05f7a8b
HID: transport: spi: apple: Increase receive buffer size
jannau Oct 3, 2024
77a9d9b
iommu/io-pgtable: Add Apple UAT variant format
asahilina Aug 17, 2022
35785ae
iommu/io-pgtable: Hack in FW-RW/GPU-RO mode into UAT io_pgtable
asahilina Apr 19, 2023
5d7f604
rust: io_pgtable: Add the Apple UAT format abstraction
asahilina Feb 16, 2023
34c30eb
fixup! rust: io_pgtable: Add the Apple UAT format abstraction
jannau Nov 10, 2024
d2162ac
rust: alloc: Fix `ArrayLayout` allocations
asahilina Nov 23, 2024
bcf561a
rust: dma_fence: Add DMA Fence abstraction
asahilina Feb 11, 2023
3d0f2fc
fixup! rust: dma_fence: Add DMA Fence abstraction
jannau Nov 9, 2024
7e21732
rust: helpers: Add bindings/wrappers for dma_resv
asahilina Nov 22, 2023
b6b933b
drm/gem-shmem: Export VM ops functions
asahilina Sep 7, 2022
61764db
rust: drm: gem: shmem: Add DRM shmem helper abstraction
asahilina Feb 5, 2023
25f769c
fixup! rust: drm: gem: shmem: Add DRM shmem helper abstraction
jannau Nov 10, 2024
5b833b7
rust: drm: device: Convert Device to AlwaysRefCounted
asahilina May 19, 2023
c461a46
fixup! rust: drm: device: Convert Device to AlwaysRefCounted
jannau Nov 16, 2024
bbe669c
rust: drm: gem: Allow pinning GEM object driver data
asahilina Apr 28, 2023
0a56728
rust: drm: mm: Add DRM MM Range Allocator abstraction
asahilina Feb 11, 2023
7ec2af9
fixup! rust: drm: mm: Add DRM MM Range Allocator abstraction
jannau Nov 10, 2024
1ae930d
rust: drm: syncobj: Add DRM Sync Object abstraction
asahilina Feb 11, 2023
526b657
drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name
asahilina Apr 5, 2023
c7973f1
rust: drm: sched: Add GPU scheduler abstraction
asahilina Feb 11, 2023
84a798e
fixup! rust: drm: sched: Add GPU scheduler abstraction
jannau Nov 9, 2024
5b361d1
drm/gem: Add a flag to control whether objects can be exported
asahilina Feb 10, 2023
5c7993c
rust: drm: gem: Add set_exportable() method
asahilina Feb 11, 2023
c79ea3a
drm/shmem-helper: Add lockdep asserts to vmap/vunmap
asahilina Nov 22, 2023
fca62e2
drm/scheduler: Clean up jobs when the scheduler is torn down.
asahilina Mar 6, 2023
d9025fc
rust: drm: sched: Use &mut for ArmedJob.fences()
jannau Nov 16, 2024
4b3b8c0
drm/gpuvm: Add drm_gpuvm_bo_unmap()
asahilina May 8, 2024
b39b56a
rust: drm: Add GPUVM Manager abstraction
asahilina May 8, 2024
aaf0916
fixup! rust: drm: Add GPUVM Manager abstraction
jannau Nov 9, 2024
2f157c1
HACK: rust: drm: device: Add device initialization without data
jannau Nov 10, 2024
4d77d51
HACK: rust: drm: device: Add pointless device() method
jannau Nov 10, 2024
80b5ba6
rust: drm: gem: shmem: Add share_dma_resv() function
asahilina Jun 22, 2024
997540d
rust: macros: Add versions macro
asahilina Feb 16, 2023
bca8717
drm/asahi: Add the Asahi driver UAPI
asahilina Feb 16, 2023
c52759c
fixup! drm/asahi: Add the Asahi driver UAPI
asahilina Sep 23, 2024
e60a8aa
rust: bindings: Bind the Asahi DRM UAPI
asahilina Feb 16, 2023
094818d
drm/asahi: Add the Asahi driver for Apple AGX GPUs
asahilina Feb 16, 2023
692d5f0
fixup! drm/asahi: Add the Asahi driver for Apple AGX GPUs
jannau Nov 9, 2024
b3a0b1c
DO NOT MERGE: drm/asahi: Add an experimental UAPI extension
asahilina Apr 26, 2023
becf439
drm/asahi: render: Implement unknown value UAPI extension
asahilina Apr 26, 2023
5b16263
drm/asahi: hw,initdata: Initdata fixes for G14S
asahilina Jul 19, 2023
cc83744
drm/asahi: hw: Drop max_dies
asahilina Jul 19, 2023
142750f
fixup! drm/asahi: hw: Drop max_dies
jannau Nov 16, 2024
7be2cf5
drm/asahi: initdata: Fix ver_info for G13 V13.5
asahilina Jul 19, 2023
e7a72ff
drm/asahi: fw/channels: Identify subpipe (?) field in tvb ack
asahilina Aug 2, 2023
97c5278
drm/asahi: fw/channels: Document more message types a bit
asahilina Aug 2, 2023
5ddef37
drm/asahi: initdata: Fix 13.5 field position for G13X
asahilina Aug 2, 2023
16dac45
drm/asahi: initdata: Document more stuff
asahilina Aug 2, 2023
0a146e5
drm/asahi: fw/microseq: Document bits of has_attachments
asahilina Aug 2, 2023
bb9b5fe
drm/asahi: hw/t600x: Expand some mappings
asahilina Aug 2, 2023
d1f38f0
drm/asahi: hw/t8112: Make last IOMapping read-only
asahilina Aug 2, 2023
4715c4a
drm/asahi: render: Correct some values for G14
asahilina Aug 2, 2023
14719c1
drm/asahi: initdata: Initialize GpuStatsFrag properly
asahilina Aug 3, 2023
1ae4d5d
drm/asahi: slotalloc: Allow initializing empty slots
asahilina Aug 3, 2023
eb3666c
drm/asahi: fw.channels: Add static assertions for message sizes
asahilina Aug 3, 2023
92fb218
drm/asahi: hw.t602x: Fixes for t6022
asahilina Aug 9, 2023
9e7586e
drm/asahi: regs: Fix cluster count for G14D
asahilina Aug 9, 2023
fb03533
drm/asahi: Enable probing for t6022
asahilina Aug 9, 2023
5894386
drm/asahi: Increase recursion limit
asahilina Aug 9, 2023
d1d002c
drm/asahi: initdata: Fixes for G14D
asahilina Aug 9, 2023
287d8da
drm/asahi: initdata,hw: Identify & set idle_off_standby_timer
asahilina Aug 9, 2023
7be76ec
drm/asahi: initdata: Fudge t3 calculation a bit
asahilina Aug 9, 2023
259a484
drm/asahi: gpu,hw: Fix array IOMappings
asahilina Aug 9, 2023
bafaeeb
drm/asahi: hw/t602x: Increase meta/preempt sizes for G14D
asahilina Aug 9, 2023
ff5287a
drm/asahi: Expose firmware version to userspace
asahilina Aug 16, 2023
b5486bc
fixup! drm/asahi: Expose firmware version to userspace
jannau Nov 10, 2024
39c84c0
drm/asahi: alloc: Support tagging array allocs
asahilina Aug 16, 2023
f0f09fc
drm/asahi: alloc: Use tag as the guard marker
asahilina Aug 16, 2023
6687263
fixup! drm/asahi: alloc: Use tag as the guard marker
jannau Nov 16, 2024
114d964
drm/asahi: buffer: Add tags to all the buffers
asahilina Aug 16, 2023
e08e92d
drm/asahi: initdata: Tag more arrays
asahilina Aug 16, 2023
48d9469
drm/asahi: queue/compute: Tag preempt buf
asahilina Aug 16, 2023
62f240a
drm/asahi: render: Tag AuxFB
asahilina Aug 16, 2023
b014f89
drm/asahi: workqueue: Tag GPU buf
asahilina Aug 16, 2023
f95a3d7
drm/asahi: buffer,render: Identify and provide layer meta buf
asahilina Aug 16, 2023
951de98
drm/asahi: compute: Implement bindless samplers
asahilina Aug 16, 2023
e7f0ded
drm/asahi: render: Implement bindless samplers
asahilina Aug 16, 2023
de4dddc
drm/asahi: fw,queue: Implement helper programs
asahilina Aug 16, 2023
cb6a62c
drm/asahi: render: Identify and set Z/S strides for layered rendering
asahilina Aug 16, 2023
30cb73e
drm/asahi: queue: Quieten some debugs
asahilina Aug 17, 2023
b38fd07
drm/asahi: Add verbose UAPI error reporting
asahilina Aug 30, 2023
f888dd7
drm/asahi: file: Remove sync limit
asahilina Sep 1, 2023
f170f5f
drm/asahi: render: Remove sync TVB growth support
asahilina Sep 1, 2023
ae7523b
drm/asahi: buffer: Complain more loudly about sync requests
asahilina Sep 1, 2023
527dc22
drm/asahi: Identify & add render VS spills flag
asahilina Nov 8, 2023
ffbb37e
drm/asahi: Identify and allocate clustered layering metadata buf
asahilina Nov 10, 2023
31a1840
drm/asahi: Fix Clippy complaints
asahilina Nov 10, 2023
ba53898
drm/asahi: render: Fix layered rendering on G14X
asahilina Nov 10, 2023
2337918
drm/asahi: render, buffer: Fix layered rendering on G13X (again)
asahilina Nov 17, 2023
4135932
drm/asahi: initdata: New init chain API for rebase
marcan Nov 19, 2023
4ddb056
fixup! drm/asahi: initdata: New init chain API for rebase
jannau Nov 10, 2024
77debad
drm/asahi: workqueue: Work around ICE in Rust 1.74
asahilina Nov 22, 2023
3906fb6
drm/asahi: queue: Alocate the NotifierList as shared
asahilina Nov 22, 2023
e7dda8b
drm/asahi: compute: Allow no preemption flag
asahilina Jan 5, 2024
b86396d
drm/asahi: Identify and implement helper config register
asahilina Jan 17, 2024
7c3f67f
drm/asahi: Check command structure sizes
asahilina Jan 17, 2024
16ffe0c
drm/asahi: alloc: Do not allocate memory to free memory
asahilina Jun 4, 2024
0637d49
fixup! drm/asahi: alloc: Do not allocate memory to free memory
jannau Nov 10, 2024
ca175ae
drm/asahi: microseq: Fix warnings
asahilina May 8, 2024
7382f68
drm/asahi: Don't lock up when unmapping PTEs fails
asahilina May 10, 2024
14727d9
fixup! drm/asahi: Don't lock up when unmapping PTEs fails
jannau Nov 16, 2024
23e447a
drm/asahi: Convert to GPUVM and implement more VM_BIND ops
asahilina May 8, 2024
de1dfc8
fixup! drm/asahi: Convert to GPUVM and implement more VM_BIND ops
jannau Nov 9, 2024
4d135a1
drm/asahi: Refactor address types
asahilina May 10, 2024
1f41be2
drm/asahi: util: Add RangeExt helpers for Range<T>
asahilina May 10, 2024
b7314ca
drm/asahi: mmu: Convert to using Range
asahilina May 10, 2024
8ac02ed
drm/asahi: Move the unknown dummy page to the top of the address space
asahilina May 10, 2024
faef4c7
drm/asahi: Convert more ranges to Range<>
asahilina May 10, 2024
f07458b
fixup! drm/asahi: Convert more ranges to Range<>
jannau Nov 10, 2024
cd51d51
drm/asahi: mmu: Fix lockdep issues with GpuVm
asahilina Jun 15, 2024
9df7aab
drm/asahi: Implement GEM objects sharing a single DMA resv
asahilina Jun 22, 2024
a6e7f76
drm/asahi: queue: Split into Queue and QueueInner
asahilina Jul 11, 2024
0d30d04
drm/asahi: workqueue: Tweak some debug logs
asahilina Jul 17, 2024
20f986c
drm/asahi: run rustfmt
jannau Jul 27, 2024
9c7eb47
fixup! drm/asahi: run rustfmt
jannau Nov 10, 2024
a690007
drm/asahi: file: Update to newer VM_BIND API
asahilina May 10, 2024
01324b9
fixup! drm/asahi: file: Update to newer VM_BIND API
jannau Nov 16, 2024
9104e70
drm/asahi: Signal soft fault support to userspace
asahilina Jun 22, 2024
614fff0
drm/asahi: Enable soft faults by default
asahilina Jul 27, 2024
52c8824
drm/asahi: Fix u32 mult overflow on large tilebufs/TPCs
asahilina Aug 6, 2024
d8416e9
drm/asahi: Workqueue: Add more debug
asahilina Sep 23, 2024
7ee17c4
drm/asahi: Fix event tracking when JobSubmission is dropped
asahilina Sep 23, 2024
d66453c
drm/asahi: gpu: Show unknown field in timeouts
asahilina Sep 23, 2024
9cd163e
fixup! drm/asahi: gpu: Show unknown field in timeouts
jannau Nov 16, 2024
8aabda7
FIXUP: drm/asahi: firmware fixes
asahilina Sep 23, 2024
1fa3b58
drm/asahi: Handle channel errors
asahilina Sep 23, 2024
b5850f3
fixup! drm/asahi: Handle channel errors
jannau Nov 16, 2024
2a54418
drm/asahi: event: Initialize stamps to different values
asahilina Sep 24, 2024
14719ca
drm/asahi: workqueue,queue: More debug
asahilina Sep 24, 2024
c21008b
fixup! drm/asahi: workqueue,queue: More debug
jannau Nov 16, 2024
1f5873f
drm/asahi: workqueue: Fix "Cannot submit, but queue is empty?" bug
asahilina Sep 24, 2024
1f9201b
drm/asahi: Clean up jobs in a workqueue
asahilina Sep 24, 2024
e4d28ec
fixup! drm/asahi: Clean up jobs in a workqueue
jannau Nov 10, 2024
7c516a7
drm/asahi: Add robust_isolation kernel parameter
asahilina Sep 24, 2024
42485e1
FIXUP: drm/asahi: firmware fixes 2
asahilina Sep 24, 2024
d6b7a0d
drm/asahi: HACK: Disable compute preemption for now
asahilina Sep 24, 2024
1c92e16
drm/asahi: Align kernel range to buffer::PAGE_SIZE
asahilina Oct 3, 2024
632b966
drm/asahi: Implement missing ASAHI_BIND_OP_UNBIND
asahilina Nov 3, 2024
74ac069
drm/asahi: Implement ASAHI_GET_TIME
asahilina Nov 3, 2024
0e813b1
drm/asahi: Modify debug dev printk macros to avoid adding ".as_ref()"
jannau Nov 10, 2024
5aac050
drm/asahi: gpu: Force Box move with manual Box<T>::into_inner()
jannau Nov 10, 2024
9674641
drm/asahi: gpu: Get resources directly through DRM pricate data
jannau Nov 10, 2024
5bf7be2
drm/asahi: mmu: Move closer to rust of integration
jannau Nov 10, 2024
8740307
drm/asahi: regs: Get device ref from platform dev
jannau Nov 10, 2024
39b5e12
drm/asahi: driver: Port to new device/driver registration
jannau Nov 10, 2024
6415f38
drm/asahi: gpu: Collect garbage for private/gpuro together
asahilina Nov 23, 2024
eb45cc7
drm/asahi: alloc: Be more verbose about failures
asahilina Nov 23, 2024
cc2cc9c
drm/asahi: gpu: Add a max object count garbage limit
asahilina Nov 23, 2024
82fcd76
Merge branch 'bits/000-devicetree' into asahi-wip
jannau Nov 23, 2024
cbe0a7c
Merge branch 'bits/005-maintainers' into asahi-wip
jannau Nov 23, 2024
1a0e8a0
Merge branch 'bits/010-soc' into asahi-wip
jannau Nov 23, 2024
95c6caf
Merge branch 'bits/020-dart' into asahi-wip
jannau Nov 23, 2024
2aac0b6
Merge branch 'bits/030-misc' into asahi-wip
jannau Nov 23, 2024
f56e257
Merge branch 'bits/040-dwc3' into asahi-wip
jannau Nov 23, 2024
43a5099
Merge branch 'bits/050-nvme' into asahi-wip
jannau Nov 23, 2024
dbdf89e
Merge branch 'bits/060-spi' into asahi-wip
jannau Nov 23, 2024
aca877a
Merge branch 'bits/070-audio' into asahi-wip
jannau Nov 23, 2024
d61992b
Merge branch 'bits/080-wifi' into asahi-wip
jannau Nov 23, 2024
721ddc2
Merge branch 'bits/090-spi-hid' into asahi-wip
jannau Nov 23, 2024
ebc5f52
Merge branch 'bits/110-smc' into asahi-wip
jannau Nov 23, 2024
fe2ab66
Merge branch 'bits/120-spmi' into asahi-wip
jannau Nov 23, 2024
27c9926
Merge branch 'bits/130-cpufreq' into asahi-wip
jannau Nov 23, 2024
68e699f
Merge branch 'bits/140-pci' into asahi-wip
jannau Nov 23, 2024
0a79f69
Merge branch 'bits/150-xhci-firmware' into asahi-wip
jannau Nov 23, 2024
d7e3bc0
Merge branch 'bits/170-atcphy' into asahi-wip
jannau Nov 23, 2024
e36faa6
Merge branch 'bits/180-sio' into asahi-wip
jannau Nov 23, 2024
8f62695
Merge branch 'bits/190-rust' into asahi-wip
jannau Nov 23, 2024
1a4d2aa
Merge branch 'bits/200-dcp' into asahi-wip
jannau Nov 23, 2024
f072a17
Merge branch 'bits/210-gpu' into asahi-wip
jannau Nov 23, 2024
7f8c2e9
Merge branch 'bits/220-tso' into asahi-wip
jannau Nov 23, 2024
4a1c413
Merge branch 'bits/230-touchbar' into asahi-wip
jannau Nov 23, 2024
9e262c5
Merge branch 'bits/240-isp' into asahi-wip
jannau Nov 23, 2024
bc43bac
dmaengine: apple-admac: Avoid accessing registers in probe
WhatAmISupposedToPutHere Nov 9, 2024
e05b6cb
soc: apple: rtkit: Add apple_rtkit_has_endpoint()
WhatAmISupposedToPutHere Nov 9, 2024
5f064ae
soc: apple: rtkit: Add tracekit endpoint.
WhatAmISupposedToPutHere Nov 9, 2024
16a9fea
fixup! rust: soc: apple: rtkit: Add Apple RTKit abstraction
WhatAmISupposedToPutHere Nov 9, 2024
c4576f5
rust: Add helper for memcpy_toio
WhatAmISupposedToPutHere Nov 9, 2024
4e26ab7
rust: alloc: Add .resize() to Vec
WhatAmISupposedToPutHere Nov 9, 2024
ec61e9f
rust: device: Add Device::parent()
WhatAmISupposedToPutHere Nov 17, 2024
95b18e6
rust: add dma pool and coherent allocator
metaspace Nov 9, 2024
27d6864
rust: WIP(?): Various bits of rust glue for AOP series
WhatAmISupposedToPutHere Nov 9, 2024
8353aff
rust: Only export module id tables if building as module
WhatAmISupposedToPutHere Nov 17, 2024
f0c8754
soc: apple: Add support for the AOP co-processor.
WhatAmISupposedToPutHere Nov 9, 2024
a9aafa1
rust: alloc: kbox: Add AsRef implementation to Box
WhatAmISupposedToPutHere Nov 9, 2024
6741a78
ASoC: apple: Add aop_audio driver.
WhatAmISupposedToPutHere Nov 17, 2024
f4962bd
iio: common: Add AOP sensor drivers.
WhatAmISupposedToPutHere Nov 9, 2024
97adcbe
rust: soc: apple: Add Apple mailbox abstractions
WhatAmISupposedToPutHere Nov 10, 2024
ac7dc43
rust: WIP(?): Various bits of rust glue for sep
WhatAmISupposedToPutHere Nov 10, 2024
b1ed450
soc: apple: Add SEP driver.
WhatAmISupposedToPutHere Nov 10, 2024
efd57ee
arm64: dts: apple: Add AOP and subdevices.
WhatAmISupposedToPutHere Nov 9, 2024
48132eb
arm64: dts: apple: Add SEP device tree nodes.
WhatAmISupposedToPutHere Nov 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! rust: platform: add ioremap_resource and get_resource methods
  • Loading branch information
jannau committed Nov 19, 2024
commit 0f55d31763c8f3e9d5923208e2108ed7af25a3c1
9 changes: 6 additions & 3 deletions rust/kernel/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ impl Device {
/// `dev` must be an `Aref<device::Device>` whose underlying `bindings::device` is a member of a
/// `bindings::platform_device`.
unsafe fn from_dev(dev: ARef<device::Device>) -> Self {
Self(dev, 0)
Self {
dev,
used_resource: 0
}
}

fn as_dev(&self) -> &device::Device {
Expand All @@ -216,7 +219,7 @@ impl Device {
/// Gets a system resources of a platform device.
pub fn get_resource(&mut self, rtype: IoResource, num: usize) -> Result<Resource> {
// SAFETY: `self.ptr` is valid by the type invariant.
let res = unsafe { bindings::platform_get_resource(self.ptr, rtype as _, num as _) };
let res = unsafe { bindings::platform_get_resource(self.as_raw(), rtype as _, num as _) };
if res.is_null() {
return Err(EINVAL);
}
Expand All @@ -226,7 +229,7 @@ impl Device {
// - `self.ptr` is valid by the type invariant.
// - `res` is a displaced pointer to one of the array's elements,
// and `resource` is its base pointer.
let index = unsafe { res.offset_from((*self.ptr).resource) } as usize;
let index = unsafe { res.offset_from((*self.as_raw()).resource) } as usize;

// Make sure that the index does not exceed the 64-bit mask.
assert!(index < 64);
Expand Down