dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/27] sparc32: sunset sun4m and sun4d
@ 2023-12-19 22:03 Sam Ravnborg via B4 Relay
  2023-12-19 22:03 ` [PATCH 01/27] sparc32: Update defconfig to LEON SMP Sam Ravnborg via B4 Relay
                   ` (29 more replies)
  0 siblings, 30 replies; 49+ messages in thread
From: Sam Ravnborg via B4 Relay @ 2023-12-19 22:03 UTC (permalink / raw)
  To: David S. Miller, Arnd Bergmann, Andreas Larsson
  Cc: linux-fbdev, Greg Kroah-Hartman, Helge Deller, linux-usb,
	linux-sound, Takashi Iwai, dri-devel, Jaroslav Kysela, Alan Stern,
	Alexander Viro, sparclinux, Sam Ravnborg, linux-kernel

This is the second attempt to sunset sun4m and sun4d.
See [1] for the inital attempt.

The sun4m and sun4d parts of the kernel have seen no real interest
for several years now. Last time a few people surfaced, but it was
either due to a personal project or for nostalgic reasons.
It is time to let go and drop the parts of sparc32 that in reality
are not in use.

LEON from Frontgrade Gaisler is the only real user of sparc32,
and this patchset reduces sparc32 to what is required by LEON.

The defconfig is first adapted to the one used by Gaisler.
Then the patches removes sun4m and sun4d specific
implementations such as small drivers, SMP support, IRQ suppor etc.

Removing sun4m and sun4d support allowed removal of the run time
patching of the code as well as a lot of assembler code.
The result is a much cleaner assembler code that is easier to
understand and thus maintain and extend.

So far the code builds but it has seen no run-time testing.

If anyone can tell me how to boot a linux kernel with the leon_genric
machine with QEMU that would be super as this would be a minimal
testing that others can reproduce as well.
I assume QEMU needs a few patches to make it work, but maybe I
just failed to use the right bootloader.

TODO before this can be applied:
- Ack from davem - as he is the principal sparc maintainer
- Tested-by: preferably on a target or QEMU (see above)
  I expect bugs as there are some involved changes!

Ideas for the future
- Apply the most relevant downstream Gaisler patches
  - The ones introducing CAS should have preference as we then
    can drop the cmpxchg emulation
- Adjust defconfig to include all Gaisler drivers to make sure they
  see build time coverage
- Move the leon bits from leon files to the general files
  - Add leon smp support to smp_32.c
  - Add leon irq support to irq_32.c
- Integrate leom_mm support with srmmu and drop some of the
  function operations that are no longer needed
- The current sparc32 code assume the bootloader uses the prom
  provided by sun. Maybe migrate over to a more modern device tree
  way of working.
- Drop some of the homegrown memory allocators and use memblocks

[1]: https://lore.kernel.org/all/20201218184347.2180772-1-sam@ravnborg.org/

        Sam

