ALT Linux Bugzilla
– Attachment 16751 Details for
Bug 51325
Cosmic DE 1.0.0 on loongarch64
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
cosmic-settings 0002 patch
cosmic-settings-2.patch (text/plain), 4.86 KB, created by
Ilya Sorochan
on 2024-08-29 12:36:54 MSK
(
hide
)
Description:
cosmic-settings 0002 patch
Filename:
MIME Type:
Creator:
Ilya Sorochan
Created:
2024-08-29 12:36:54 MSK
Size:
4.86 KB
patch
obsolete
>From 7004dd6037f7da166f895612ca98460089e1be91 Mon Sep 17 00:00:00 2001 >From: Ilya Sorochan <k0tran@altlinux.org> >Date: Wed, 28 Aug 2024 19:14:01 +0300 >Subject: [PATCH 2/3] Add generator patch for loongarch64 > >--- > ...ings-1.0.0-alt-generator-loongarch64.patch | 126 ++++++++++++++++++ > 1 file changed, 126 insertions(+) > create mode 100644 cosmic-settings-1.0.0-alt-generator-loongarch64.patch > >diff --git a/cosmic-settings-1.0.0-alt-generator-loongarch64.patch b/cosmic-settings-1.0.0-alt-generator-loongarch64.patch >new file mode 100644 >index 00000000..48302040 >--- /dev/null >+++ b/cosmic-settings-1.0.0-alt-generator-loongarch64.patch >@@ -0,0 +1,126 @@ >+This patch does three things: >+1. Brings up generator to master after 0.8.2 version (required for loongarch64 fix) >+2. Sets everything to use only the new and patched generator version >+3. Fixes one occurence of generator usage (in pager) >+ >+--- a/cosmic-settings-1.0.0.alpha.1-cargo/vendor/generator/src/detail/loongarch64_unix.rs 2024-08-26 11:16:52.486559002 +0300 >++++ b/cosmic-settings-1.0.0.alpha.1-cargo/vendor/generator/src/detail/loongarch64_unix.rs 2024-08-26 12:13:15.718872919 +0300 >+@@ -1,5 +1,4 @@ >+ use crate::detail::align_down; >+-use crate::reg_context::InitFn; >+ use crate::stack::Stack; >+ >+ std::arch::global_asm!(include_str!("asm/asm_loongarch64_sysv_elf.S")); >+--- a/cosmic-settings-1.0.0.alpha.1-cargo/vendor/generator/src/reg_context.rs 2024-08-23 15:28:42.921073686 +0300 >++++ b/cosmic-settings-1.0.0.alpha.1-cargo/vendor/generator/src/reg_context.rs 2024-08-26 12:13:15.719872934 +0300 >+@@ -19,9 +19,9 @@ >+ self.regs.prefetch(); >+ } >+ >+- /// Create a new context >+- #[allow(dead_code)] >+- pub fn new(init: InitFn, arg: usize, start: *mut usize, stack: &Stack) -> RegContext { >++ /// Create a new context, only used in tests >++ #[cfg(test)] >++ fn new(init: InitFn, arg: usize, start: *mut usize, stack: &Stack) -> RegContext { >+ let mut ctx = RegContext::empty(); >+ ctx.init_with(init, arg, start, stack); >+ ctx >+@@ -48,7 +48,7 @@ >+ >+ /// Load the context and switch. This function will never return. >+ #[inline] >+- #[allow(dead_code)] >++ #[cfg(test)] >+ pub fn load(to_context: &RegContext) { >+ let mut cur = Registers::new(); >+ let regs: &Registers = &to_context.regs; >+@@ -86,6 +86,11 @@ >+ init_fn_impl(arg, f) >+ } >+ >++ #[cfg(target_arch = "loongarch64")] >++ extern "C" fn init_fn(arg: usize, f: *mut usize) -> ! { >++ init_fn_impl(arg, f) >++ } >++ >+ #[cfg(target_arch = "riscv64")] >+ extern "C" fn init_fn(arg: usize, f: *mut usize) -> ! { >+ init_fn_impl(arg, f) >+@@ -102,15 +107,13 @@ >+ let mut cur = RegContext::empty(); >+ >+ fn callback() { >+- unsafe { >+- VAL = true; >+- } >++ unsafe { VAL = true }; >+ } >+ >+ let stk = Stack::new(MIN_STACK); >+ let ctx = RegContext::new( >+ init_fn, >+- unsafe { transmute(&cur) }, >++ &cur as *const _ as usize, >+ callback as *mut usize, >+ &stk, >+ ); >+--- a/cosmic-settings/Cargo.lock >++++ b/cosmic-settings/Cargo.lock >+@@ -1609,7 +1609,7 @@ version = "0.1.0" >+ dependencies = [ >+ "derive_setters", >+ "downcast-rs", >+- "generator 0.7.5", >++ "generator 0.8.1", >+ "libcosmic", >+ "once_cell", >+ "regex", >+--- a/cosmic-settings/page/Cargo.toml >++++ b/cosmic-settings/page/Cargo.toml >+@@ -8,7 +8,7 @@ derive_setters = "0.1.6" >+ regex = "1.10.5" >+ slotmap = "1.0.7" >+ libcosmic = { workspace = true } >+-generator = "0.7.5" >++generator = "0.8.1" >+ downcast-rs = "1.2.1" >+ once_cell = "1.19.0" >+ tokio.workspace = true >+--- a/cosmic-settings-1.0.0.alpha.1-cargo/vendor/loom/Cargo.toml >++++ b/cosmic-settings-1.0.0.alpha.1-cargo/vendor/loom/Cargo.toml >+@@ -39,7 +39,7 @@ rustdoc-args = [ >+ version = "1.0.0" >+ >+ [dependencies.generator] >+-version = "0.7" >++version = "0.8.1" >+ >+ [dependencies.pin-utils] >+ version = "0.1.0" >+Valid util linux-raw-sys 0.6.5 version >+ >+--- a/cosmic-settings/page/src/binder.rs >++++ b/cosmic-settings/page/src/binder.rs >+@@ -204,16 +204,11 @@ impl<Message: 'static> Binder<Message> { >+ &'a self, >+ rule: &'a Regex, >+ ) -> impl Iterator<Item = (crate::Entity, section::Entity)> + 'a { >+- generator::Gn::new_scoped_local(|mut s| { >+- for (page, sections) in self.content.iter() { >+- for id in sections { >+- if self.sections[*id].search_matches(rule) { >+- s.yield_((page, *id)); >+- } >+- } >+- } >+- >+- generator::done!(); >++ self.content.iter().flat_map(move |(page, sections)| { >++ sections >++ .into_iter() >++ .filter(|&id| self.sections[*id].search_matches(rule)) >++ .map(move |&id| (page, id)) >+ }) >+ } >+ >-- >2.42.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51325
:
16734
|
16735
|
16736
|
16737
|
16738
|
16739
|
16740
|
16741
|
16742
|
16743
|
16744
|
16745
|
16746
|
16747
|
16748
|
16749
|
16750
|
16751
|
16752
|
16934
|
16935
|
16936
|
16937
|
16938
|
16939
|
16940
|
17405
|
17406
|
17407
|
17408
|
17409