TODO

From Linux PARISC Wiki
(Difference between revisions)
Jump to: navigation, search
m
m (PA-RISC Linux TODO (actually this is Helge's TODO list))
Line 1: Line 1:
 
= PA-RISC Linux TODO (actually this is Helge's TODO list) =
 
= PA-RISC Linux TODO (actually this is Helge's TODO list) =
  
== Status & TODO 2021-12-06 ==
+
== Status & TODO 2021-12-29 ==
 
* STARTED: [https://patchwork.kernel.org/project/linux-parisc/patch/20211031204952.25678-2-svens@stackframe.org/ Visualize FX framebuffer/DRM support (by Sven Schnelle)]
 
* STARTED: [https://patchwork.kernel.org/project/linux-parisc/patch/20211031204952.25678-2-svens@stackframe.org/ Visualize FX framebuffer/DRM support (by Sven Schnelle)]
 
* Fix mouse in qemu (HP-UX).
 
* Fix mouse in qemu (HP-UX).
Line 8: Line 8:
 
** https://patchwork.kernel.org/project/linux-parisc/patch/YWSSVwQ9tc9YaC+f@ls3530/
 
** https://patchwork.kernel.org/project/linux-parisc/patch/YWSSVwQ9tc9YaC+f@ls3530/
 
** 64bit kernel still needs patches (or gcc fix from Dave)
 
** 64bit kernel still needs patches (or gcc fix from Dave)
* qemu bug building gcc-arm-none-eabi: https://buildd.debian.org/status/fetch.php?pkg=gcc-arm-none-eabi&arch=hppa&ver=15%3A10.3-2021.07-1&stamp=1633455020&raw=0
+
* STARTED: qemu bug building gcc-arm-none-eabi: https://buildd.debian.org/status/fetch.php?pkg=gcc-arm-none-eabi&arch=hppa&ver=15%3A10.3-2021.07-1&stamp=1633455020&raw=0
 
** same for abinit: https://buildd.debian.org/status/fetch.php?pkg=abinit&arch=hppa&ver=9.6.1-1&stamp=1634170491&raw=0
 
** same for abinit: https://buildd.debian.org/status/fetch.php?pkg=abinit&arch=hppa&ver=9.6.1-1&stamp=1634170491&raw=0
 
  /tmp/cceXP0uE.s: Assembler messages:
 
  /tmp/cceXP0uE.s: Assembler messages:
Line 16: Line 16:
 
  /tmp/cceXP0uE.s:1493: Error: Invalid operands
 
  /tmp/cceXP0uE.s:1493: Error: Invalid operands
 
  make[4]: *** [Makefile:1117: alias.o] Error 1
 
  make[4]: *** [Makefile:1117: alias.o] Error 1
 +
** FOUND BUG: Bug is in function atomic_store_3() in qemu source file: target/hppa/op_helper.c
 
* From Adrian Glaubitz (9/29/2021): The Rust project merged a change [1] that allows rustc to use GCC instead of LLVM as codegen backend for generating machine code through libgccjit. This means that we are in principal able now to build Rust code for all the architectures that GCC support but LLVM doesn't, which includes hppa. Please see this [2] and this [3] comment to see how to get started with cross-building the Rust compiler for a new target using libgccjit. We will have to add these new architectures to the libc crate first, see an example PR for that here [4]. Since I can't work on all these targets myself, I wanted to ask you to help me and get the support for hppa added to libc and rustc where necessary.
 
* From Adrian Glaubitz (9/29/2021): The Rust project merged a change [1] that allows rustc to use GCC instead of LLVM as codegen backend for generating machine code through libgccjit. This means that we are in principal able now to build Rust code for all the architectures that GCC support but LLVM doesn't, which includes hppa. Please see this [2] and this [3] comment to see how to get started with cross-building the Rust compiler for a new target using libgccjit. We will have to add these new architectures to the libc crate first, see an example PR for that here [4]. Since I can't work on all these targets myself, I wanted to ask you to help me and get the support for hppa added to libc and rustc where necessary.
 
** [1] https://github.com/rust-lang/rust/pull/87260
 
** [1] https://github.com/rust-lang/rust/pull/87260
Line 39: Line 40:
 
** STARTED: Finish LASI and 82596 NIC for QEMU -> https://github.com/hdeller/qemu-hppa/commits/lasi
 
** STARTED: Finish LASI and 82596 NIC for QEMU -> https://github.com/hdeller/qemu-hppa/commits/lasi
 
* Probably fixed: Fix stifb kernel hangs with latest kernels (4.9ff)
 
* Probably fixed: Fix stifb kernel hangs with latest kernels (4.9ff)
* Add BPF assember implementation
+
* Add BPF assembler implementation
 
* Enable SPARSEMEM_VMEMMAP_ENABLE
 
* Enable SPARSEMEM_VMEMMAP_ENABLE
 
* ONGOING: Enable UBSAN and fix fallouts
 
* ONGOING: Enable UBSAN and fix fallouts
Line 60: Line 61:
 
* Enable BlockTLB on PA1.x for STI framebuffer (see block tlb info in sti.pdf documentation) and ftp://parisc.parisc-linux.org/docs/pdc32.pdf
 
* Enable BlockTLB on PA1.x for STI framebuffer (see block tlb info in sti.pdf documentation) and ftp://parisc.parisc-linux.org/docs/pdc32.pdf
 
* convert unaligned handler to use get_user/put_user inline asm
 
* convert unaligned handler to use get_user/put_user inline asm
* Fix boot crash from Al Viro with sti gfx card (24.03.17)
+
* Fix boot crash from Al Viro with sti gfx card (24.03.17) (probably fixed in the meantime)
 
* debian parisc perl bug (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721537) shows that mmap on parisc linux is horribly inefficient.  We allocate huge maps for small files. This should be improved. Mailthread: " parisc mmap: private file maps" ,http://www.spinics.net/lists/linux-parisc/msg05083.html  or  https://rt.perl.org/Public/Bug/Display.html?id=119567  https://rt.perl.org/Public/Bug/Display.html?id=119567  
 
* debian parisc perl bug (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721537) shows that mmap on parisc linux is horribly inefficient.  We allocate huge maps for small files. This should be improved. Mailthread: " parisc mmap: private file maps" ,http://www.spinics.net/lists/linux-parisc/msg05083.html  or  https://rt.perl.org/Public/Bug/Display.html?id=119567  https://rt.perl.org/Public/Bug/Display.html?id=119567  
 
* unaligned warning (from glibc) when running apt-get: https://sourceware.org/bugzilla/show_bug.cgi?id=20243
 
* unaligned warning (from glibc) when running apt-get: https://sourceware.org/bugzilla/show_bug.cgi?id=20243
Line 78: Line 79:
 
*** Another issue that I have been wondering about is the performance of our kernel spinlock code.  PA 8800 and PA 8900 processors have a cache line length of 128 bytes.  I believe thereare some places where we assume 64 bytes.  We also allocate spinlocks on 16 byte boundaries. We might get better performance if we allocated on 32 (PA 1.X) and 128 (PA 2.0).  Helge: change: __PA_LDCW_ALIGNMENT
 
*** Another issue that I have been wondering about is the performance of our kernel spinlock code.  PA 8800 and PA 8900 processors have a cache line length of 128 bytes.  I believe thereare some places where we assume 64 bytes.  We also allocate spinlocks on 16 byte boundaries. We might get better performance if we allocated on 32 (PA 1.X) and 128 (PA 2.0).  Helge: change: __PA_LDCW_ALIGNMENT
 
*** I've also seen that better performance may be obtained by doing a byte store to spinlock prior to ldcw.  This dirties the cache line and allows operation in cache in certain situations. I think this mainly applies to PA 1.X but I'm not sure.  I have some example code somewhere. Helge:  change struct arch_spinlock_t; in spinlock_types.h
 
*** I've also seen that better performance may be obtained by doing a byte store to spinlock prior to ldcw.  This dirties the cache line and allows operation in cache in certain situations. I think this mainly applies to PA 1.X but I'm not sure.  I have some example code somewhere. Helge:  change struct arch_spinlock_t; in spinlock_types.h
** Implement ltrace on hppa
 
 
** SLAB breaks, SLUB works, why? Mail from Guy Martin.
 
** SLAB breaks, SLUB works, why? Mail from Guy Martin.
 
** 3.14 partly: return ((unsigned long) mapping >> 7) & ((SHMLBA >> PAGE_SHIFT) - 1); in arch/parisc/kernel/sys_parisc.c
 
** 3.14 partly: return ((unsigned long) mapping >> 7) & ((SHMLBA >> PAGE_SHIFT) - 1); in arch/parisc/kernel/sys_parisc.c

Revision as of 16:39, 29 December 2021

Contents

PA-RISC Linux TODO (actually this is Helge's TODO list)

Status & TODO 2021-12-29

/tmp/cceXP0uE.s: Assembler messages:
/tmp/cceXP0uE.s:1493: Error: Invalid Shift/Extract/Deposit Condition.
/tmp/cceXP0uE.s:1493: Error: Undefined absolute constant: '.loc'.
/tmp/cceXP0uE.s:1493: Error: Field out of range [0..31] (-1).
/tmp/cceXP0uE.s:1493: Error: Invalid operands
make[4]: *** [Makefile:1117: alias.o] Error 1
  • Kernel: still missing Linux kernel development (no patches available yet):
    • maybe implement transparent huge pages (due to cache coherency technically only possible on PA8500-PA8700 CPUs, not possible on PA8800-PA8900 CPUs)
    • optimize flush_dcache_page() implementation like sparc. See Documentation/cachetlb.txt, e.g. used in aio subsystem
    • NO_IRQ -> should be converted to (0) instead of (-1) -> Helge (check assembly, check in drivers/parisc/*)
    • check assembly in drivers/parisc/*
    • use pdc_add_valid() in kern_addr_valid(), protect against crashable acesses (like for superio-pc-drivers-detection in lp), add pdc_add_valid() to create a probe_kernel_read() implementation.
  • Kernel: Low priority patches needs further work
    • disable FP-register save/restore at kernel entry? - https://patchwork.kernel.org/patch/3975291/
    • enable 16k/64k kernel page sizes (still cacheflushing-issues with SCSI driver, additional work in glibc needed to deal with >4k page size, e.g. ld-loader alignments of data/code segments)
    • Superdome support - can someone test? Should work better now with latest kernels (maybe ask Dennis Clarke <dclarke@blastwave.org>, Jan 2019).
    • implement BUG() and WARN() with inline assembly so that interrupt happens in delay branch of "or,<> %r0,cond,%r0". Probably not possible, because gcc will report "control reaches end of non-void function" warnings/errors.
  • 64-bit userspace support (from Dave Anglin, Nick Hudson):
    • 64-bit userspace, Binutils 64-bit binutils needs to be fixed to get multiple stub section support.
    • glibc port (hppa64 can use the generic thread code)
    • 64-bit support in gcc is probably pretty good as 64-bit HP-UX works fine.
    • gdb could be a problem due to a lack of a maintainer.
  • Debian packages / Userspace work
    • IMPORTANT: fix OpenJDK - fixes required in zeroport (stack grows up!).
    • gcc -> join 32- and 64bit compiler, make "-m64" work, get rid of hppa64-linux-gnu-gcc
  • userspace
  • palo (PA-RISC Boot Loader):
    • When listing directory contents, resolve and print symlink target file names too, e.g. "vmlinux -> linux-5.12.1-64bit".
    • Fix palo deb package to build iplboot natively (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851792)
    • Modify (if possible), that palo can read (sequential) tftpbootable-vmlinuxes as well as the current boot-vmlinux images (simplifies build/handling)

Upstream PA-RISC-related kernel patch history

Debian kernel and userspace programs

Debian kernel / Generic Kernel bugs fixed

    • DONE: Fixed 64bit SMP kernel & sticon on machines with more than 4GB RAM (Kernel 3.12)
    • DONE: Lots of syscall fixes regarding compat kernel
    • DONE: send patches to remove UP from debian kernels, use sil680 instead of siimage, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721191 -> fixed in 3.12 / 3.13
    • DONE: Enable BMC in c8000 default kernel config - ipmi driver (CONFIG_IPMI_HANDLER=y) - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747482
    • DONE: remove HIL RTC from debian kernel - it creates a backtrace at boot because we have already another rtc0 active.
    • DONE: add ppdev driver, needed by CUPS, systemd reports missing module load (3.17 & 3.16 kernel)
    • DONE: Add crc-modules, event, isofs, jfs, mouse, sata, sound, squashfs, udf, uinput, scsi-common, scsi-extra, loop, serial and usb-serial debian-installer packages
    • DONE: Kernel build problem: a) disable -mfast-indirect-calls in Makefile, b) gcc compiler bug in > gcc-4.8.3-3
    • DONE: Drop HPUX-support from kernel (Kernel 4.0)
    • DONE: implemented HUGE pages
    • DONE: kernel timerfd_settime/timerfd_gettime issue, test with debian package: liblinux-fd-perl -> https://patchwork.kernel.org/patch/7951661/, backported to all kernels
    • DONE: kernel ptrace bug: http://thread.gmane.org/gmane.linux.ports.parisc/26273, possible fix: https://patchwork.kernel.org/patch/8063301/
    • DONE: Implement CONFIG_DEBUG_STACK_USAGE, in kernel 4.6
    • DONE: Use 32bit exception table entries, in kernel 4.6
    • DONE: implemented seccomp syscal, including SECCOMP_MODE_STRICT and mode 2
    • DONE: Fixed FTRACE support (http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=366dd4ea9d5f0eb78fdf4982d76506f99480ec0a)
    • DONE: Add syscall ftrace support
    • DONE: Simplify get_user()/put_user() with regard to %sr0/%sr2 usage.
    • DONE: Add tracehook support (needed for seccomp testcases, gdb, ...)
    • DONE: Added high-resolution sched_clock clocksources in 4.7, needed for debian packages: ismrmrd, haskell-http-conduit, ...
    • DONE: Detect physically broken memory via Page Deallocation Table (PDT), initial support in kernel 4.13
    • DONE: Make kernel self-decompressing (instead of palo reading gzipped kernels)
    • DONE: fix %pF and %pS usage in all kernel code
    • DONE: Enabled BMC/IPMI including Remote power on/off on C8000 and rp3410 machines (kernel 4.17 and above)
    • DONE: use CONFIG_COMPAT_BINFMT_ELF and get rid of arch/parisc/kernel/binfmt_elf32.c
    • DONE: Fix kernel writing core file, gdb reporting: BFD: Warning: /tmp/core.http.1655.ls3011.1465554447 is truncated: expected core file size >= 2187264, found: 2121728.
    • DONE: Find way to extract vmlinux out of vmlinuz (Kernel 4.19)
    • DONE: Implement alternative coding for UP & SMP, one debian kernel for UP and SMP, optimizations to avoid cache flushes on cache-less systems and other qemu-related speed-ups to avoid unnecessary syncronization (Kernel 4.20)
    • DONE: IRQ Balancing was broken, http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f73493eb4aecdd6edd8a749890e6e2dcfa0a7978
    • DONE: Added kgdb and kprobes in kernel 5.2, by Sven Schnelle
    • DONE: report on C8000 one socket with 2 cores
    • DONE: Check Kernel boot code if RAM of machine is big enough (e.g. is booting on 710 machine with 60MB possible?) - https://patchwork.kernel.org/patch/10888283/
    • DONE: convert to SPARSEMEM, instead of DISCONTIGMEM
    • DONE: (NOT POSSIBLE:) Enable huge pages on kernel text for C8000 as well - not possible, will crash due to required equivalent aliasing of caches.
    • DONE: Enable __ro_after_init
    • DONE: add dynamic ftrace support - provided by Sven in kernel 5.3
    • DONE: Fix fallouts from strace: http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b7dc5a071ddf69c0350396b203cba32fe5bab510,
    • DONE: implement kexec syscall
    • DONE: Analyze futex hang (CPU soft lockup) situation with test-lock testcase in the libprelude debian package - fixed by parisc: Add atomic64_set_release() define to avoid CPU soft lockups
    • DONE: Add TOC handler, sending TOC via IPMI interface "toc s"
    • DONE: autofs/automounter is broken, patch sent to list, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892953
  • QEMU:
    • DONE: Add kernel fw_cfg support (drivers/firmware/qemu_fw_cfg.c)

ABI breakages (e.g. dropped HP-UX support)

Considerations between Debian unstable and Debian Jessie release

Jessie was not stable on SMP machines, particularly those with PA8800/PA8900 processors. It's recommended to use kernel 4.4.15 or later. The current default gcc for unstable is gcc 5.4. Most hppa fixes have been back ported to 4.9 but not all. It shouldn't hurt to use binutils from unstable. Debian glibc 2.23 is best. Most old packages should still work although there maybe inequivalent aliasing issues which are relevant on PA8800. There's also a nasty issue with gmon_start being in every shared library in Jessie. This caused a few headaches and potentially breaks applications when it's removed from a library. If you stick with the glibc in Jessie, multithreaded applications may not work as well as they could, but maybe that's not important. The kernel update is the most important one. Since hppa moved to ports, there has been a huge number of bug fixes. System stability is dramatically improved and I believe more packages are available than ever before. It's better to run unstable and just be selective about running "apt-get upgrade". (by Dave Anglin)

parisc-linux.org Homepage and Debian build server infrastructure work

Linus Torvalds barking at parisc

Testsuites, kernel and userspace testing tools

TODO Drivers

  • write Lasi floppy driver
  • write Suckyio floppy driver
  • write spifi driver (rbrad)
  • modify ncr53c8xx driver for Outfield (735 & 755)
  • write GSC FDDI driver
  • write Timi ASIC (74x) support
  • EISA DMA support

Review all the todo entries below!

Personal tools