TODO

From Linux PARISC Wiki
(Difference between revisions)
Jump to: navigation, search
m
m
(15 intermediate revisions by one user not shown)
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 2022-01-22 ==
 
* 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 kernel: make ARCH=parisc tools/perf
* Implement TOC in qemu ?
+
* Fix mouse in qemu (HP-UX) - reported by Stefano Repici, proposed patch: https://github.com/hdeller/qemu-hppa/commit/87a657982449d5a0fa44fbb741e6276bb7f1e7c4
 +
* STARTED: Implement TOC in qemu
 +
* Add Linux kernel PIM driver - /sys/firmware/pim/*
 +
* SeaBIOS: Add bigger font to STI ROM
 +
* qemu build issues
 +
** Check qemu bug: https://gitlab.com/qemu-project/qemu/-/issues/635
 +
** qemu and executable stack: The following error occurred on pacific in mlton build: /usr/lib/mlton/mlton-compile: error while loading shared libraries: libm.so.6: cannot enable executable stack as shared object requires: Invalid argument
 +
** kcm-fcitx5 fails to build on qemu but builds on real hardware.
 +
** libime fails to build on real hardware but builds with qemu!
 +
** It looks like haskell packages still fail on qemu (e.g., haskell-swish).
 +
** kdenlive = Illegal instruction
 +
** Illegal instruction: https://buildd.debian.org/status/fetch.php?pkg=haruna&arch=hppa&ver=0.6.3.1-1&stamp=1641027396&raw=0
 
* __muldi3 routine in libgcc.a in kernel uses xmpyu FP instruction (qgis mail) -> bad! -> add linker check?
 
* __muldi3 routine in libgcc.a in kernel uses xmpyu FP instruction (qgis mail) -> bad! -> add linker check?
 
** 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
 +
** Fixed: https://lists.nongnu.org/archive/html/qemu-devel/2021-12/msg04501.html
 
  /tmp/cceXP0uE.s: Assembler messages:
 
  /tmp/cceXP0uE.s: Assembler messages:
 
  /tmp/cceXP0uE.s:1493: Error: Invalid Shift/Extract/Deposit Condition.
 
  /tmp/cceXP0uE.s:1493: Error: Invalid Shift/Extract/Deposit Condition.
Line 39: Line 51:
 
** 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 72:
 
* 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 90:
 
*** 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
Line 885: Line 896:
 
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f9fee4cdebfbe695c297e5b603a275e2557c1cc parisc: Fix "make install" on newer debian releases] (backported to v3.13+)
 
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f9fee4cdebfbe695c297e5b603a275e2557c1cc parisc: Fix "make install" on newer debian releases] (backported to v3.13+)
 
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=afdb4a5b1d340e4afffc65daa21cc71890d7d589 '''parisc: Mark cr16 CPU clocksource unstable on all SMP machines'''] (backported to v4.14+)
 
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=afdb4a5b1d340e4afffc65daa21cc71890d7d589 '''parisc: Mark cr16 CPU clocksource unstable on all SMP machines'''] (backported to v4.14+)
 +
** parisc: Clear stale IIR value on instruction access rights trap
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f66fce0f46560b9e910787ff7ad0974441c4f9c '''parisc: Correct completer in lws start'''] (backported to v4.19+)
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d3a5a68cff47f6eead84504c3c28376b85053242 '''parisc: Fix mask used to select futex spinlock'''] (backported to v5.10+)
 +
** parisc: remove ARCH_DEFCONFIG
 +
* Kernel 5.17
 +
** parisc: io: Improve the outb(), outw() and outl() macros
 +
** parisc: pdc_stable: use default_groups in kobj_type
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4b9d2a731c3d22a05c1bccdb11b6e00054ff5fda parisc: Switch user access functions to signal errors in r29 instead of r8]
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=712a270d2db967b387338c26c3dc04ccac3fcec3 parisc: Fix pdc_toc_pim_11 and pdc_toc_pim_20 definitions] (backported to v5.16)
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c1c72d9bbf2bf91670ac589adf037f433642fff5 parisc: Add kgdb io_module to read chars via PDC]
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d6ab9fc74513ae6501afcdae2547334a03b9a5c9 '''parisc: Enable TOC (transfer of contents) feature unconditionally''']
 +
** parisc: Re-use toc_stack as hpmc_stack
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=16f035d9e264d95d61d5f4056bb00d8169a7a3d1 '''sections: Fix __is_kernel() to include init ranges''']
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=68d247ad38b1ef46bd945a5220fa6d28c901c2f2 parisc: Default to 16 CPUs on 32-bit kernel]
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=45458aa49abe3b0ac68ce86b3d4ca3a97eaeac53 parisc: Define depi_safe macro]
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=db19c6f1a2a353cc8dec35b4789733a3cf6e2838 '''parisc: Fix lpa and lpa_user defines'''] (backported to v5.2+)
 +
** parisc: Avoid calling faulthandler_disabled() twice
 +
** parisc: Don't call faulthandler_disabled() in do_page_fault()
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=20dda87bdc6567e864942ead40bc149ebbe3ae79 parisc: Enhance page fault termination message]
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0585d742ff2d82accd26c661c60a6d260429c4a '''parisc: Rewrite light-weight syscall and futex code''']
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=72c3dd8207de4178ae50553666129af7231f86e7 '''parisc: Add lws_atomic_xchg and lws_atomic_store syscalls''']
 +
** parisc: decompressor: do not copy source files while building
 +
** parisc: Add visible flag to toc_stack variable
 +
** parisc: Use safer strscpy() in setup_cmdline()
 +
** [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5f7ee6e37a3cadefe45378c17c4285fa41141d92 '''parisc: Autodetect default output device and set console= kernel parameter''']
 +
** parisc: Fix missing prototype for 'toc_intr' warning in toc.c
 +
** parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries
  
 
== Debian kernel and userspace programs ==
 
== Debian kernel and userspace programs ==

Revision as of 11:12, 22 January 2022

Contents

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

Status & TODO 2022-01-22

/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