---
Sam Ravnborg (27):
      sparc32: Update defconfig to LEON SMP
      sparc32: Drop sun4m/sun4d support from head_32.S
      sparc32: Drop floppy support
      sparc32: Drop sun4m specific led driver
      sparc32: Drop sun specific power management drivers
      sparc32: Drop auxio support
      sparc32: Drop run-time patching of ipi trap
      sparc32: Drop patching of interrupt vector
      sparc32: Drop sun4m/sun4d specific irq handling
      sparc32: Drop sun4d/sun4m smp support
      sparc32: Drop pcic support
      sparc32: Drop mbus support
      sparc32: Drop unused function __get_{phys,iospace}
      sparc32: Drop unused mmu models
      sparc32: Drop check for sparc_model
      sparc32: Drop use of sparc_config
      sparc32: Drop run-time patching of ASI instructions
      sparc32: Drop support for 7 register windows
      sparc32: Drop additional sun4d bits
      sparc32: Drop unused prom ranges support
      sparc32: Drop unused iommu support
      sparc32: Drop sun4m irq support
      sparc32: Drop unused trampoline code
      sparc32: Drop config SPARC_LEON
      sparc32: Drop sbus support
      sbus: char: Drop now unused uctrl driver
      fbdev/p9100: Drop now unused driver p9100

 arch/sparc/Kconfig                    |  54 +--
 arch/sparc/configs/sparc32_defconfig  | 170 +++----
 arch/sparc/include/asm/asmmacro.h     |  22 -
 arch/sparc/include/asm/auxio_32.h     |  73 +--
 arch/sparc/include/asm/cpu_type.h     |  18 -
 arch/sparc/include/asm/elf_32.h       |   2 -
 arch/sparc/include/asm/fb.h           |   8 +-
 arch/sparc/include/asm/floppy.h       |   2 -
 arch/sparc/include/asm/floppy_32.h    | 393 ----------------
 arch/sparc/include/asm/io-unit.h      |  59 ---
 arch/sparc/include/asm/io_32.h        |  83 ----
 arch/sparc/include/asm/iommu.h        |   2 -
 arch/sparc/include/asm/iommu_32.h     | 122 -----
 arch/sparc/include/asm/irq_32.h       |   2 -
 arch/sparc/include/asm/mbus.h         |  97 ----
 arch/sparc/include/asm/mxcc.h         | 138 ------
 arch/sparc/include/asm/obio.h         | 226 ---------
 arch/sparc/include/asm/oplib_32.h     |  11 -
 arch/sparc/include/asm/pcic.h         | 130 ------
 arch/sparc/include/asm/pgtable_32.h   |  24 -
 arch/sparc/include/asm/pgtsrmmu.h     |  33 +-
 arch/sparc/include/asm/ross.h         | 192 --------
 arch/sparc/include/asm/sbi.h          | 116 -----
 arch/sparc/include/asm/sections.h     |   3 -
 arch/sparc/include/asm/swift.h        | 107 -----
 arch/sparc/include/asm/switch_to_32.h |   1 -
 arch/sparc/include/asm/timer_32.h     |   1 +
 arch/sparc/include/asm/tsunami.h      |  65 ---
 arch/sparc/include/asm/turbosparc.h   | 126 -----
 arch/sparc/include/asm/viking.h       | 255 -----------
 arch/sparc/include/asm/winmacro.h     |  11 +-
 arch/sparc/kernel/Makefile            |   8 +-
 arch/sparc/kernel/apc.c               | 196 --------
 arch/sparc/kernel/auxio_32.c          | 139 ------
 arch/sparc/kernel/cpu.c               |   1 -
 arch/sparc/kernel/devices.c           |  10 +-
 arch/sparc/kernel/entry.S             | 413 +----------------
 arch/sparc/kernel/etrap_32.S          |  50 +-
 arch/sparc/kernel/head_32.S           | 255 +----------
 arch/sparc/kernel/ioport.c            |  55 +--
 arch/sparc/kernel/irq.h               |  85 +---
 arch/sparc/kernel/irq_32.c            | 133 +-----
 arch/sparc/kernel/kernel.h            |  53 +--
 arch/sparc/kernel/led.c               | 146 ------
 arch/sparc/kernel/leon_kernel.c       |  53 +--
 arch/sparc/kernel/leon_pmc.c          |  16 +-
 arch/sparc/kernel/leon_smp.c          |   3 -
 arch/sparc/kernel/of_device_32.c      |  18 +-
 arch/sparc/kernel/pcic.c              | 840 ----------------------------------
 arch/sparc/kernel/pmc.c               | 100 ----
 arch/sparc/kernel/process_32.c        |  10 -
 arch/sparc/kernel/rtrap_32.S          |  73 ++-
 arch/sparc/kernel/setup_32.c          | 115 -----
 arch/sparc/kernel/smp_32.c            | 102 +----
 arch/sparc/kernel/sun4d_irq.c         | 519 ---------------------
 arch/sparc/kernel/sun4d_smp.c         | 415 -----------------
 arch/sparc/kernel/sun4m_irq.c         | 478 -------------------
 arch/sparc/kernel/sun4m_smp.c         | 275 -----------
 arch/sparc/kernel/time_32.c           |  68 +--
 arch/sparc/kernel/trampoline_32.S     | 127 +----
 arch/sparc/kernel/ttable_32.S         |   9 +-
 arch/sparc/kernel/vmlinux.lds.S       |   5 -
 arch/sparc/kernel/wof.S               |  61 +--
 arch/sparc/kernel/wuf.S               |  41 +-
 arch/sparc/mm/Makefile                |   4 +-
 arch/sparc/mm/hypersparc.S            | 414 -----------------
 arch/sparc/mm/io-unit.c               | 286 ------------
 arch/sparc/mm/iommu.c                 | 455 ------------------
 arch/sparc/mm/mm_32.h                 |   4 -
 arch/sparc/mm/srmmu.c                 | 836 +--------------------------------
 arch/sparc/mm/srmmu_access.S          |  83 ----
 arch/sparc/mm/swift.S                 | 256 -----------
 arch/sparc/mm/tsunami.S               | 132 ------
 arch/sparc/mm/viking.S                | 284 ------------
 arch/sparc/prom/Makefile              |   1 -
 arch/sparc/prom/init_32.c             |   2 -
 arch/sparc/prom/misc_32.c             |   2 -
 arch/sparc/prom/ranges.c              | 114 -----
 drivers/sbus/char/Kconfig             |   8 -
 drivers/sbus/char/Makefile            |   1 -
 drivers/sbus/char/uctrl.c             | 435 ------------------
 drivers/usb/host/Kconfig              |   2 +-
 drivers/usb/host/ehci-hcd.c           |   4 +-
 drivers/usb/host/uhci-hcd.c           |   2 +-
 drivers/video/fbdev/Kconfig           |  10 +-
 drivers/video/fbdev/Makefile          |   1 -
 drivers/video/fbdev/p9100.c           | 372 ---------------
 sound/sparc/Kconfig                   |   1 +
 88 files changed, 318 insertions(+), 10809 deletions(-)
