diff options
| author | Jiri Kosina <jkosina@suse.com> | 2025-12-02 14:46:11 +0100 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2025-12-02 14:46:11 +0100 |
| commit | 7362b5b493102c6b71827c2da22117b475528f6d (patch) | |
| tree | 62888e5fb3459077d2874c61bc8b378d7bf5c7da /rust/kernel/page.rs | |
| parent | eb41c955b05ea015275b3188b27b3960a95ae149 (diff) | |
| parent | 06416555c883e3ffabcc62ad39617c23d6b2f012 (diff) | |
Merge branch 'for-6.19/nintendo' into for-linus
- switch to WQ_PERCPU workaueues (Marco Crivellari)
- reduce potential initialization blocking time of hid-nintendo (Willy Huang)
Diffstat (limited to 'rust/kernel/page.rs')
| -rw-r--r-- | rust/kernel/page.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/kernel/page.rs b/rust/kernel/page.rs index 75ef096075cb..432fc0297d4a 100644 --- a/rust/kernel/page.rs +++ b/rust/kernel/page.rs @@ -170,6 +170,12 @@ impl Page { self.page.as_ptr() } + /// Get the node id containing this page. + pub fn nid(&self) -> i32 { + // SAFETY: Always safe to call with a valid page. + unsafe { bindings::page_to_nid(self.as_ptr()) } + } + /// Runs a piece of code with this page mapped to an address. /// /// The page is unmapped when this call returns. |