---
base-commit: bee0e7762ad2c6025b9f5245c040fcc36ef2bde8
change-id: 20231219-sam-sparc32-sunset-v3-4751ea89da2d

Best regards,
-- 
Sam Ravnborg <sam@ravnborg.org>


^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2024-02-17 11:59 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-19 22:03 [PATCH 00/27] sparc32: sunset sun4m and sun4d Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 01/27] sparc32: Update defconfig to LEON SMP Sam Ravnborg via B4 Relay
2023-12-19 22:23   ` Arnd Bergmann
2023-12-20  6:43     ` Sam Ravnborg
2023-12-20  8:37       ` Arnd Bergmann
2023-12-19 22:03 ` [PATCH 02/27] sparc32: Drop sun4m/sun4d support from head_32.S Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 03/27] sparc32: Drop floppy support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 04/27] sparc32: Drop sun4m specific led driver Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 05/27] sparc32: Drop sun specific power management drivers Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 06/27] sparc32: Drop auxio support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 07/27] sparc32: Drop run-time patching of ipi trap Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 08/27] sparc32: Drop patching of interrupt vector Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 09/27] sparc32: Drop sun4m/sun4d specific irq handling Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 10/27] sparc32: Drop sun4d/sun4m smp support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 11/27] sparc32: Drop pcic support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 12/27] sparc32: Drop mbus support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 13/27] sparc32: Drop unused function __get_{phys,iospace} Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 14/27] sparc32: Drop unused mmu models Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 15/27] sparc32: Drop check for sparc_model Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 16/27] sparc32: Drop use of sparc_config Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 17/27] sparc32: Drop run-time patching of ASI instructions Sam Ravnborg via B4 Relay
2024-02-16 17:12   ` Andreas Larsson
2024-02-17 11:59     ` Sam Ravnborg
2023-12-19 22:03 ` [PATCH 18/27] sparc32: Drop support for 7 register windows Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 19/27] sparc32: Drop additional sun4d bits Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 20/27] sparc32: Drop unused prom ranges support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 21/27] sparc32: Drop unused iommu support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 22/27] sparc32: Drop sun4m irq support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 23/27] sparc32: Drop unused trampoline code Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 24/27] sparc32: Drop config SPARC_LEON Sam Ravnborg via B4 Relay
2023-12-20  5:52   ` Greg Kroah-Hartman
2023-12-19 22:03 ` [PATCH 25/27] sparc32: Drop sbus support Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 26/27] sbus: char: Drop now unused uctrl driver Sam Ravnborg via B4 Relay
2023-12-19 22:03 ` [PATCH 27/27] fbdev/p9100: Drop now unused driver p9100 Sam Ravnborg via B4 Relay
2024-01-02  8:26   ` Thomas Zimmermann
2024-01-02 16:31     ` Sam Ravnborg
2023-12-20  8:36 ` [PATCH 00/27] sparc32: sunset sun4m and sun4d Arnd Bergmann
2023-12-20  9:28   ` John Paul Adrian Glaubitz
2023-12-20  9:34   ` David Laight
2023-12-20  9:51     ` Arnd Bergmann
2023-12-20  9:54   ` John Paul Adrian Glaubitz
2023-12-20 10:47     ` Arnd Bergmann
2023-12-20 11:30       ` Mark Cave-Ayland
2023-12-20 15:22         ` Sam Ravnborg
2023-12-20 17:25           ` John Paul Adrian Glaubitz
2023-12-22 15:27             ` Andreas Larsson
2023-12-20 14:42 ` Kjetil Oftedal
2024-02-04 19:21 ` Sam Ravnborg
2024-02-05  5:12   ` John Paul Adrian Glaubitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).