sparc32: sunset sun4m and sun4d
Subsystems (9)
v2 cover sparc32: sunset sun4m and sun4d
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.
Changes in v2:
- Rebased on top of Andreas' for-next branch
- Collected ack's
- Added patch to remove cpuid patching (Andreas)
- Run-time testing using qemu (Andreas, Mark Cave-Ayland)
Sam
[1]: https://lore.kernel.org/all/[email protected]/
---
Sam Ravnborg (28):
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 cpuid patching
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 sbus 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/setup.h | 12 - 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 | 12 - 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 | 426 +---------------- 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 | 84 +--- 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 | 109 ----- 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 | 434 ------------------ 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 + 89 files changed, 316 insertions(+), 10829 deletions(-)
---
base-commit: 84b76d05828a1909e20d0f66553b876b801f98c8
change-id: 20240309-sunset-3437be64cd5f
Best regards,
Signature · 1 line
Sam Ravnborg <[email protected]>
PATCH v2 1/28 sparc32: Update defconfig to LEON SMP
This is a copy of the leon_smp defconfig found in gaisler-buildroot-2023.02-1.0.
--- arch/sparc/configs/sparc32_defconfig | 171 +++++++++++++++++++---------------- 1 file changed, 91 insertions(+), 80 deletions(-)
arch/sparc/configs/sparc32_defconfig +91 -80
@@ -1,97 +1,108 @@ +CONFIG_DEFAULT_HOSTNAME="leon" CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y CONFIG_BLK_DEV_INITRD=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PCI=y -CONFIG_SUN_OPENPROMFS=m -CONFIG_BINFMT_MISC=m +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +# CONFIG_RD_LZO is not set +# CONFIG_RD_LZ4 is not set +# CONFIG_RD_ZSTD is not set +CONFIG_SMP=y +CONFIG_HZ_100=y +CONFIG_SPARC_LEON=y +CONFIG_SUN_OPENPROMFS=y +CONFIG_SUN_OPENPROMIO=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_BINFMT_MISC=y +# CONFIG_COMPACTION is not set CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m CONFIG_INET=y CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_INET_AH=y -CONFIG_INET_ESP=y -CONFIG_INET_IPCOMP=y -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_IPV6_TUNNEL=m -CONFIG_NET_PKTGEN=m -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_RAM=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_SR=m -CONFIG_CHR_DEV_SG=m -CONFIG_SCSI_QLOGICPTI=m -CONFIG_SCSI_SUNESP=y +# CONFIG_WIRELESS is not set +CONFIG_UEVENT_HELPER=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y CONFIG_NETDEVICES=y -CONFIG_DUMMY=m -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -CONFIG_SUNLANCE=y -CONFIG_HAPPYMEAL=m -CONFIG_SUNBMAC=m -CONFIG_SUNQE=m +CONFIG_GRETH=y +# CONFIG_NET_VENDOR_ALACRITECH is not set +# CONFIG_NET_VENDOR_AMAZON is not set +# CONFIG_NET_VENDOR_AMD is not set +# CONFIG_NET_VENDOR_AQUANTIA is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CADENCE is not set +# CONFIG_NET_VENDOR_CAVIUM is not set +# CONFIG_NET_VENDOR_CORTINA is not set +# CONFIG_NET_VENDOR_EZCHIP is not set +# CONFIG_NET_VENDOR_GOOGLE is not set +# CONFIG_NET_VENDOR_HUAWEI is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_MICROSEMI is not set +# CONFIG_NET_VENDOR_NI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NETRONOME is not set +# CONFIG_NET_VENDOR_PENSANDO is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_RENESAS is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SOLARFLARE is not set +# CONFIG_NET_VENDOR_SOCIONEXT is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_SYNOPSYS is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_NET_VENDOR_XILINX is not set +CONFIG_BROADCOM_PHY=y +CONFIG_CICADA_PHY=y +CONFIG_DAVICOM_PHY=y +CONFIG_ICPLUS_PHY=y +CONFIG_LXT_PHY=y +CONFIG_LSI_ET1011C_PHY=y +CONFIG_MARVELL_PHY=y +CONFIG_MICREL_PHY=y +CONFIG_NATIONAL_PHY=y +CONFIG_QSEMI_PHY=y +CONFIG_REALTEK_PHY=y +CONFIG_SMSC_PHY=y +CONFIG_STE10XP=y +CONFIG_VITESSE_PHY=y # CONFIG_WLAN is not set -CONFIG_INPUT_JOYDEV=m -CONFIG_INPUT_EVDEV=m -CONFIG_INPUT_EVBUG=m -CONFIG_KEYBOARD_ATKBD=m -CONFIG_KEYBOARD_SUNKBD=m -CONFIG_MOUSE_PS2=m -CONFIG_MOUSE_SERIAL=m -CONFIG_SERIO=m +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO_I8042 is not set CONFIG_SERIAL_SUNZILOG=y CONFIG_SERIAL_SUNZILOG_CONSOLE=y -CONFIG_SERIAL_SUNSU=y -CONFIG_SERIAL_SUNSU_CONSOLE=y -CONFIG_SPI=y -CONFIG_SPI_XILINX=m -CONFIG_SPI_XILINX_PLTFM=m -CONFIG_SUN_OPENPROMIO=m -CONFIG_EXT2_FS=y -CONFIG_EXT2_FS_XATTR=y -CONFIG_EXT2_FS_POSIX_ACL=y -CONFIG_EXT2_FS_SECURITY=y -CONFIG_AUTOFS_FS=m -CONFIG_ISO9660_FS=m +CONFIG_SERIAL_GRLIB_GAISLER_APBUART=y +CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE=y +# CONFIG_HW_RANDOM is not set +# CONFIG_HWMON is not set +# CONFIG_HID_GENERIC is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_RTC_HCTOSYS is not set +# CONFIG_RTC_INTF_SYSFS is not set +# CONFIG_RTC_INTF_PROC is not set +# CONFIG_RTC_INTF_DEV is not set +# CONFIG_VIRTIO_MENU is not set +# CONFIG_VHOST_MENU is not set +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_FSCACHE=y CONFIG_PROC_KCORE=y -CONFIG_ROMFS_FS=m +CONFIG_TMPFS=y +# CONFIG_MISC_FILESYSTEMS is not set CONFIG_NFS_FS=y +CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y -CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_NFS_FSCACHE=y CONFIG_NLS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DETECT_HUNG_TASK=y -# CONFIG_SCHED_DEBUG is not set -CONFIG_KGDB=y -CONFIG_KGDB_TESTS=y -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_PCBC=m -CONFIG_CRYPTO_MD4=y -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_TWOFISH=m -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -CONFIG_LIBCRC32C=m +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_FS=y +# CONFIG_RUNTIME_TESTING_MENU is not set
Signature · 1 line
2.34.1
PATCH v2 2/28 sparc32: Drop sun4m/sun4d support from head_32.S
In reply to Sam RavnborgRemove the most obvious parts of sun4* support from head_32.S. Use a single print if a sun4* machine is detected thus restricting boots to LEON machines.
--- arch/sparc/kernel/head_32.S | 190 +++----------------------------------------- 1 file changed, 9 insertions(+), 181 deletions(-)
arch/sparc/kernel/head_32.S +9 -181
@@ -45,11 +45,7 @@ cputypvar: .align 4 notsup: - .asciz "Sparc-Linux sun4/sun4c or MMU-less not supported\n\n" - .align 4 - -sun4e_notsup: - .asciz "Sparc-Linux sun4e support does not exist\n\n" + .asciz "This kernel only supports LEON SPARC V8\n\n" .align 4 /* The trap-table - located in the __HEAD section */
@@ -215,114 +211,10 @@ not_a_sun4: be leon_remap /* It is a LEON - jump */ nop - /* Sanity-check, is MMU enabled */ - lda [%g0] ASI_M_MMUREGS, %g1 - andcc %g1, 1, %g0 - be halt_notsup - nop - - /* Check for a viking (TI) module. */ - cmp %g3, PSR_IMPL_TI - bne srmmu_not_viking - nop - - /* Figure out what kind of viking we are on. - * We need to know if we have to play with the - * AC bit and disable traps or not. - */ - - /* I've only seen MicroSparc's on SparcClassics with this - * bit set. - */ - set 0x800, %g2 - lda [%g0] ASI_M_MMUREGS, %g3 ! peek in the control reg - and %g2, %g3, %g3 - subcc %g3, 0x0, %g0 - bnz srmmu_not_viking ! is in mbus mode - nop - - rd %psr, %g3 ! DO NOT TOUCH %g3 - andn %g3, PSR_ET, %g2 - wr %g2, 0x0, %psr - WRITE_PAUSE - - /* Get context table pointer, then convert to - * a physical address, which is 36 bits. - */ - set AC_M_CTPR, %g4 - lda [%g4] ASI_M_MMUREGS, %g4 - sll %g4, 0x4, %g4 ! We use this below - ! DO NOT TOUCH %g4 - - /* Set the AC bit in the Viking's MMU control reg. */ - lda [%g0] ASI_M_MMUREGS, %g5 ! DO NOT TOUCH %g5 - set 0x8000, %g6 ! AC bit mask - or %g5, %g6, %g6 ! Or it in... - sta %g6, [%g0] ASI_M_MMUREGS ! Close your eyes... - - /* Grrr, why does it seem like every other load/store - * on the sun4m is in some ASI space... - * Fine with me, let's get the pointer to the level 1 - * page table directory and fetch its entry. - */ - lda [%g4] ASI_M_BYPASS, %o1 ! This is a level 1 ptr - srl %o1, 0x4, %o1 ! Clear low 4 bits - sll %o1, 0x8, %o1 ! Make physical - - /* Ok, pull in the PTD. */ - lda [%o1] ASI_M_BYPASS, %o2 ! This is the 0x0 16MB pgd - - /* Calculate to KERNBASE entry. */ - add %o1, KERNBASE >> (PGDIR_SHIFT - 2), %o3 - - /* Poke the entry into the calculated address. */ - sta %o2, [%o3] ASI_M_BYPASS - - /* I don't get it Sun, if you engineered all these - * boot loaders and the PROM (thank you for the debugging - * features btw) why did you not have them load kernel - * images up in high address space, since this is necessary - * for ABI compliance anyways? Does this low-mapping provide - * enhanced interoperability? - * - * "The PROM is the computer." - */ - - /* Ok, restore the MMU control register we saved in %g5 */ - sta %g5, [%g0] ASI_M_MMUREGS ! POW... ouch - - /* Turn traps back on. We saved it in %g3 earlier. */ - wr %g3, 0x0, %psr ! tick tock, tick tock - - /* Now we burn precious CPU cycles due to bad engineering. */ - WRITE_PAUSE - - /* Wow, all that just to move a 32-bit value from one - * place to another... Jump to high memory. - */ - b go_to_highmem + /* Not LEON - halt */ + ba halt_notsup nop -srmmu_not_viking: - /* This works on viking's in Mbus mode and all - * other MBUS modules. It is virtually the same as - * the above madness sans turning traps off and flipping - * the AC bit. - */ - set AC_M_CTPR, %g1 - lda [%g1] ASI_M_MMUREGS, %g1 ! get ctx table ptr - sll %g1, 0x4, %g1 ! make physical addr - lda [%g1] ASI_M_BYPASS, %g1 ! ptr to level 1 pg_table - srl %g1, 0x4, %g1 - sll %g1, 0x8, %g1 ! make phys addr for l1 tbl - - lda [%g1] ASI_M_BYPASS, %g2 ! get level1 entry for 0x0 - add %g1, KERNBASE >> (PGDIR_SHIFT - 2), %g3 - sta %g2, [%g3] ASI_M_BYPASS ! place at KERNBASE entry - b go_to_highmem - nop ! wheee.... - - leon_remap: /* Sanity-check, is MMU enabled */ lda [%g0] ASI_LEON_MMUREGS, %g1
@@ -343,8 +235,6 @@ leon_remap: lda [%g1] ASI_M_BYPASS, %g2 ! get level1 entry for 0x0 add %g1, KERNBASE >> (PGDIR_SHIFT - 2), %g3 sta %g2, [%g3] ASI_M_BYPASS ! place at KERNBASE entry - b go_to_highmem - nop ! wheee.... /* Now do a non-relative jump so that PC is in high-memory */ go_to_highmem:
@@ -413,13 +303,13 @@ execute_in_high_mem: ldub [%o2 + 0x4], %l1 cmp %l1, 'm' - be sun4m_init + be no_sun4_here ! sun4m cmp %l1, 's' - be sun4m_init + be no_sun4_here ! sun4m cmp %l1, 'd' - be sun4d_init + be no_sun4_here ! sun4d cmp %l1, 'e' - be no_sun4e_here ! Could be a sun4e. + be no_sun4_here ! Could be a sun4e. nop b no_sun4u_here ! AIEEE, a V9 sun4u... Get our BIG BROTHER kernel :)) nop
@@ -441,68 +331,6 @@ leon_init: /* Update boot_cpu_id only on boot cpu */ stub %g1, [%g2 + %lo(boot_cpu_id)] - ba continue_boot - nop - -/* CPUID in bootbus can be found at PA 0xff0140000 */ -#define SUN4D_BOOTBUS_CPUID 0xf0140000 - -sun4d_init: - /* Need to patch call to handler_irq */ - set patch_handler_irq, %g4 - set sun4d_handler_irq, %g5 - sethi %hi(0x40000000), %g3 ! call - sub %g5, %g4, %g5 - srl %g5, 2, %g5 - or %g5, %g3, %g5 - st %g5, [%g4] - -#ifdef CONFIG_SMP - /* Get our CPU id out of bootbus */ - set SUN4D_BOOTBUS_CPUID, %g3 - lduba [%g3] ASI_M_CTL, %g3 - and %g3, 0xf8, %g3 - srl %g3, 3, %g4 - sta %g4, [%g0] ASI_M_VIKING_TMP1 - sethi %hi(boot_cpu_id), %g5 - stb %g4, [%g5 + %lo(boot_cpu_id)] -#endif - - /* Fall through to sun4m_init */ - -sun4m_init: -/* Ok, the PROM could have done funny things and apple cider could still - * be sitting in the fault status/address registers. Read them all to - * clear them so we don't get magic faults later on. - */ -/* This sucks, apparently this makes Vikings call prom panic, will fix later */ -2: - rd %psr, %o1 - srl %o1, PSR_IMPL_SHIFT, %o1 ! Get a type of the CPU - - subcc %o1, PSR_IMPL_TI, %g0 ! TI: Viking or MicroSPARC - be continue_boot - nop - - set AC_M_SFSR, %o0 - lda [%o0] ASI_M_MMUREGS, %g0 - set AC_M_SFAR, %o0 - lda [%o0] ASI_M_MMUREGS, %g0 - - /* Fujitsu MicroSPARC-II has no asynchronous flavors of FARs */ - subcc %o1, 0, %g0 - be continue_boot - nop - - set AC_M_AFSR, %o0 - lda [%o0] ASI_M_MMUREGS, %g0 - set AC_M_AFAR, %o0 - lda [%o0] ASI_M_MMUREGS, %g0 - nop - - -continue_boot: - /* Aieee, now set PC and nPC, enable traps, give ourselves a stack and it's * show-time! */
@@ -670,9 +498,9 @@ continue_boot: call halt_me nop -no_sun4e_here: +no_sun4_here: ld [%g7 + 0x68], %o1 - set sun4e_notsup, %o0 + set notsup, %o0 call %o1 nop b halt_me
Signature · 1 line
2.34.1
PATCH v2 3/28 sparc32: Drop floppy support
In reply to Sam RavnborgLEON do not have floppy support so we can drop it
--- arch/sparc/Kconfig | 2 +- arch/sparc/include/asm/floppy.h | 2 - arch/sparc/include/asm/floppy_32.h | 393 ------------------------------------- arch/sparc/include/asm/setup.h | 12 -- arch/sparc/kernel/entry.S | 137 ------------- arch/sparc/kernel/irq.h | 3 - arch/sparc/kernel/irq_32.c | 93 --------- arch/sparc/kernel/kernel.h | 2 - 8 files changed, 1 insertion(+), 643 deletions(-)
arch/sparc/Kconfig +1 -1
@@ -189,7 +189,7 @@ config GENERIC_CALIBRATE_DELAY config ARCH_MAY_HAVE_PC_FDC bool - default y + default y if SPARC64 config EMULATED_CMPXCHG bool
arch/sparc/include/asm/floppy.h +0 -2
@@ -3,7 +3,5 @@#define ___ASM_SPARC_FLOPPY_H#if defined(__sparc__) && defined(__arch64__)#include <asm/floppy_64.h> -#else -#include <asm/floppy_32.h> #endif #endif
arch/sparc/include/asm/floppy_32.h deleted +0 -393
393 lines not on this page · raw message
arch/sparc/include/asm/setup.h +0 -12
@@ -25,18 +25,6 @@ static inline int con_is_present(void)return serial_console ?0 :1 ; } -/* from irq_32.c */ -extern volatile unsigned char *fdc_status; -extern char *pdma_vaddr; -extern unsigned long pdma_size; -extern volatile int doing_pdma; - -/* This is software state */ -extern char *pdma_base; -extern unsigned long pdma_areasize; - -int sparc_floppy_request_irq (unsigned int irq,irq_handler_t irq_handler); -/* setup_32.c */ extern unsigned long cmdline_memory_size;
arch/sparc/kernel/entry.S +0 -137
143 lines not on this page · raw message
arch/sparc/kernel/irq.h +0 -3
@@ -83,9 +83,6 @@ void handler_irq(unsigned int pil, struct pt_regs *regs);unsigned long leon_get_irqmask (unsigned int irq); -/* irq_32.c */ -void sparc_floppy_irq (int irq,void *dev_id,struct pt_regs *regs); -/* sun4m_irq.c */ void sun4m_nmi (struct pt_regs *regs);
arch/sparc/kernel/irq_32.c +0 -93
99 lines not on this page · raw message
arch/sparc/kernel/kernel.h +0 -2
@@ -151,8 +151,6 @@ extern unsigned int real_irq_entry[];extern unsigned int smp4d_ticker[];extern unsigned int patchme_maybe_smp_msg[]; -void floppy_hardint (void ); -/* trampoline_32.S */ extern unsigned long sun4m_cpu_startup;extern unsigned long sun4d_cpu_startup;
Signature · 1 line
2.34.1
PATCH v2 4/28 sparc32: Drop sun4m specific led driver
In reply to Sam RavnborgThe led driver is only relevant for the sun4m machines.
--- arch/sparc/Kconfig | 9 --- arch/sparc/kernel/Makefile | 1 - arch/sparc/kernel/led.c | 146 --------------------------------------------- 3 files changed, 156 deletions(-)
arch/sparc/Kconfig +0 -9
@@ -327,15 +327,6 @@ config SUN_PM Enable power management and CPU standby features on supported SPARC platforms. -config SPARC_LED - tristate "Sun4m LED driver" - depends on SPARC32 - help - This driver toggles the front-panel LED on sun4m systems - in a user-specifiable manner. Its state can be probed - by reading /proc/led and its blinking mode can be changed - via writes to /proc/led - config SERIAL_CONSOLE bool depends on SPARC32
arch/sparc/kernel/Makefile +0 -1
@@ -89,7 +89,6 @@ obj-y += termios.o obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_MODULES) += sparc_ksyms.o -obj-$(CONFIG_SPARC_LED) += led.o obj-$(CONFIG_KGDB) += kgdb_$(BITS).o obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
arch/sparc/kernel/led.c deleted +0 -146
146 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 5/28 sparc32: Drop sun specific power management drivers
In reply to Sam RavnborgDrop the two sun specific apc and pmc drivers.
--- arch/sparc/Kconfig | 7 -- arch/sparc/kernel/Makefile | 1 - arch/sparc/kernel/apc.c | 196 --------------------------------------------- arch/sparc/kernel/pmc.c | 100 ----------------------- 4 files changed, 304 deletions(-)
arch/sparc/Kconfig +0 -7
@@ -320,13 +320,6 @@ config CMDLINE NOTE: This option WILL override the PROM bootargs setting! -config SUN_PM - bool - default y if SPARC32 - help - Enable power management and CPU standby features on supported - SPARC platforms. - config SERIAL_CONSOLE bool depends on SPARC32
arch/sparc/kernel/Makefile +0 -1
@@ -83,7 +83,6 @@ obj-$(CONFIG_SPARC32_SMP) += sun4m_smp.o sun4d_smp.o leon_smp.o obj-$(CONFIG_SPARC64_SMP) += hvtramp.o obj-y += auxio_$(BITS).o -obj-$(CONFIG_SUN_PM) += apc.o pmc.o obj-y += termios.o
arch/sparc/kernel/apc.c deleted +0 -196
196 lines not on this page · raw message
arch/sparc/kernel/pmc.c deleted +0 -100
100 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 6/28 sparc32: Drop auxio support
In reply to Sam Ravnborgauxio is not supported by LEON - so drop it.
--- arch/sparc/include/asm/auxio_32.h | 73 +------------------- arch/sparc/kernel/Makefile | 2 +- arch/sparc/kernel/auxio_32.c | 139 -------------------------------------- arch/sparc/kernel/devices.c | 3 - arch/sparc/kernel/kernel.h | 4 -- arch/sparc/kernel/process_32.c | 10 --- arch/sparc/prom/misc_32.c | 2 - 7 files changed, 3 insertions(+), 230 deletions(-)
arch/sparc/include/asm/auxio_32.h +2 -71
@@ -1,43 +1,12 @@/* SPDX-License-Identifier: GPL-2.0 */ /* -* auxio.h: Definitions and code for the Auxiliary I/O register. +* Dummy definitions for the Auxiliary I/O register. * * Copyright (C) 1995 David S. Miller ([email protected]) */ #ifndef _SPARC_AUXIO_H#define _SPARC_AUXIO_H -#include <asm/vaddrs.h> - -/* This register is an unsigned char in IO space. It does two things. -* First, it is used to control the front panel LED light on machines -* that have it (good for testing entry points to trap handlers and irq's) -* Secondly, it controls various floppy drive parameters. -*/ -#define AUXIO_ORMEIN 0xf0/* All writes must set these bits. */ -#define AUXIO_ORMEIN4M 0xc0/* sun4m - All writes must set these bits. */ -#define AUXIO_FLPY_DENS 0x20/* Floppy density, high if set. Read only. */ -#define AUXIO_FLPY_DCHG 0x10/* A disk change occurred. Read only. */ -#define AUXIO_EDGE_ON 0x10/* sun4m - On means Jumper block is in. */ -#define AUXIO_FLPY_DSEL 0x08/* Drive select/start-motor. Write only. */ -#define AUXIO_LINK_TEST 0x08/* sun4m - On means TPE Carrier detect. */ - -/* Set the following to one, then zero, after doing a pseudo DMA transfer. */ -#define AUXIO_FLPY_TCNT 0x04/* Floppy terminal count. Write only. */ - -/* Set the following to zero to eject the floppy. */ -#define AUXIO_FLPY_EJCT 0x02/* Eject floppy disk. Write only. */ -#define AUXIO_LED 0x01/* On if set, off if unset. Read/Write */ - -#ifndef __ASSEMBLY__ - -/* -* NOTE: these routines are implementation dependent-- -* understand the hardware you are querying! -*/ -void set_auxio (unsigned char bits_on,unsigned char bits_off); -unsigned char get_auxio (void );/* .../asm/floppy.h */ -/* * The following routines are provided for driver-compatibility * with sparc64 (primarily sunlance.c)
@@ -46,44 +15,6 @@ unsigned char get_auxio(void); /* .../asm/floppy.h */#define AUXIO_LTE_ON 1#define AUXIO_LTE_OFF 0 -/* auxio_set_lte - Set Link Test Enable (TPE Link Detect) -* -* on - AUXIO_LTE_ON or AUXIO_LTE_OFF -*/ -#define auxio_set_lte (on) \ -do { \ - if(on) { \ - set_auxio(AUXIO_LINK_TEST, 0); \ - } else { \ - set_auxio(0, AUXIO_LINK_TEST); \ - } \ -} while (0) - -#define AUXIO_LED_ON 1 -#define AUXIO_LED_OFF 0 - -/* auxio_set_led - Set system front panel LED -* -* on - AUXIO_LED_ON or AUXIO_LED_OFF -*/ -#define auxio_set_led (on) \ -do { \ - if(on) { \ - set_auxio(AUXIO_LED, 0); \ - } else { \ - set_auxio(0, AUXIO_LED); \ - } \ -} while (0) - -#endif /* !(__ASSEMBLY__) */ - - -/* AUXIO2 (Power Off Control) */ -extern volatile u8 __iomem *auxio_power_register; - -#define AUXIO_POWER_DETECT_FAILURE 32 -#define AUXIO_POWER_CLEAR_FAILURE 2 -#define AUXIO_POWER_OFF 1 - +#define auxio_set_lte (on)#endif /* !(_SPARC_AUXIO_H) */
arch/sparc/kernel/Makefile +1 -1
@@ -82,7 +82,7 @@ obj-$(CONFIG_SMP) += trampoline_$(BITS).o smp_$(BITS).o obj-$(CONFIG_SPARC32_SMP) += sun4m_smp.o sun4d_smp.o leon_smp.o obj-$(CONFIG_SPARC64_SMP) += hvtramp.o -obj-y += auxio_$(BITS).o +obj-$(CONFIG_SPARC64) += auxio_64.o obj-y += termios.o
arch/sparc/kernel/auxio_32.c deleted +0 -139
139 lines not on this page · raw message
arch/sparc/kernel/devices.c +0 -3
@@ -132,7 +132,4 @@ void __init device_scan(void) 0); }#endif /* !CONFIG_SMP */ - -auxio_probe (); -auxio_power_probe (); }
arch/sparc/kernel/kernel.h +0 -4
@@ -174,10 +174,6 @@ asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn);/* windows.c */ void try_to_clear_window_buffer (struct pt_regs *regs,int who); -/* auxio_32.c */ -void __init auxio_probe (void ); -void __init auxio_power_probe (void ); -/* pcic.c */ extern void __iomem *pcic_regs;void pcic_nmi (unsigned int pend,struct pt_regs *regs);
arch/sparc/kernel/process_32.c +0 -10
@@ -27,7 +27,6 @@#include <linux/slab.h> #include <linux/cpu.h> -#include <asm/auxio.h> #include <asm/oplib.h> #include <linux/uaccess.h> #include <asm/page.h>
@@ -49,8 +48,6 @@ void (*sparc_idle)(void);/* * Power-off handler instantiation for pm.h compliance -* This is done via auxio, but could be used as a fallback -* handler when auxio is not present-- unused for now... */ void (*pm_power_off)(void ) = machine_power_off;EXPORT_SYMBOL (pm_power_off);
@@ -103,13 +100,6 @@ void machine_restart(char * cmd)void machine_power_off (void ) { -if (auxio_power_register && - (!of_node_is_type (of_console_device,"serial" ) || scons_pwroff)) { -u8 power_register =sbus_readb (auxio_power_register); - power_register |=AUXIO_POWER_OFF ; -sbus_writeb (power_register, auxio_power_register); - } -machine_halt (); }
arch/sparc/prom/misc_32.c +0 -2
@@ -13,7 +13,6 @@#include <asm/openprom.h> #include <asm/oplib.h> -#include <asm/auxio.h> extern void restore_current (void );
@@ -60,7 +59,6 @@ prom_cmdline(void) (*(romvec->pv_abort))();restore_current ();spin_unlock_irqrestore (&prom_lock, flags); -set_auxio (AUXIO_LED ,0 ); }/* Drop into the prom, but completely terminate the program.
Signature · 1 line
2.34.1
PATCH v2 7/28 sparc32: Drop run-time patching of ipi trap
In reply to Sam RavnborgThere is no longer any need for the run-time patching of the ipi trap with the removal of sun4m and sun4d. Remove the patching and drop the ipi implementation for the two machines.
The patch includes removal of patching from pcic as this was needed to fix the build. pcic will be removed in a later commit.
--- arch/sparc/kernel/entry.S | 70 ++----------------------------------------- arch/sparc/kernel/kernel.h | 4 --- arch/sparc/kernel/leon_smp.c | 3 -- arch/sparc/kernel/pcic.c | 11 ------- arch/sparc/kernel/sun4d_smp.c | 3 -- arch/sparc/kernel/ttable_32.S | 9 +++--- 6 files changed, 7 insertions(+), 93 deletions(-)
arch/sparc/kernel/entry.S +3 -67
@@ -174,32 +174,6 @@ maybe_smp4m_msg_check_resched: maybe_smp4m_msg_out: RESTORE_ALL - .align 4 - .globl linux_trap_ipi15_sun4m -linux_trap_ipi15_sun4m: - SAVE_ALL - sethi %hi(0x80000000), %o2 - GET_PROCESSOR4M_ID(o0) - sethi %hi(sun4m_irq_percpu), %l5 - or %l5, %lo(sun4m_irq_percpu), %o5 - sll %o0, 2, %o0 - ld [%o5 + %o0], %o5 - ld [%o5 + 0x00], %o3 ! sun4m_irq_percpu[cpu]->pending - andcc %o3, %o2, %g0 - be sun4m_nmi_error ! Must be an NMI async memory error - st %o2, [%o5 + 0x04] ! sun4m_irq_percpu[cpu]->clear=0x80000000 - WRITE_PAUSE - ld [%o5 + 0x00], %g0 ! sun4m_irq_percpu[cpu]->pending - WRITE_PAUSE - or %l0, PSR_PIL, %l4 - wr %l4, 0x0, %psr - WRITE_PAUSE - wr %l4, PSR_ET, %psr - WRITE_PAUSE - call smp4m_cross_call_irq - nop - b ret_trap_lockless_ipi - clr %l6 .globl smp4d_ticker /* SMP per-cpu ticker interrupts are handled specially. */
@@ -220,44 +194,6 @@ smp4d_ticker: WRITE_PAUSE RESTORE_ALL - .align 4 - .globl linux_trap_ipi15_sun4d -linux_trap_ipi15_sun4d: - SAVE_ALL - sethi %hi(CC_BASE), %o4 - sethi %hi(MXCC_ERR_ME|MXCC_ERR_PEW|MXCC_ERR_ASE|MXCC_ERR_PEE), %o2 - or %o4, (CC_EREG - CC_BASE), %o0 - ldda [%o0] ASI_M_MXCC, %o0 - andcc %o0, %o2, %g0 - bne 1f - sethi %hi(BB_STAT2), %o2 - lduba [%o2] ASI_M_CTL, %o2 - andcc %o2, BB_STAT2_MASK, %g0 - bne 2f - or %o4, (CC_ICLR - CC_BASE), %o0 - sethi %hi(1 << 15), %o1 - stha %o1, [%o0] ASI_M_MXCC /* Clear PIL 15 in MXCC's ICLR */ - or %l0, PSR_PIL, %l4 - wr %l4, 0x0, %psr - WRITE_PAUSE - wr %l4, PSR_ET, %psr - WRITE_PAUSE - call smp4d_cross_call_irq - nop - b ret_trap_lockless_ipi - clr %l6 - -1: /* MXCC error */ -2: /* BB error */ - /* Disable PIL 15 */ - set CC_IMSK, %l4 - lduha [%l4] ASI_M_MXCC, %l5 - sethi %hi(1 << 15), %l7 - or %l5, %l7, %l5 - stha %l5, [%l4] ASI_M_MXCC - /* FIXME */ -1: b,a 1b - .globl smpleon_ipi .extern leon_ipi_interrupt /* SMP per-cpu IPI interrupts are handled specially. */
@@ -618,11 +554,11 @@ sun4m_nmi_error: #ifndef CONFIG_SMP .align 4 - .globl linux_trap_ipi15_sun4m -linux_trap_ipi15_sun4m: + .globl linux_trap_ipi15_leon +linux_trap_ipi15_leon: SAVE_ALL - ba sun4m_nmi_error + ba sun4m_nmi_error nop #endif /* CONFIG_SMP */
arch/sparc/kernel/kernel.h +0 -4
@@ -134,10 +134,6 @@ void leonsmp_ipi_interrupt(void);void leon_cross_call_irq (void );/* head_32.S */ -extern unsigned int t_nmi[]; -extern unsigned int linux_trap_ipi15_sun4d[]; -extern unsigned int linux_trap_ipi15_sun4m[]; -extern struct tt_entry trapbase[];extern struct tt_entry trapbase_cpu1[];extern struct tt_entry trapbase_cpu2[];
arch/sparc/kernel/leon_smp.c +0 -3
@@ -463,8 +463,5 @@ static const struct sparc32_ipi_ops leon_ipi_ops = {void __init leon_init_smp (void ) { -/* Patch ipi15 trap table */ - t_nmi[1 ] = t_nmi[1 ] + (linux_trap_ipi15_leon - linux_trap_ipi15_sun4m); - sparc32_ipi_ops = &leon_ipi_ops; }
arch/sparc/kernel/pcic.c +0 -11
@@ -354,17 +354,6 @@ int __init pcic_probe(void)prom_getstring (node,"name" , namebuf,63 ); namebuf[63 ] =0 ;strcpy (pbm->prom_name, namebuf); - { -extern int pcic_nmi_trap_patch[4 ]; - - t_nmi[0 ] = pcic_nmi_trap_patch[0 ]; - t_nmi[1 ] = pcic_nmi_trap_patch[1 ]; - t_nmi[2 ] = pcic_nmi_trap_patch[2 ]; - t_nmi[3 ] = pcic_nmi_trap_patch[3 ]; -swift_flush_dcache (); - pcic_regs = pcic->pcic_regs; - } -prom_getstring (prom_root_node,"name" , namebuf,63 ); namebuf[63 ] =0 ; {struct pcic_sn2list *p;
arch/sparc/kernel/sun4d_smp.c +0 -3
@@ -403,9 +403,6 @@ void __init sun4d_init_smp(void) {int i; -/* Patch ipi15 trap table */ - t_nmi[1 ] = t_nmi[1 ] + (linux_trap_ipi15_sun4d - linux_trap_ipi15_sun4m); - sparc32_ipi_ops = &sun4d_ipi_ops;for (i =0 ; i <NR_CPUS ; i++) {
arch/sparc/kernel/ttable_32.S +4 -5
@@ -43,8 +43,7 @@ t_irq12:TRAP_ENTRY_INTERRUPT(12) /* IRQ Zilog serial chip */ t_irq13:TRAP_ENTRY_INTERRUPT(13) /* IRQ Audio Intr. */ t_irq14:TRAP_ENTRY_INTERRUPT(14) /* IRQ Timer #2 */ - .globl t_nmi -t_nmi: TRAP_ENTRY(0x1f, linux_trap_ipi15_sun4m) +t_nmi: TRAP_ENTRY(0x1f, linux_trap_ipi15_leon) t_racc: TRAP_ENTRY(0x20, do_reg_access) /* General Register Access Error */ t_iacce:BAD_TRAP(0x21) /* Instr Access Error */
@@ -146,7 +145,7 @@ trapbase_cpu1: TRAP_ENTRY_INTERRUPT(9) TRAP_ENTRY_INTERRUPT(10) TRAP_ENTRY_INTERRUPT(11) TRAP_ENTRY_INTERRUPT(12) TRAP_ENTRY_INTERRUPT(13) TRAP_ENTRY_INTERRUPT(14) - TRAP_ENTRY(0x1f, linux_trap_ipi15_sun4m) + TRAP_ENTRY(0x1f, linux_trap_ipi15_leon) TRAP_ENTRY(0x20, do_reg_access) BAD_TRAP(0x21) BAD_TRAP(0x22)
@@ -245,7 +244,7 @@ trapbase_cpu2: TRAP_ENTRY_INTERRUPT(12) TRAP_ENTRY_INTERRUPT(13) TRAP_ENTRY_INTERRUPT(14) - TRAP_ENTRY(0x1f, linux_trap_ipi15_sun4m) + TRAP_ENTRY(0x1f, linux_trap_ipi15_leon) TRAP_ENTRY(0x20, do_reg_access) BAD_TRAP(0x21) BAD_TRAP(0x22)
@@ -345,7 +344,7 @@ trapbase_cpu3: TRAP_ENTRY_INTERRUPT(12) TRAP_ENTRY_INTERRUPT(13) TRAP_ENTRY_INTERRUPT(14) - TRAP_ENTRY(0x1f, linux_trap_ipi15_sun4m) + TRAP_ENTRY(0x1f, linux_trap_ipi15_leon) TRAP_ENTRY(0x20, do_reg_access) BAD_TRAP(0x21) BAD_TRAP(0x22)
Signature · 1 line
2.34.1
PATCH v2 8/28 sparc32: Drop patching of interrupt vector
In reply to Sam RavnborgDrop the sun4m specific handling and the patching that takes place in sun4d and LEON.
--- arch/sparc/kernel/entry.S | 98 ----------------------------------------- arch/sparc/kernel/kernel.h | 1 - arch/sparc/kernel/leon_kernel.c | 16 ------- arch/sparc/kernel/sun4d_irq.c | 25 ----------- 4 files changed, 140 deletions(-)
arch/sparc/kernel/entry.S +0 -98
@@ -79,15 +79,6 @@ bad_trap_handler: real_irq_entry: SAVE_ALL -#ifdef CONFIG_SMP - .globl patchme_maybe_smp_msg - - cmp %l7, 11 -patchme_maybe_smp_msg: - bgu maybe_smp4m_msg - nop -#endif - real_irq_continue: or %l0, PSR_PIL, %g2 wr %g2, 0x0, %psr
@@ -105,95 +96,6 @@ patch_handler_irq: RESTORE_ALL #ifdef CONFIG_SMP - /* SMP per-cpu ticker interrupts are handled specially. */ -smp4m_ticker: - bne real_irq_continue+4 - or %l0, PSR_PIL, %g2 - wr %g2, 0x0, %psr - WRITE_PAUSE - wr %g2, PSR_ET, %psr - WRITE_PAUSE - call smp4m_percpu_timer_interrupt - add %sp, STACKFRAME_SZ, %o0 - wr %l0, PSR_ET, %psr - WRITE_PAUSE - RESTORE_ALL - -#define GET_PROCESSOR4M_ID(reg) \ - rd %tbr, %reg; \ - srl %reg, 12, %reg; \ - and %reg, 3, %reg; - - /* Here is where we check for possible SMP IPI passed to us - * on some level other than 15 which is the NMI and only used - * for cross calls. That has a separate entry point below. - * - * IPIs are sent on Level 12, 13 and 14. See IRQ_IPI_*. - */ -maybe_smp4m_msg: - GET_PROCESSOR4M_ID(o3) - sethi %hi(sun4m_irq_percpu), %l5 - sll %o3, 2, %o3 - or %l5, %lo(sun4m_irq_percpu), %o5 - sethi %hi(0x70000000), %o2 ! Check all soft-IRQs - ld [%o5 + %o3], %o1 - ld [%o1 + 0x00], %o3 ! sun4m_irq_percpu[cpu]->pending - andcc %o3, %o2, %g0 - be,a smp4m_ticker - cmp %l7, 14 - /* Soft-IRQ IPI */ - st %o2, [%o1 + 0x04] ! sun4m_irq_percpu[cpu]->clear=0x70000000 - WRITE_PAUSE - ld [%o1 + 0x00], %g0 ! sun4m_irq_percpu[cpu]->pending - WRITE_PAUSE - or %l0, PSR_PIL, %l4 - wr %l4, 0x0, %psr - WRITE_PAUSE - wr %l4, PSR_ET, %psr - WRITE_PAUSE - srl %o3, 28, %o2 ! shift for simpler checks below -maybe_smp4m_msg_check_single: - andcc %o2, 0x1, %g0 - beq,a maybe_smp4m_msg_check_mask - andcc %o2, 0x2, %g0 - call smp_call_function_single_interrupt - nop - andcc %o2, 0x2, %g0 -maybe_smp4m_msg_check_mask: - beq,a maybe_smp4m_msg_check_resched - andcc %o2, 0x4, %g0 - call smp_call_function_interrupt - nop - andcc %o2, 0x4, %g0 -maybe_smp4m_msg_check_resched: - /* rescheduling is done in RESTORE_ALL regardless, but incr stats */ - beq,a maybe_smp4m_msg_out - nop - call smp_resched_interrupt - nop -maybe_smp4m_msg_out: - RESTORE_ALL - - - .globl smp4d_ticker - /* SMP per-cpu ticker interrupts are handled specially. */ -smp4d_ticker: - SAVE_ALL - or %l0, PSR_PIL, %g2 - sethi %hi(CC_ICLR), %o0 - sethi %hi(1 << 14), %o1 - or %o0, %lo(CC_ICLR), %o0 - stha %o1, [%o0] ASI_M_MXCC /* Clear PIL 14 in MXCC's ICLR */ - wr %g2, 0x0, %psr - WRITE_PAUSE - wr %g2, PSR_ET, %psr - WRITE_PAUSE - call smp4d_percpu_timer_interrupt - add %sp, STACKFRAME_SZ, %o0 - wr %l0, PSR_ET, %psr - WRITE_PAUSE - RESTORE_ALL - .globl smpleon_ipi .extern leon_ipi_interrupt /* SMP per-cpu IPI interrupts are handled specially. */
arch/sparc/kernel/kernel.h +0 -1
@@ -145,7 +145,6 @@ extern char cputypval[];extern unsigned long lvl14_save[4 ];extern unsigned int real_irq_entry[];extern unsigned int smp4d_ticker[]; -extern unsigned int patchme_maybe_smp_msg[];/* trampoline_32.S */ extern unsigned long sun4m_cpu_startup;
arch/sparc/kernel/leon_kernel.c +0 -16
@@ -421,22 +421,6 @@ void __init leon_init_timers(void)if (eirq !=0 )leon_eirq_setup (eirq); -#ifdef CONFIG_SMP - { -unsigned long flags; - -/* -* In SMP, sun4m adds a IPI handler to IRQ trap handler that -* LEON never must take, sun4d and LEON overwrites the branch -* with a NOP. -*/ -local_irq_save (flags); - patchme_maybe_smp_msg[0 ] =0x01000000 ;/* NOP out the branch */ - local_ops->cache_all (); -local_irq_restore (flags); - } -#endif - config =LEON3_BYPASS_LOAD_PA (&leon3_gptimer_regs->config);if (config & (1 <<LEON3_GPTIMER_SEPIRQ )) leon3_gptimer_irq += leon3_gptimer_idx;
arch/sparc/kernel/sun4d_irq.c +0 -25
@@ -391,30 +391,6 @@ static unsigned int sun4d_build_timer_irq(unsigned int board, } -static void __init sun4d_fixup_trap_table (void ) -{ -#ifdef CONFIG_SMP -unsigned long flags; -struct tt_entry *trap_table = &sparc_ttable[SP_TRAP_IRQ1 + (14 -1 )]; - -/* Adjust so that we jump directly to smp4d_ticker */ - lvl14_save[2 ] += smp4d_ticker - real_irq_entry; - -/* For SMP we use the level 14 ticker, however the bootup code -* has copied the firmware's level 14 vector into the boot cpu's -* trap table, we must fix this now or we get squashed. -*/ -local_irq_save (flags); - patchme_maybe_smp_msg[0 ] =0x01000000 ;/* NOP out the branch */ - trap_table->inst_one = lvl14_save[0 ]; - trap_table->inst_two = lvl14_save[1 ]; - trap_table->inst_three = lvl14_save[2 ]; - trap_table->inst_four = lvl14_save[3 ]; - local_ops->cache_all (); -local_irq_restore (flags); -#endif -} -static void __init sun4d_init_timers (void ) {struct device_node *dp;
@@ -478,7 +454,6 @@ static void __init sun4d_init_timers(void)prom_halt (); }sun4d_load_profile_irqs (); -sun4d_fixup_trap_table (); }void __init sun4d_init_sbi_irq (void )
Signature · 1 line
2.34.1
PATCH v2 9/28 sparc32: Drop sun4m/sun4d specific irq handling
In reply to Sam RavnborgSome of the sun4m irq infrastructure is used by LEON too, so keep that and drop the rest.
The patch include a few extra fixes fix the build after the removal of the irq support.
--- arch/sparc/include/asm/irq_32.h | 2 - arch/sparc/kernel/Makefile | 2 +- arch/sparc/kernel/irq_32.c | 30 +-- arch/sparc/kernel/kernel.h | 13 -- arch/sparc/kernel/sun4d_irq.c | 494 ---------------------------------------- arch/sparc/kernel/sun4d_smp.c | 4 - arch/sparc/kernel/sun4m_irq.c | 240 ------------------- arch/sparc/mm/io-unit.c | 2 - 8 files changed, 2 insertions(+), 785 deletions(-)
arch/sparc/include/asm/irq_32.h +0 -2
@@ -17,8 +17,6 @@#define irq_canonicalize (irq) (irq) -void __init sun4d_init_sbi_irq (void ); -#define NO_IRQ 0xffffffff#endif
arch/sparc/kernel/Makefile +1 -1
@@ -28,7 +28,7 @@ obj-y += traps_$(BITS).o # IRQ obj-y += irq_$(BITS).o -obj-$(CONFIG_SPARC32) += sun4m_irq.o sun4d_irq.o +obj-$(CONFIG_SPARC32) += sun4m_irq.o obj-y += process_$(BITS).o obj-y += process.o
arch/sparc/kernel/irq_32.c +1 -29
@@ -235,36 +235,8 @@ void handler_irq(unsigned int pil, struct pt_regs *regs)set_irq_regs (old_regs); } -/* djhr -* This could probably be made indirect too and assigned in the CPU -* bits of the code. That would be much nicer I think and would also -* fit in with the idea of being able to tune your kernel for your machine -* by removing unrequired machine and device support. -* -*/ -void __init init_IRQ (void ) { -switch (sparc_cpu_model) { -case sun4m: -pcic_probe (); -if (pcic_present ()) -sun4m_pci_init_IRQ (); -else -sun4m_init_IRQ (); -break ; - -case sun4d: -sun4d_init_IRQ (); -break ; - -case sparc_leon: -leon_init_IRQ (); -break ; - -default : -prom_printf ("Cannot initialize IRQs on this Sun machine..." ); -break ; - } +leon_init_IRQ (); }
arch/sparc/kernel/kernel.h +0 -13
@@ -93,7 +93,6 @@ extern spinlock_t irq_action_lock;void unexpected_irq (int irq,void *dev_id,struct pt_regs * regs);/* sun4m_irq.c */ -void sun4m_init_IRQ (void );void sun4m_unmask_profile_irq (void );void sun4m_clear_profile_irq (int cpu);
@@ -106,18 +105,6 @@ void __init smp4m_smp_done(void);void smp4m_cross_call_irq (void );void smp4m_percpu_timer_interrupt (struct pt_regs *regs); -/* sun4d_irq.c */ -extern spinlock_t sun4d_imsk_lock; - -void sun4d_init_IRQ (void ); -int sun4d_request_irq (unsigned int irq, -irq_handler_t handler, -unsigned long irqflags, -const char *devname,void *dev_id); -int show_sun4d_interrupts (struct seq_file *,void *); -void sun4d_distribute_irqs (void ); -void sun4d_free_irq (unsigned int irq,void *dev_id); -/* sun4d_smp.c */ void sun4d_cpu_pre_starting (void *arg);void sun4d_cpu_pre_online (void *arg);
arch/sparc/kernel/sun4d_irq.c deleted +0 -494
494 lines not on this page · raw message
arch/sparc/kernel/sun4d_smp.c +0 -4
@@ -65,7 +65,6 @@ void sun4d_cpu_pre_starting(void *arg)void sun4d_cpu_pre_online (void *arg) { -unsigned long flags;int cpuid; cpuid =hard_smp_processor_id ();
@@ -103,9 +102,7 @@ void sun4d_cpu_pre_online(void *arg)while (!cpumask_test_cpu (cpuid, &smp_commenced_mask))barrier (); -spin_lock_irqsave (&sun4d_imsk_lock, flags);cc_set_imsk (cc_get_imsk () & ~0x4000 );/* Allow PIL 14 as well */ -spin_unlock_irqrestore (&sun4d_imsk_lock, flags); }/*
@@ -177,7 +174,6 @@ void __init smp4d_smp_done(void)/* Ok, they are spinning and ready to go. */ smp_processors_ready =1 ; -sun4d_distribute_irqs (); }/* Memory structure giving interrupt handler information about IPI generated */
arch/sparc/kernel/sun4m_irq.c +0 -240
255 lines not on this page · raw message
arch/sparc/mm/io-unit.c +0 -2
@@ -86,8 +86,6 @@ static int __init iounit_init(void)of_propagate_archdata (op); } -sun4d_init_sbi_irq (); -return 0 ; }
Signature · 1 line
2.34.1
PATCH v2 10/28 sparc32: Drop sun4d/sun4m smp support
In reply to Sam RavnborgDrop the sun4m and sun4d smp support code.
The sparc32 kernel will not boot unless this is a LEON system, so drop checks for other systems as they will not trigger.
--- arch/sparc/kernel/Makefile | 2 +- arch/sparc/kernel/kernel.h | 18 -- arch/sparc/kernel/smp_32.c | 102 +---------- arch/sparc/kernel/sun4d_smp.c | 408 ------------------------------------------ arch/sparc/kernel/sun4m_smp.c | 275 ---------------------------- arch/sparc/mm/srmmu.c | 10 +- 6 files changed, 8 insertions(+), 807 deletions(-)
arch/sparc/kernel/Makefile +1 -1
@@ -79,7 +79,7 @@ obj-$(CONFIG_SPARC_GRPCI2)+= leon_pci_grpci2.o obj-$(CONFIG_SPARC_GRPCI1)+= leon_pci_grpci1.o obj-$(CONFIG_SMP) += trampoline_$(BITS).o smp_$(BITS).o -obj-$(CONFIG_SPARC32_SMP) += sun4m_smp.o sun4d_smp.o leon_smp.o +obj-$(CONFIG_SPARC32_SMP) += leon_smp.o obj-$(CONFIG_SPARC64_SMP) += hvtramp.o obj-$(CONFIG_SPARC64) += auxio_64.o
arch/sparc/kernel/kernel.h +0 -18
@@ -96,24 +96,6 @@ void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs);void sun4m_unmask_profile_irq (void );void sun4m_clear_profile_irq (int cpu); -/* sun4m_smp.c */ -void sun4m_cpu_pre_starting (void *arg); -void sun4m_cpu_pre_online (void *arg); -void __init smp4m_boot_cpus (void ); -int smp4m_boot_one_cpu (int i,struct task_struct *idle); -void __init smp4m_smp_done (void ); -void smp4m_cross_call_irq (void ); -void smp4m_percpu_timer_interrupt (struct pt_regs *regs); - -/* sun4d_smp.c */ -void sun4d_cpu_pre_starting (void *arg); -void sun4d_cpu_pre_online (void *arg); -void __init smp4d_boot_cpus (void ); -int smp4d_boot_one_cpu (int i,struct task_struct *idle); -void __init smp4d_smp_done (void ); -void smp4d_cross_call_irq (void ); -void smp4d_percpu_timer_interrupt (struct pt_regs *regs); -/* leon_smp.c */ void leon_cpu_pre_starting (void *arg);void leon_cpu_pre_online (void *arg);
arch/sparc/kernel/smp_32.c +5 -97
132 lines not on this page · raw message
arch/sparc/kernel/sun4d_smp.c deleted +0 -408
408 lines not on this page · raw message
arch/sparc/kernel/sun4m_smp.c deleted +0 -275
275 lines not on this page · raw message
arch/sparc/mm/srmmu.c +2 -8
@@ -1816,14 +1816,8 @@ void __init load_mmu(void) &smp_cachetlb_ops;#endif -if (sparc_cpu_model != sun4d) -ld_mmu_iommu (); +ld_mmu_iommu ();#ifdef CONFIG_SMP -if (sparc_cpu_model == sun4d) -sun4d_init_smp (); -else if (sparc_cpu_model == sparc_leon) -leon_init_smp (); -else -sun4m_init_smp (); +leon_init_smp ();#endif }
Signature · 1 line
2.34.1
PATCH v2 11/28 sparc32: Drop pcic support
In reply to Sam Ravnborgpcic is only used by MicroSPARC-IIep and not relevant for LEON.
--- arch/sparc/Kconfig | 5 - arch/sparc/include/asm/pcic.h | 130 ------- arch/sparc/kernel/Makefile | 1 - arch/sparc/kernel/entry.S | 48 --- arch/sparc/kernel/irq_32.c | 1 - arch/sparc/kernel/kernel.h | 4 - arch/sparc/kernel/pcic.c | 829 ------------------------------------------ arch/sparc/kernel/time_32.c | 6 +- 8 files changed, 1 insertion(+), 1023 deletions(-)
arch/sparc/Kconfig +0 -5
@@ -410,11 +410,6 @@ config SUN_LDOMS Say Y here is you want to support virtual devices via Logical Domains. -config PCIC_PCI - bool - depends on PCI && SPARC32 && !SPARC_LEON - default y - config LEON_PCI bool depends on PCI && SPARC_LEON
arch/sparc/include/asm/pcic.h deleted +0 -130
130 lines not on this page · raw message
arch/sparc/kernel/Makefile +0 -1
@@ -73,7 +73,6 @@ obj-$(CONFIG_SPARC64) += pcr.o obj-$(CONFIG_SPARC64) += nmi.o obj-$(CONFIG_SPARC64_SMP) += cpumap.o -obj-$(CONFIG_PCIC_PCI) += pcic.o obj-$(CONFIG_LEON_PCI) += leon_pci.o obj-$(CONFIG_SPARC_GRPCI2)+= leon_pci_grpci2.o obj-$(CONFIG_SPARC_GRPCI1)+= leon_pci_grpci1.o
arch/sparc/kernel/entry.S +0 -48
54 lines not on this page · raw message
arch/sparc/kernel/irq_32.c +0 -1
@@ -19,7 +19,6 @@#include <asm/cacheflush.h> #include <asm/cpudata.h> #include <asm/setup.h> -#include <asm/pcic.h> #include <asm/leon.h> #include "kernel.h"
arch/sparc/kernel/kernel.h +0 -4
@@ -138,10 +138,6 @@ asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn);/* windows.c */ void try_to_clear_window_buffer (struct pt_regs *regs,int who); -/* pcic.c */ -extern void __iomem *pcic_regs; -void pcic_nmi (unsigned int pend,struct pt_regs *regs); -/* time_32.c */ void __init time_init (void );
arch/sparc/kernel/pcic.c deleted +0 -829
829 lines not on this page · raw message
arch/sparc/kernel/time_32.c +1 -5
@@ -43,7 +43,6 @@#include <asm/io.h> #include <asm/idprom.h> #include <asm/page.h> -#include <asm/pcic.h> #include <asm/irq_regs.h> #include <asm/setup.h>
@@ -347,9 +346,6 @@ void __init time_init(void) sparc_config.features =0 ; late_time_init = sparc32_late_time_init; -if (pcic_present ()) -pci_time_init (); -else -sbus_time_init (); +sbus_time_init (); }
Signature · 1 line
2.34.1
PATCH v2 12/28 sparc32: Drop mbus support
In reply to Sam RavnborgOnly used by older SPARC HW, not used by LEON.
--- arch/sparc/include/asm/elf_32.h | 2 - arch/sparc/include/asm/mbus.h | 97 ----------------------------------------- arch/sparc/kernel/cpu.c | 1 - arch/sparc/kernel/setup_32.c | 1 - arch/sparc/mm/iommu.c | 18 ++------ arch/sparc/mm/srmmu.c | 48 -------------------- 6 files changed, 3 insertions(+), 164 deletions(-)
arch/sparc/include/asm/elf_32.h +0 -2
@@ -91,8 +91,6 @@ typedef struct {unsigned int pr_q[64 ]; } elf_fpregset_t; -#include <asm/mbus.h> -/* * This is used to ensure we don't load something for the wrong architecture. */
arch/sparc/include/asm/mbus.h deleted +0 -97
97 lines not on this page · raw message
arch/sparc/kernel/cpu.c +0 -1
@@ -19,7 +19,6 @@#include <asm/page.h> #include <asm/head.h> #include <asm/psr.h> -#include <asm/mbus.h> #include <asm/cpudata.h> #include "kernel.h"
arch/sparc/kernel/setup_32.c +0 -1
@@ -41,7 +41,6 @@#include <asm/page.h> #include <asm/traps.h> #include <asm/vaddrs.h> -#include <asm/mbus.h> #include <asm/idprom.h> #include <asm/cpudata.h> #include <asm/setup.h>
arch/sparc/mm/iommu.c +3 -15
@@ -19,7 +19,6 @@#include <asm/io.h> #include <asm/mxcc.h> -#include <asm/mbus.h> #include <asm/cacheflush.h> #include <asm/tlbflush.h> #include <asm/bitext.h>
@@ -117,13 +116,7 @@ static void __init sbus_iommu_init(struct platform_device *op)prom_halt (); }bit_map_init (&iommu->usemap, bitmap,IOMMU_NPTES ); -/* To be coherent on HyperSparc, the page color of DVMA -* and physical addresses must match. -*/ -if (srmmu_modtype == HyperSparc) - iommu->usemap.num_colors = vac_cache_size >>PAGE_SHIFT ; -else - iommu->usemap.num_colors =1 ; + iommu->usemap.num_colors =1 ; printk(KERN_INFO "IOMMU: impl %d vers %d table 0x%p[%d B] map [%d b]\n", impl, vers, iommu->page_table,
@@ -445,11 +438,6 @@ static const struct dma_map_ops sbus_iommu_dma_pflush_ops = {void __init ld_mmu_iommu (void ) { -if (viking_mxcc_present || srmmu_modtype == HyperSparc) { - dvma_prot =__pgprot (SRMMU_CACHE |SRMMU_ET_PTE |SRMMU_PRIV ); - ioperm_noc =IOPTE_CACHE |IOPTE_WRITE |IOPTE_VALID ; - }else { - dvma_prot =__pgprot (SRMMU_ET_PTE |SRMMU_PRIV ); - ioperm_noc =IOPTE_WRITE |IOPTE_VALID ; - } + dvma_prot =__pgprot (SRMMU_CACHE |SRMMU_ET_PTE |SRMMU_PRIV ); + ioperm_noc =IOPTE_CACHE |IOPTE_WRITE |IOPTE_VALID ; }
arch/sparc/mm/srmmu.c +0 -48
90 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 13/28 sparc32: Drop unused function __get_{phys,iospace}
In reply to Sam RavnborgNot used and references stuff that will be dropped later.
--- arch/sparc/include/asm/pgtable_32.h | 24 ------------------------ arch/sparc/include/asm/pgtsrmmu.h | 11 ----------- 2 files changed, 35 deletions(-)
arch/sparc/include/asm/pgtable_32.h +0 -24
@@ -368,30 +368,6 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)return __pte (pte_val (pte) & ~SRMMU_SWP_EXCLUSIVE ); } -static inline unsigned long -__get_phys (unsigned long addr) -{ -switch (sparc_cpu_model){ -case sun4m: -case sun4d: -return ((srmmu_get_pte (addr) &0xffffff00 ) <<4 ); -default : -return 0 ; - } -} - -static inline int -__get_iospace (unsigned long addr) -{ -switch (sparc_cpu_model){ -case sun4m: -case sun4d: -return (srmmu_get_pte (addr) >>28 ); -default : -return -1 ; - } -} -/* * For sparc32&64, the pfn in io_remap_pfn_range() carries <iospace> in * its high 4 bits. These macros/functions put it there or get it from there.
arch/sparc/include/asm/pgtsrmmu.h +0 -11
@@ -125,17 +125,6 @@ static inline void srmmu_flush_whole_tlb(void) } -static inline int -srmmu_get_pte (unsigned long addr) -{ - registerunsigned long entry; - - __asm__ __volatile__("\n\tlda [%1] %2,%0\n\t" : -"=r" (entry): -"r" ((addr &0xfffff000 ) |0x400 ),"i" (ASI_M_FLUSH_PROBE )); -return entry; -} -#endif /* !(__ASSEMBLY__) */ #endif /* !(_SPARC_PGTSRMMU_H) */
Signature · 1 line
2.34.1
PATCH v2 14/28 sparc32: Drop unused mmu models
In reply to Sam RavnborgDrop mmu models not used by LEON, including their header files. This includes removal of unused includes in various files to fix the build.
--- arch/sparc/include/asm/mxcc.h | 138 ------- arch/sparc/include/asm/ross.h | 192 --------- arch/sparc/include/asm/swift.h | 107 ----- arch/sparc/include/asm/tsunami.h | 65 --- arch/sparc/include/asm/turbosparc.h | 126 ------ arch/sparc/include/asm/viking.h | 255 ------------ arch/sparc/kernel/entry.S | 1 - arch/sparc/mm/Makefile | 1 - arch/sparc/mm/hypersparc.S | 414 ------------------- arch/sparc/mm/io-unit.c | 1 - arch/sparc/mm/iommu.c | 31 +- arch/sparc/mm/mm_32.h | 1 - arch/sparc/mm/srmmu.c | 776 +----------------------------------- arch/sparc/mm/swift.S | 256 ------------ arch/sparc/mm/tsunami.S | 132 ------ arch/sparc/mm/viking.S | 284 ------------- 16 files changed, 21 insertions(+), 2759 deletions(-)
arch/sparc/include/asm/mxcc.h deleted +0 -138
@@ -1,138 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* mxcc.h: Definitions of the Viking MXCC registers -* -* Copyright (C) 1995 David S. Miller ([email protected]) -*/ - -#ifndef _SPARC_MXCC_H -#define _SPARC_MXCC_H - -/* These registers are accessed through ASI 0x2. */ -#define MXCC_DATSTREAM 0x1C00000/* Data stream register */ -#define MXCC_SRCSTREAM 0x1C00100/* Source stream register */ -#define MXCC_DESSTREAM 0x1C00200/* Destination stream register */ -#define MXCC_RMCOUNT 0x1C00300/* Count of references and misses */ -#define MXCC_STEST 0x1C00804/* Internal self-test */ -#define MXCC_CREG 0x1C00A04/* Control register */ -#define MXCC_SREG 0x1C00B00/* Status register */ -#define MXCC_RREG 0x1C00C04/* Reset register */ -#define MXCC_EREG 0x1C00E00/* Error code register */ -#define MXCC_PREG 0x1C00F04/* Address port register */ - -/* Some MXCC constants. */ -#define MXCC_STREAM_SIZE 0x20/* Size in bytes of one stream r/w */ - -/* The MXCC Control Register: -* -* ---------------------------------------------------------------------- -* | | RRC | RSV |PRE|MCE|PARE|ECE|RSV| -* ---------------------------------------------------------------------- -* 31 10 9 8-6 5 4 3 2 1-0 -* -* RRC: Controls what you read from MXCC_RMCOUNT reg. -* 0=Misses 1=References -* PRE: Prefetch enable -* MCE: Multiple Command Enable -* PARE: Parity enable -* ECE: External cache enable -*/ - -#define MXCC_CTL_RRC 0x00000200 -#define MXCC_CTL_PRE 0x00000020 -#define MXCC_CTL_MCE 0x00000010 -#define MXCC_CTL_PARE 0x00000008 -#define MXCC_CTL_ECE 0x00000004 - -/* The MXCC Error Register: -* -* -------------------------------------------------------- -* |ME| RSV|CE|PEW|PEE|ASE|EIV| MOPC|ECODE|PRIV|RSV|HPADDR| -* -------------------------------------------------------- -* 31 30 29 28 27 26 25 24-15 14-7 6 5-3 2-0 -* -* ME: Multiple Errors have occurred -* CE: Cache consistency Error -* PEW: Parity Error during a Write operation -* PEE: Parity Error involving the External cache -* ASE: ASynchronous Error -* EIV: This register is toast -* MOPC: MXCC Operation Code for instance causing error -* ECODE: The Error CODE -* PRIV: A privileged mode error? 0=no 1=yes -* HPADDR: High PhysicalADDRess bits (35-32) -*/ - -#define MXCC_ERR_ME 0x80000000 -#define MXCC_ERR_CE 0x20000000 -#define MXCC_ERR_PEW 0x10000000 -#define MXCC_ERR_PEE 0x08000000 -#define MXCC_ERR_ASE 0x04000000 -#define MXCC_ERR_EIV 0x02000000 -#define MXCC_ERR_MOPC 0x01FF8000 -#define MXCC_ERR_ECODE 0x00007F80 -#define MXCC_ERR_PRIV 0x00000040 -#define MXCC_ERR_HPADDR 0x0000000f - -/* The MXCC Port register: -* -* ----------------------------------------------------- -* | | MID | | -* ----------------------------------------------------- -* 31 21 20-18 17 0 -* -* MID: The moduleID of the cpu your read this from. -*/ - -#ifndef __ASSEMBLY__ - -static inline void mxcc_set_stream_src (unsigned long *paddr) -{ -unsigned long data0 = paddr[0 ]; -unsigned long data1 = paddr[1 ]; - - __asm__ __volatile__ ("or %%g0, %0, %%g2\n\t" -"or %%g0, %1, %%g3\n\t" -"stda %%g2, [%2] %3\n\t" : : -"r" (data0),"r" (data1), -"r" (MXCC_SRCSTREAM ), -"i" (ASI_M_MXCC ) :"g2" ,"g3" ); -} - -static inline void mxcc_set_stream_dst (unsigned long *paddr) -{ -unsigned long data0 = paddr[0 ]; -unsigned long data1 = paddr[1 ]; - - __asm__ __volatile__ ("or %%g0, %0, %%g2\n\t" -"or %%g0, %1, %%g3\n\t" -"stda %%g2, [%2] %3\n\t" : : -"r" (data0),"r" (data1), -"r" (MXCC_DESSTREAM ), -"i" (ASI_M_MXCC ) :"g2" ,"g3" ); -} - -static inline unsigned long mxcc_get_creg (void ) -{ -unsigned long mxcc_control; - - __asm__ __volatile__("set 0xffffffff, %%g2\n\t" -"set 0xffffffff, %%g3\n\t" -"stda %%g2, [%1] %2\n\t" -"lda [%3] %2, %0\n\t" : -"=r" (mxcc_control) : -"r" (MXCC_EREG ),"i" (ASI_M_MXCC ), -"r" (MXCC_CREG ) :"g2" ,"g3" ); -return mxcc_control; -} - -static inline void mxcc_set_creg (unsigned long mxcc_control) -{ - __asm__ __volatile__("sta %0, [%1] %2\n\t" : : -"r" (mxcc_control),"r" (MXCC_CREG ), -"i" (ASI_M_MXCC )); -} - -#endif /* !__ASSEMBLY__ */ - -#endif /* !(_SPARC_MXCC_H) */
arch/sparc/include/asm/ross.h deleted +0 -192
192 lines not on this page · raw message
arch/sparc/include/asm/swift.h deleted +0 -107
107 lines not on this page · raw message
arch/sparc/include/asm/tsunami.h deleted +0 -65
65 lines not on this page · raw message
arch/sparc/include/asm/turbosparc.h deleted +0 -126
126 lines not on this page · raw message
arch/sparc/include/asm/viking.h deleted +0 -255
255 lines not on this page · raw message
arch/sparc/kernel/entry.S +0 -1
@@ -25,7 +25,6 @@ #include <asm/winmacro.h> #include <asm/signal.h> #include <asm/obio.h> -#include <asm/mxcc.h> #include <asm/thread_info.h> #include <asm/param.h> #include <asm/unistd.h>
arch/sparc/mm/Makefile +0 -1
@@ -9,7 +9,6 @@ obj-y += fault_$(BITS).o obj-y += init_$(BITS).o obj-$(CONFIG_SPARC32) += srmmu.o iommu.o io-unit.o obj-$(CONFIG_SPARC32) += srmmu_access.o -obj-$(CONFIG_SPARC32) += hypersparc.o viking.o tsunami.o swift.o obj-$(CONFIG_SPARC32) += leon_mm.o # Only used by sparc64
arch/sparc/mm/hypersparc.S deleted +0 -414
414 lines not on this page · raw message
arch/sparc/mm/io-unit.c +0 -1
@@ -18,7 +18,6 @@#include <asm/io.h> #include <asm/io-unit.h> -#include <asm/mxcc.h> #include <asm/cacheflush.h> #include <asm/tlbflush.h> #include <asm/dma.h>
arch/sparc/mm/iommu.c +4 -27
@@ -18,7 +18,6 @@#include <linux/platform_device.h> #include <asm/io.h> -#include <asm/mxcc.h> #include <asm/cacheflush.h> #include <asm/tlbflush.h> #include <asm/bitext.h>
@@ -37,11 +36,6 @@#define IOMMU_NPTES (IOMMU_WINSIZE/PAGE_SIZE)/* 64K PTEs, 256KB */ #define IOMMU_ORDER 6/* 4096 * (1<<6) */ -static int viking_flush; -/* viking.S */ -extern void viking_flush_page (unsigned long page); -extern void viking_mxcc_flush_page (unsigned long page); -/* * Values precomputed according to CPU type. */
@@ -156,21 +150,9 @@ static void iommu_flush_iotlb(iopte_t *iopte, unsigned int niopte) start = (unsigned long )iopte; end =PAGE_ALIGN (start + niopte*sizeof (iopte_t)); start &=PAGE_MASK ; -if (viking_mxcc_present) { -while (start < end) { -viking_mxcc_flush_page (start); - start +=PAGE_SIZE ; - } - }else if (viking_flush) { -while (start < end) { -viking_flush_page (start); - start +=PAGE_SIZE ; - } - }else { -while (start < end) { -__flush_page_to_ram (start); - start +=PAGE_SIZE ; - } +while (start < end) { +__flush_page_to_ram (start); + start +=PAGE_SIZE ; } }
@@ -344,12 +326,7 @@ static void *sbus_iommu_alloc(struct device *dev, size_t len,pmd_t *pmdp;pte_t *ptep; -if (viking_mxcc_present) -viking_mxcc_flush_page (page); -else if (viking_flush) -viking_flush_page (page); -else -__flush_page_to_ram (page); +__flush_page_to_ram (page); pmdp =pmd_off_k (addr); ptep =pte_offset_kernel (pmdp, addr);
arch/sparc/mm/mm_32.h +0 -1
@@ -9,7 +9,6 @@ void window_ret_fault(struct pt_regs *regs);/* srmmu.c */ extern char *srmmu_name; -extern int viking_mxcc_present;extern int flush_page_for_dma_global;extern void (*poke_srmmu)(void );
arch/sparc/mm/srmmu.c +17 -759
848 lines not on this page · raw message
arch/sparc/mm/swift.S deleted +0 -256
256 lines not on this page · raw message
arch/sparc/mm/tsunami.S deleted +0 -132
132 lines not on this page · raw message
arch/sparc/mm/viking.S deleted +0 -284
284 lines not on this page · raw message
Signature · 1 line
2.34.1
kernel test robot
build botRe: [PATCH v2 14/28] sparc32: Drop unused mmu models
kernel test robot noticed the following build warnings:
Hi Sam,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 84b76d05828a1909e20d0f66553b876b801f98c8]
url: https://github.com/intel-lab-lkp/linux/commits/Sam-Ravnborg-via-B4-Relay/sparc32-Update-defconfig-to-LEON-SMP/20240310-021717 base: 84b76d05828a1909e20d0f66553b876b801f98c8 patch link: https://lore.kernel.org/r/20240309-sunset-v2-14-f09912574d2c%40ravnborg.org patch subject: [PATCH v2 14/28] sparc32: Drop unused mmu models config: sparc-randconfig-r113-20240310 (https://download.01.org/0day-ci/archive/20240310/[email protected]/config) compiler: sparc-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240310/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
sparse warnings: (new ones prefixed by >>)
>> arch/sparc/mm/srmmu.c:49:5: sparse: sparse: symbol 'vac_line_size' was not declared. Should it be static?
vim +/vac_line_size +49 arch/sparc/mm/srmmu.c
accf032cfa582e Sam Ravnborg 2012-05-19 46 ^1da177e4c3f41 Linus Torvalds 2005-04-16 47 int vac_cache_size; 9d262d95114cf2 Guenter Roeck 2017-04-01 48 EXPORT_SYMBOL(vac_cache_size);
^1da177e4c3f41 Linus Torvalds 2005-04-16 @49 int vac_line_size; ^1da177e4c3f41 Linus Torvalds 2005-04-16 50
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Re: [PATCH v2 14/28] sparc32: Drop unused mmu models
Hi kernel test robot et al.
Quoted 22 lines · kernel test robot
Hi Sam,
kernel test robot noticed the following build warnings:
[auto build test WARNING on
84b76d05828a1909e20d0f66553b876b801f98c8]url: https://github.com/intel-lab-lkp/linux/commits/Sam-Ravnborg-via-B4-Relay/sparc32-Update-defconfig-to-LEON-SMP/20240310-021717 base: 84b76d05828a1909e20d0f66553b876b801f98c8 patch link: https://lore.kernel.org/r/20240309-sunset-v2-14-f09912574d2c%40ravnborg.org patch subject: [PATCH v2 14/28] sparc32: Drop unused mmu models config: sparc-randconfig-r113-20240310 (https://download.01.org/0day-ci/archive/20240310/[email protected]/config) compiler: sparc-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240310/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/sparse warnings: (new ones prefixed by >>)
Quoted 1 line
Quoted 1 line
arch/sparc/mm/srmmu.c:49:5: sparse: sparse: symbol 'vac_line_size' was not declared. Should it be static?
Quoted 7 lines
vim +/vac_line_size +49
arch/sparc/mm/srmmu.caccf032cfa582e Sam Ravnborg 2012-05-19 46 ^1da177e4c3f41 Linus Torvalds 2005-04-16 47 int vac_cache_size; 9d262d95114cf2 Guenter Roeck 2017-04-01 48 EXPORT_SYMBOL(vac_cache_size);^1da177e4c3f41 Linus Torvalds 2005-04-16 @49 int
vac_line_size; ^1da177e4c3f41 Linus Torvalds 2005-04-16 50
vac_line_size is no longer used and can be deleted. vac_cache_size is never written to and can be deleted too.
vac_cache_size is used in shmparam_32.h like this:
#define SHMLBA (vac_cache_size ? vac_cache_size : PAGE_SIZE)
The same file has:
#define __ARCH_FORCE_SHMLBA 1
If I understand it right then when SHMLBA equals PAGE_SIZE then there is no need to define __ARCH_FORCE_SHMLBA and sparc32 can use the asm-generic variant of shmparam.h
I will do this change in v3.
Sam
PATCH v3 14/28 sparc32: Drop unused mmu models
Drop mmu models not used by LEON, including their header files. This includes removal of unused includes in various files to fix the build.
With this change SHMLBA is always PAGE_SIZE so use the asm-generic variant of shmparam.h for sparc32. __ARCH_FORCE_SHMLBA is then no longer defined, but this should be OK if my analysis is correct.
---
Posted v3 here to avoid resending the whole series. In v3 the asm-generic shmparam.h are introduced and a few unused variables (reported by kernel test robot) was dropped.
Sam
arch/sparc/include/asm/mxcc.h | 138 ----- arch/sparc/include/asm/ross.h | 192 ------- arch/sparc/include/asm/shmparam.h | 2 +- arch/sparc/include/asm/shmparam_32.h | 10 - arch/sparc/include/asm/swift.h | 107 ---- arch/sparc/include/asm/tsunami.h | 65 --- arch/sparc/include/asm/turbosparc.h | 126 ----- arch/sparc/include/asm/viking.h | 255 --------- arch/sparc/kernel/entry.S | 1 - arch/sparc/mm/Makefile | 1 - arch/sparc/mm/hypersparc.S | 414 -------------- arch/sparc/mm/io-unit.c | 1 - arch/sparc/mm/iommu.c | 31 +- arch/sparc/mm/mm_32.h | 1 - arch/sparc/mm/srmmu.c | 780 +-------------------------- arch/sparc/mm/swift.S | 256 --------- arch/sparc/mm/tsunami.S | 132 ----- arch/sparc/mm/viking.S | 284 ---------- 18 files changed, 22 insertions(+), 2774 deletions(-) delete mode 100644 arch/sparc/include/asm/mxcc.h delete mode 100644 arch/sparc/include/asm/ross.h delete mode 100644 arch/sparc/include/asm/shmparam_32.h delete mode 100644 arch/sparc/include/asm/swift.h delete mode 100644 arch/sparc/include/asm/tsunami.h delete mode 100644 arch/sparc/include/asm/turbosparc.h delete mode 100644 arch/sparc/include/asm/viking.h delete mode 100644 arch/sparc/mm/hypersparc.S delete mode 100644 arch/sparc/mm/swift.S delete mode 100644 arch/sparc/mm/tsunami.S delete mode 100644 arch/sparc/mm/viking.S
arch/sparc/include/asm/mxcc.h deleted +0 -138
@@ -1,138 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* mxcc.h: Definitions of the Viking MXCC registers -* -* Copyright (C) 1995 David S. Miller ([email protected]) -*/ - -#ifndef _SPARC_MXCC_H -#define _SPARC_MXCC_H - -/* These registers are accessed through ASI 0x2. */ -#define MXCC_DATSTREAM 0x1C00000/* Data stream register */ -#define MXCC_SRCSTREAM 0x1C00100/* Source stream register */ -#define MXCC_DESSTREAM 0x1C00200/* Destination stream register */ -#define MXCC_RMCOUNT 0x1C00300/* Count of references and misses */ -#define MXCC_STEST 0x1C00804/* Internal self-test */ -#define MXCC_CREG 0x1C00A04/* Control register */ -#define MXCC_SREG 0x1C00B00/* Status register */ -#define MXCC_RREG 0x1C00C04/* Reset register */ -#define MXCC_EREG 0x1C00E00/* Error code register */ -#define MXCC_PREG 0x1C00F04/* Address port register */ - -/* Some MXCC constants. */ -#define MXCC_STREAM_SIZE 0x20/* Size in bytes of one stream r/w */ - -/* The MXCC Control Register: -* -* ---------------------------------------------------------------------- -* | | RRC | RSV |PRE|MCE|PARE|ECE|RSV| -* ---------------------------------------------------------------------- -* 31 10 9 8-6 5 4 3 2 1-0 -* -* RRC: Controls what you read from MXCC_RMCOUNT reg. -* 0=Misses 1=References -* PRE: Prefetch enable -* MCE: Multiple Command Enable -* PARE: Parity enable -* ECE: External cache enable -*/ - -#define MXCC_CTL_RRC 0x00000200 -#define MXCC_CTL_PRE 0x00000020 -#define MXCC_CTL_MCE 0x00000010 -#define MXCC_CTL_PARE 0x00000008 -#define MXCC_CTL_ECE 0x00000004 - -/* The MXCC Error Register: -* -* -------------------------------------------------------- -* |ME| RSV|CE|PEW|PEE|ASE|EIV| MOPC|ECODE|PRIV|RSV|HPADDR| -* -------------------------------------------------------- -* 31 30 29 28 27 26 25 24-15 14-7 6 5-3 2-0 -* -* ME: Multiple Errors have occurred -* CE: Cache consistency Error -* PEW: Parity Error during a Write operation -* PEE: Parity Error involving the External cache -* ASE: ASynchronous Error -* EIV: This register is toast -* MOPC: MXCC Operation Code for instance causing error -* ECODE: The Error CODE -* PRIV: A privileged mode error? 0=no 1=yes -* HPADDR: High PhysicalADDRess bits (35-32) -*/ - -#define MXCC_ERR_ME 0x80000000 -#define MXCC_ERR_CE 0x20000000 -#define MXCC_ERR_PEW 0x10000000 -#define MXCC_ERR_PEE 0x08000000 -#define MXCC_ERR_ASE 0x04000000 -#define MXCC_ERR_EIV 0x02000000 -#define MXCC_ERR_MOPC 0x01FF8000 -#define MXCC_ERR_ECODE 0x00007F80 -#define MXCC_ERR_PRIV 0x00000040 -#define MXCC_ERR_HPADDR 0x0000000f - -/* The MXCC Port register: -* -* ----------------------------------------------------- -* | | MID | | -* ----------------------------------------------------- -* 31 21 20-18 17 0 -* -* MID: The moduleID of the cpu your read this from. -*/ - -#ifndef __ASSEMBLY__ - -static inline void mxcc_set_stream_src (unsigned long *paddr) -{ -unsigned long data0 = paddr[0 ]; -unsigned long data1 = paddr[1 ]; - - __asm__ __volatile__ ("or %%g0, %0, %%g2\n\t" -"or %%g0, %1, %%g3\n\t" -"stda %%g2, [%2] %3\n\t" : : -"r" (data0),"r" (data1), -"r" (MXCC_SRCSTREAM ), -"i" (ASI_M_MXCC ) :"g2" ,"g3" ); -} - -static inline void mxcc_set_stream_dst (unsigned long *paddr) -{ -unsigned long data0 = paddr[0 ]; -unsigned long data1 = paddr[1 ]; - - __asm__ __volatile__ ("or %%g0, %0, %%g2\n\t" -"or %%g0, %1, %%g3\n\t" -"stda %%g2, [%2] %3\n\t" : : -"r" (data0),"r" (data1), -"r" (MXCC_DESSTREAM ), -"i" (ASI_M_MXCC ) :"g2" ,"g3" ); -} - -static inline unsigned long mxcc_get_creg (void ) -{ -unsigned long mxcc_control; - - __asm__ __volatile__("set 0xffffffff, %%g2\n\t" -"set 0xffffffff, %%g3\n\t" -"stda %%g2, [%1] %2\n\t" -"lda [%3] %2, %0\n\t" : -"=r" (mxcc_control) : -"r" (MXCC_EREG ),"i" (ASI_M_MXCC ), -"r" (MXCC_CREG ) :"g2" ,"g3" ); -return mxcc_control; -} - -static inline void mxcc_set_creg (unsigned long mxcc_control) -{ - __asm__ __volatile__("sta %0, [%1] %2\n\t" : : -"r" (mxcc_control),"r" (MXCC_CREG ), -"i" (ASI_M_MXCC )); -} - -#endif /* !__ASSEMBLY__ */ - -#endif /* !(_SPARC_MXCC_H) */
arch/sparc/include/asm/ross.h deleted +0 -192
192 lines not on this page · raw message
arch/sparc/include/asm/shmparam.h +1 -1
@@ -4,6 +4,6 @@#if defined(__sparc__) && defined(__arch64__)#include <asm/shmparam_64.h> #else -#include <asm/shmparam_32.h> +#include <asm-generic/shmparam.h> #endif #endif
arch/sparc/include/asm/shmparam_32.h deleted +0 -10
@@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _ASMSPARC_SHMPARAM_H -#define _ASMSPARC_SHMPARAM_H - -#define __ARCH_FORCE_SHMLBA 1 - -extern int vac_cache_size; -#define SHMLBA (vac_cache_size ? vac_cache_size : PAGE_SIZE) - -#endif /* _ASMSPARC_SHMPARAM_H */
arch/sparc/include/asm/swift.h deleted +0 -107
107 lines not on this page · raw message
arch/sparc/include/asm/tsunami.h deleted +0 -65
65 lines not on this page · raw message
arch/sparc/include/asm/turbosparc.h deleted +0 -126
126 lines not on this page · raw message
arch/sparc/include/asm/viking.h deleted +0 -255
255 lines not on this page · raw message
arch/sparc/kernel/entry.S +0 -1
@@ -25,7 +25,6 @@ #include <asm/winmacro.h> #include <asm/signal.h> #include <asm/obio.h> -#include <asm/mxcc.h> #include <asm/thread_info.h> #include <asm/param.h> #include <asm/unistd.h>
arch/sparc/mm/Makefile +0 -1
@@ -9,7 +9,6 @@ obj-y += fault_$(BITS).o obj-y += init_$(BITS).o obj-$(CONFIG_SPARC32) += srmmu.o iommu.o io-unit.o obj-$(CONFIG_SPARC32) += srmmu_access.o -obj-$(CONFIG_SPARC32) += hypersparc.o viking.o tsunami.o swift.o obj-$(CONFIG_SPARC32) += leon_mm.o # Only used by sparc64
arch/sparc/mm/hypersparc.S deleted +0 -414
414 lines not on this page · raw message
arch/sparc/mm/io-unit.c +0 -1
@@ -18,7 +18,6 @@#include <asm/io.h> #include <asm/io-unit.h> -#include <asm/mxcc.h> #include <asm/cacheflush.h> #include <asm/tlbflush.h> #include <asm/dma.h>
arch/sparc/mm/iommu.c +4 -27
@@ -18,7 +18,6 @@#include <linux/platform_device.h> #include <asm/io.h> -#include <asm/mxcc.h> #include <asm/cacheflush.h> #include <asm/tlbflush.h> #include <asm/bitext.h>
@@ -37,11 +36,6 @@#define IOMMU_NPTES (IOMMU_WINSIZE/PAGE_SIZE)/* 64K PTEs, 256KB */ #define IOMMU_ORDER 6/* 4096 * (1<<6) */ -static int viking_flush; -/* viking.S */ -extern void viking_flush_page (unsigned long page); -extern void viking_mxcc_flush_page (unsigned long page); -/* * Values precomputed according to CPU type. */
@@ -156,21 +150,9 @@ static void iommu_flush_iotlb(iopte_t *iopte, unsigned int niopte) start = (unsigned long )iopte; end =PAGE_ALIGN (start + niopte*sizeof (iopte_t)); start &=PAGE_MASK ; -if (viking_mxcc_present) { -while (start < end) { -viking_mxcc_flush_page (start); - start +=PAGE_SIZE ; - } - }else if (viking_flush) { -while (start < end) { -viking_flush_page (start); - start +=PAGE_SIZE ; - } - }else { -while (start < end) { -__flush_page_to_ram (start); - start +=PAGE_SIZE ; - } +while (start < end) { +__flush_page_to_ram (start); + start +=PAGE_SIZE ; } }
@@ -344,12 +326,7 @@ static void *sbus_iommu_alloc(struct device *dev, size_t len,pmd_t *pmdp;pte_t *ptep; -if (viking_mxcc_present) -viking_mxcc_flush_page (page); -else if (viking_flush) -viking_flush_page (page); -else -__flush_page_to_ram (page); +__flush_page_to_ram (page); pmdp =pmd_off_k (addr); ptep =pte_offset_kernel (pmdp, addr);
arch/sparc/mm/mm_32.h +0 -1
@@ -9,7 +9,6 @@ void window_ret_fault(struct pt_regs *regs);/* srmmu.c */ extern char *srmmu_name; -extern int viking_mxcc_present;extern int flush_page_for_dma_global;extern void (*poke_srmmu)(void );
arch/sparc/mm/srmmu.c +17 -763
855 lines not on this page · raw message
arch/sparc/mm/swift.S deleted +0 -256
256 lines not on this page · raw message
arch/sparc/mm/tsunami.S deleted +0 -132
132 lines not on this page · raw message
arch/sparc/mm/viking.S deleted +0 -284
284 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 15/28 sparc32: Drop check for sparc_model
In reply to Sam Ravnborgsparc32 is always LEON, so no need to check for the model.
--- arch/sparc/include/asm/cpu_type.h | 18 --------- arch/sparc/include/asm/io_32.h | 4 +- arch/sparc/kernel/devices.c | 7 +--- arch/sparc/kernel/ioport.c | 4 +- arch/sparc/kernel/leon_pmc.c | 16 ++++---- arch/sparc/kernel/setup_32.c | 79 +-------------------------------------- 6 files changed, 12 insertions(+), 116 deletions(-)
arch/sparc/include/asm/cpu_type.h +0 -18
@@ -2,28 +2,10 @@#ifndef __ASM_CPU_TYPE_H#define __ASM_CPU_TYPE_H -/* -* Sparc (general) CPU types -*/ -enum sparc_cpu { - sun4m =0x00 , - sun4d =0x01 , - sun4e =0x02 , - sun4u =0x03 ,/* V8 ploos ploos */ - sun_unknown =0x04 , - ap1000 =0x05 ,/* almost a sun4m */ - sparc_leon =0x06 ,/* Leon SoC */ -}; -#ifdef CONFIG_SPARC32 -extern enum sparc_cpu sparc_cpu_model;#define SUN4M_NCPUS 4/* Architectural limit of sun4m. */ -#else - -#define sparc_cpu_model sun4u -#endif #endif /* __ASM_CPU_TYPE_H */
arch/sparc/include/asm/io_32.h +2 -2
@@ -138,11 +138,11 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *);static inline int sbus_can_dma_64bit (void ) { -return 0 ;/* actually, sparc_cpu_model==sun4d */ +return 0 ; }static inline int sbus_can_burst64 (void ) { -return 0 ;/* actually, sparc_cpu_model==sun4d */ +return 0 ; }struct device ;void sbus_set_sbus64 (struct device *,int );
arch/sparc/kernel/devices.c +1 -6
@@ -26,8 +26,6 @@static char *cpu_mid_prop (void ) { -if (sparc_cpu_model == sun4d) -return "cpu-id" ;return "mid" ; }
@@ -40,8 +38,6 @@ static int check_cpu_node(phandle nd, int *cur_inst, *prom_node = nd;if (mid) { *mid =prom_getintdefault (nd,cpu_mid_prop (),0 ); -if (sparc_cpu_model == sun4m) - *mid &=3 ; }return 0 ; }
@@ -92,8 +88,7 @@ static int cpu_mid_compare(phandle nd, int instance, void *_arg)int this_mid; this_mid =prom_getintdefault (nd,cpu_mid_prop (),0 ); -if (this_mid == desired_mid - || (sparc_cpu_model == sun4m && (this_mid &3 ) == desired_mid)) +if (this_mid == desired_mid)return 0 ;return -ENODEV ; }
arch/sparc/kernel/ioport.c +1 -3
@@ -309,9 +309,7 @@ arch_initcall(sparc_register_ioport);void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size,enum dma_data_direction dir) { -if (dir !=DMA_TO_DEVICE && - sparc_cpu_model == sparc_leon && - !sparc_leon3_snooping_enabled ()) +if (dir !=DMA_TO_DEVICE && !sparc_leon3_snooping_enabled ())leon_flush_dcache_all (); }
arch/sparc/kernel/leon_pmc.c +7 -9
@@ -79,15 +79,13 @@ static void pmc_leon_idle(void)/* Install LEON Power Down function */ static int __init leon_pmc_install (void ) { -if (sparc_cpu_model == sparc_leon) { -/* Assign power management IDLE handler */ -if (pmc_leon_need_fixup ()) - sparc_idle = pmc_leon_idle_fixup; -else - sparc_idle = pmc_leon_idle; - -printk (KERN_INFO "leon: power management initialized\n" ); - } +/* Assign power management IDLE handler */ +if (pmc_leon_need_fixup ()) + sparc_idle = pmc_leon_idle_fixup; +else + sparc_idle = pmc_leon_idle; + +printk (KERN_INFO "leon: power management initialized\n" );return 0 ; }
arch/sparc/kernel/setup_32.c +1 -78
111 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 16/28 sparc32: Drop use of sparc_config
In reply to Sam Ravnborgsparc_config were used to handle the differences between the machines. With only LEON supported sparc_config is no longer required.
Refactor the time code a litte as some parts are obsolete and other parts are only used when SMP is not enabled.
--- arch/sparc/include/asm/timer_32.h | 1 + arch/sparc/kernel/irq.h | 37 +++------------------- arch/sparc/kernel/irq_32.c | 3 -- arch/sparc/kernel/leon_kernel.c | 27 +++-------------- arch/sparc/kernel/of_device_32.c | 4 +-- arch/sparc/kernel/time_32.c | 64 +++++++++++++-------------------------- 6 files changed, 33 insertions(+), 103 deletions(-)
arch/sparc/include/asm/timer_32.h +1 -0
@@ -17,6 +17,7 @@#include <asm/cpu_type.h> /* For SUN4M_NCPUS */ #define SBUS_CLOCK_RATE 2000000/* 2MHz */ +#define LEON_CLOCK_RATE 1000000#define TIMER_VALUE_SHIFT 9#define TIMER_VALUE_MASK 0x3fffff#define TIMER_LIMIT_BIT (1 << 31)/* Bit 31 in Counter-Timer register */
arch/sparc/kernel/irq.h +5 -32
@@ -44,38 +44,6 @@ struct sun4m_irq_global {extern struct sun4m_irq_percpu __iomem *sun4m_irq_percpu[SUN4M_NCPUS ];extern struct sun4m_irq_global __iomem *sun4m_irq_global; -/* The following definitions describe the individual platform features: */ -#define FEAT_L10_CLOCKSOURCE (1 << 0)/* L10 timer is used as a clocksource */ -#define FEAT_L10_CLOCKEVENT (1 << 1)/* L10 timer is used as a clockevent */ -#define FEAT_L14_ONESHOT (1 << 2)/* L14 timer clockevent can oneshot */ - -/* -* Platform specific configuration -* The individual platforms assign their platform -* specifics in their init functions. -*/ -struct sparc_config { -void (*init_timers)(void ); -unsigned int (*build_device_irq)(struct platform_device *op, -unsigned int real_irq); - -/* generic clockevent features - see FEAT_* above */ -int features; - -/* clock rate used for clock event timer */ -int clock_rate; - -/* one period for clock source timer */ -unsigned int cs_period; - -/* function to obtain offsett for cs period */ -unsigned int (*get_cycles_offset)(void ); - -void (*clear_clock_irq)(void ); -void (*load_profile_irq)(int cpu,unsigned int limit); -}; -extern struct sparc_config sparc_config; -unsigned int irq_alloc (unsigned int real_irq,unsigned int pil);void irq_link (unsigned int irq);void irq_unlink (unsigned int irq);
@@ -89,6 +57,11 @@ void sun4m_nmi(struct pt_regs *regs);/* sun4d_irq.c */ void sun4d_handler_irq (unsigned int pil,struct pt_regs *regs); +/* leon_kernel.c */ +void leon_clear_clock_irq (void ); +void leon_load_profile_irq (int cpu,unsigned int limit); +u32 leon_cycles_offset (void ); +#ifdef CONFIG_SMP /* All SUN4D IPIs are sent on this IRQ, may be shared with hard IRQs */
arch/sparc/kernel/irq_32.c +0 -3
@@ -24,9 +24,6 @@#include "kernel.h" #include "irq.h" -/* platform specific irq setup */ -struct sparc_config sparc_config; -unsigned long arch_local_irq_save (void ) {unsigned long retval;
arch/sparc/kernel/leon_kernel.c +4 -23
@@ -237,12 +237,6 @@ unsigned int leon_build_device_irq(unsigned int real_irq,return irq; } -static unsigned int _leon_build_device_irq (struct platform_device *op, -unsigned int real_irq) -{ -return leon_build_device_irq (real_irq, handle_simple_irq,"edge" ,0 ); -} -void leon_update_virq_handling (unsigned int virq,irq_flow_handler_t flow_handler,const char *name,int do_ack)
@@ -258,7 +252,7 @@ void leon_update_virq_handling(unsigned int virq,irq_set_chip_data (virq, (void *)mask); } -static u32 leon_cycles_offset (void ) +u32 leon_cycles_offset (void ) {u32 rld, val, ctrl, off;
@@ -312,14 +306,6 @@ void __init leon_init_timers(void)u32 config;u32 ctrl; - sparc_config.get_cycles_offset = leon_cycles_offset; - sparc_config.cs_period =1000000 /HZ ; - sparc_config.features |=FEAT_L10_CLOCKSOURCE ; - -#ifndef CONFIG_SMP - sparc_config.features |=FEAT_L10_CLOCKEVENT ; -#endif - leondebug_irq_disable =0 ; leon_debug_irqout =0 ; master_l10_counter = (u32 __iomem *)&dummy_master_l10_counter;
@@ -434,7 +420,7 @@ void __init leon_init_timers(void) err =request_irq (irq, leon_percpu_timer_ce_interrupt,IRQF_PERCPU |IRQF_TIMER ,"timer" ,NULL );#else - irq =_leon_build_device_irq (NULL , leon3_gptimer_irq); + irq =leon_build_device_irq (leon3_gptimer_irq, handle_simple_irq,"edge" ,0 ); err =request_irq (irq, timer_interrupt,IRQF_TIMER ,"timer" ,NULL );#endif if (err) {
@@ -453,7 +439,7 @@ void __init leon_init_timers(void)return ; } -static void leon_clear_clock_irq (void ) +void leon_clear_clock_irq (void ) {u32 ctrl;
@@ -462,7 +448,7 @@ static void leon_clear_clock_irq(void) ctrl & leon3_gptimer_ackmask); } -static void leon_load_profile_irq (int cpu,unsigned int limit) +void leon_load_profile_irq (int cpu,unsigned int limit) { }
@@ -485,9 +471,4 @@ void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu)void __init leon_init_IRQ (void ) { - sparc_config.init_timers = leon_init_timers; - sparc_config.build_device_irq = _leon_build_device_irq; - sparc_config.clock_rate =1000000 ; - sparc_config.clear_clock_irq = leon_clear_clock_irq; - sparc_config.load_profile_irq = leon_load_profile_irq; }
arch/sparc/kernel/of_device_32.c +2 -2
@@ -358,7 +358,7 @@ static struct platform_device * __init scan_one_device(struct device_node *dp, op->archdata.num_irqs = len /sizeof (struct linux_prom_irqs );for (i =0 ; i < op->archdata.num_irqs; i++) op->archdata.irqs[i] = - sparc_config.build_device_irq (op, intr[i].pri); +leon_build_device_irq (intr[i].pri, handle_simple_irq,"edge" ,0 ); }else {const unsigned int *irq =of_get_property (dp,"interrupts" , &len);
@@ -367,7 +367,7 @@ static struct platform_device * __init scan_one_device(struct device_node *dp, op->archdata.num_irqs = len /sizeof (unsigned int );for (i =0 ; i < op->archdata.num_irqs; i++) op->archdata.irqs[i] = - sparc_config.build_device_irq (op, irq[i]); +leon_build_device_irq (irq[i], handle_simple_irq,"edge" ,0 ); }else { op->archdata.num_irqs =0 ; }
arch/sparc/kernel/time_32.c +21 -43
151 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 17/28 sparc32: Drop run-time cpuid patching
In reply to Sam RavnborgThe CPU is always leon, so the run-time cpuid patching is no longer required.
--- arch/sparc/include/asm/winmacro.h | 12 ------------ arch/sparc/kernel/entry.S | 13 ------------- arch/sparc/kernel/setup_32.c | 31 ------------------------------- 3 files changed, 56 deletions(-)
arch/sparc/include/asm/winmacro.h +0 -12
@@ -105,21 +105,9 @@#ifdef CONFIG_SMP #define LOAD_CURRENT (dest_reg, idreg) \ -661: rd %tbr, %idreg; \ - srl %idreg, 10, %idreg; \ - and %idreg, 0xc, %idreg; \ - .section .cpuid_patch, "ax"; \ - /* Instruction location. */ \ - .word 661b; \ - /* SUN4D implementation. */ \ - lda [%g0] ASI_M_VIKING_TMP1, %idreg; \ - sll %idreg, 2, %idreg; \ - nop; \ - /* LEON implementation. */ \ rd %asr17, %idreg; \ srl %idreg, 0x1c, %idreg; \ sll %idreg, 0x02, %idreg; \ - .previous; \ sethi %hi(current_set), %dest_reg; \ or %dest_reg, %lo(current_set), %dest_reg;\ ld [%idreg + %dest_reg], %dest_reg;
arch/sparc/kernel/entry.S +0 -13
@@ -984,21 +984,8 @@ flushw_all: #ifdef CONFIG_SMP ENTRY(hard_smp_processor_id) -661: rd %tbr, %g1 - srl %g1, 12, %o0 - and %o0, 3, %o0 - .section .cpuid_patch, "ax" - /* Instruction location. */ - .word 661b - /* SUN4D implementation. */ - lda [%g0] ASI_M_VIKING_TMP1, %o0 - nop - nop - /* LEON implementation. */ rd %asr17, %o0 srl %o0, 0x1c, %o0 - nop - .previous retl nop ENDPROC(hard_smp_processor_id)
arch/sparc/kernel/setup_32.c +0 -31
@@ -178,34 +178,6 @@ extern int root_mountflags;char reboot_command[COMMAND_LINE_SIZE ]; -struct cpuid_patch_entry { -unsigned int addr; -unsigned int sun4d[3 ]; -unsigned int leon[3 ]; -}; -extern struct cpuid_patch_entry __cpuid_patch, __cpuid_patch_end; - -static void __init per_cpu_patch (void ) -{ -struct cpuid_patch_entry *p; - - p = &__cpuid_patch; -while (p < &__cpuid_patch_end) { -unsigned long addr = p->addr; -unsigned int *insns; - - insns = &p->leon[0 ]; - *(unsigned int *) (addr +0 ) = insns[0 ]; -flushi (addr +0 ); - *(unsigned int *) (addr +4 ) = insns[1 ]; -flushi (addr +4 ); - *(unsigned int *) (addr +8 ) = insns[2 ]; -flushi (addr +8 ); - - p++; - } -} -static __init void leon_patch (void ) {/* Default instruction is leon - no patching */
@@ -271,9 +243,6 @@ void __init setup_arch(char **cmdline_p) (*(linux_dbvec->teach_debugger))(); } -/* Run-time patch instructions to match the cpu model */ -per_cpu_patch (); -paging_init ();smp_setup_cpu_possible_map ();
Signature · 1 line
2.34.1
PATCH v2 18/28 sparc32: Drop run-time patching of ASI instructions
In reply to Sam RavnborgWith only LEON supported there is no need to run-time patch the instructions to match ASI.
Move a few functions back to C with inline asm, now that run-time patching is not needed.
Deleted a few functions that turns out not to be used rather than re-implement them in C.
--- arch/sparc/include/asm/asmmacro.h | 22 ----------- arch/sparc/include/asm/pgtsrmmu.h | 28 ++++++------- arch/sparc/include/asm/sections.h | 3 -- arch/sparc/kernel/entry.S | 7 +--- arch/sparc/kernel/etrap_32.S | 15 +++---- arch/sparc/kernel/rtrap_32.S | 18 +++------ arch/sparc/kernel/vmlinux.lds.S | 5 --- arch/sparc/kernel/wof.S | 18 +++------ arch/sparc/kernel/wuf.S | 21 ++++------ arch/sparc/mm/Makefile | 1 - arch/sparc/mm/srmmu_access.S | 83 --------------------------------------- 11 files changed, 40 insertions(+), 181 deletions(-)
arch/sparc/include/asm/asmmacro.h +0 -22
@@ -21,26 +21,4 @@/* All traps low-level code here must end with this macro. */ #define RESTORE_ALL b ret_trap_entry; clr %l6; -/* Support for run-time patching of single instructions. -* This is used to handle the differences in the ASI for -* MMUREGS for LEON and SUN. -* -* Sample: -* LEON_PI(lda [%g0] ASI_LEON_MMUREGS, %o0 -* SUN_PI_(lda [%g0] ASI_M_MMUREGS, %o0 -* PI == Patch Instruction -* -* For LEON we will use the first variant, -* and for all other we will use the SUN variant. -* The order is important. -*/ -#define LEON_PI (...) \ -662: __VA_ARGS__ - -#define SUN_PI_ (...) \ - .section .leon_1insn_patch, "ax"; \ - .word 662b; \ - __VA_ARGS__; \ - .previous -#endif /* !(_SPARC_ASMMACRO_H) */
arch/sparc/include/asm/pgtsrmmu.h +14 -14
@@ -107,22 +107,22 @@ extern void *srmmu_nocache_pool;#define __nocache_va (PADDR ) (__va((unsigned long)PADDR) - (unsigned long)srmmu_nocache_pool + SRMMU_NOCACHE_VADDR)#define __nocache_fix (VADDR ) ((__typeof__(VADDR))__va(__nocache_pa(VADDR))) -/* Accessing the MMU control register. */ -unsigned int srmmu_get_mmureg (void ); -void srmmu_set_mmureg (unsigned long regval); -void srmmu_set_ctable_ptr (unsigned long paddr); -void srmmu_set_context (int context); -int srmmu_get_context (void ); -unsigned int srmmu_get_fstatus (void ); -unsigned int srmmu_get_faddr (void ); - -/* This is guaranteed on all SRMMU's. */ -static inline void srmmu_flush_whole_tlb (void ) +static inline void srmmu_set_ctable_ptr (unsigned long paddr) { - __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : : -"r" (0x400 ),/* Flush entire TLB!! */ -"i" (ASI_M_FLUSH_PROBE ) :"memory" ); + paddr = ((paddr >>4 ) &SRMMU_CTX_PMASK ); + asmvolatile ("sta %0, [%1] %2\n\t" : :"r" (paddr),"r" (SRMMU_CTXTBL_PTR ),"i" (ASI_LEON_MMUREGS ) :"memory" ); +} +static inline void srmmu_set_context (int context) +{ + asmvolatile ("sta %0, [%1] %2\n\t" : :"r" (context),"r" (SRMMU_CTX_REG ),"i" (ASI_LEON_MMUREGS ) :"memory" ); +} + +static inline int srmmu_get_context (void ) +{ + registerint retval; + asmvolatile ("lda [%1] %2, %0\n\t" :"=r" (retval) :"r" (SRMMU_CTX_REG ),"i" (ASI_LEON_MMUREGS )); +return retval; }#endif /* !(__ASSEMBLY__) */
arch/sparc/include/asm/sections.h +0 -3
@@ -8,7 +8,4 @@/* sparc entry point */ extern char _start[]; -extern char __leon_1insn_patch[]; -extern char __leon_1insn_patch_end[]; -#endif
arch/sparc/kernel/entry.S +2 -5
@@ -469,11 +469,8 @@ srmmu_fault: mov 0x400, %l5 mov 0x300, %l4 -LEON_PI(lda [%l5] ASI_LEON_MMUREGS, %l6) ! read sfar first -SUN_PI_(lda [%l5] ASI_M_MMUREGS, %l6) ! read sfar first - -LEON_PI(lda [%l4] ASI_LEON_MMUREGS, %l5) ! read sfsr last -SUN_PI_(lda [%l4] ASI_M_MMUREGS, %l5) ! read sfsr last + lda [%l5] ASI_LEON_MMUREGS, %l6 ! read sfar first + lda [%l4] ASI_LEON_MMUREGS, %l5 ! read sfsr last andn %l6, 0xfff, %l6 srl %l5, 6, %l5 ! and encode all info into l7
arch/sparc/kernel/etrap_32.S +5 -10
@@ -235,8 +235,7 @@ tsetup_srmmu_stackchk: cmp %glob_tmp, %sp bleu,a 1f -LEON_PI( lda [%g0] ASI_LEON_MMUREGS, %glob_tmp) ! read MMU control -SUN_PI_( lda [%g0] ASI_M_MMUREGS, %glob_tmp) ! read MMU control + lda [%g0] ASI_LEON_MMUREGS, %glob_tmp ! read MMU control trap_setup_user_stack_is_bolixed: /* From user/kernel into invalid window w/bad user
@@ -251,24 +250,20 @@ trap_setup_user_stack_is_bolixed: 1: /* Clear the fault status and turn on the no_fault bit. */ or %glob_tmp, 0x2, %glob_tmp ! or in no_fault bit -LEON_PI(sta %glob_tmp, [%g0] ASI_LEON_MMUREGS) ! set it -SUN_PI_(sta %glob_tmp, [%g0] ASI_M_MMUREGS) ! set it + sta %glob_tmp, [%g0] ASI_LEON_MMUREGS ! set it /* Dump the registers and cross fingers. */ STORE_WINDOW(sp) /* Clear the no_fault bit and check the status. */ andn %glob_tmp, 0x2, %glob_tmp -LEON_PI(sta %glob_tmp, [%g0] ASI_LEON_MMUREGS) -SUN_PI_(sta %glob_tmp, [%g0] ASI_M_MMUREGS) + sta %glob_tmp, [%g0] ASI_LEON_MMUREGS mov AC_M_SFAR, %glob_tmp -LEON_PI(lda [%glob_tmp] ASI_LEON_MMUREGS, %g0) -SUN_PI_(lda [%glob_tmp] ASI_M_MMUREGS, %g0) + lda [%glob_tmp] ASI_LEON_MMUREGS, %g0 mov AC_M_SFSR, %glob_tmp -LEON_PI(lda [%glob_tmp] ASI_LEON_MMUREGS, %glob_tmp)! save away status of winstore -SUN_PI_(lda [%glob_tmp] ASI_M_MMUREGS, %glob_tmp) ! save away status of winstore + lda [%glob_tmp] ASI_LEON_MMUREGS, %glob_tmp ! save away status of winstore andcc %glob_tmp, 0x2, %g0 ! did we fault? bne trap_setup_user_stack_is_bolixed ! failure
arch/sparc/kernel/rtrap_32.S +6 -12
@@ -232,14 +232,11 @@ srmmu_rett_stackchk: cmp %g1, %fp bleu ret_trap_user_stack_is_bolixed mov AC_M_SFSR, %g1 -LEON_PI(lda [%g1] ASI_LEON_MMUREGS, %g0) -SUN_PI_(lda [%g1] ASI_M_MMUREGS, %g0) + lda [%g1] ASI_LEON_MMUREGS, %g0 -LEON_PI(lda [%g0] ASI_LEON_MMUREGS, %g1) -SUN_PI_(lda [%g0] ASI_M_MMUREGS, %g1) + lda [%g0] ASI_LEON_MMUREGS, %g1 or %g1, 0x2, %g1 -LEON_PI(sta %g1, [%g0] ASI_LEON_MMUREGS) -SUN_PI_(sta %g1, [%g0] ASI_M_MMUREGS) + sta %g1, [%g0] ASI_LEON_MMUREGS restore %g0, %g0, %g0
@@ -248,16 +245,13 @@ SUN_PI_(sta %g1, [%g0] ASI_M_MMUREGS) save %g0, %g0, %g0 andn %g1, 0x2, %g1 -LEON_PI(sta %g1, [%g0] ASI_LEON_MMUREGS) -SUN_PI_(sta %g1, [%g0] ASI_M_MMUREGS) + sta %g1, [%g0] ASI_LEON_MMUREGS mov AC_M_SFAR, %g2 -LEON_PI(lda [%g2] ASI_LEON_MMUREGS, %g2) -SUN_PI_(lda [%g2] ASI_M_MMUREGS, %g2) + lda [%g2] ASI_LEON_MMUREGS, %g2 mov AC_M_SFSR, %g1 -LEON_PI(lda [%g1] ASI_LEON_MMUREGS, %g1) -SUN_PI_(lda [%g1] ASI_M_MMUREGS, %g1) + lda [%g1] ASI_LEON_MMUREGS, %g1 andcc %g1, 0x2, %g0 be ret_trap_userwins_ok nop
arch/sparc/kernel/vmlinux.lds.S +0 -5
@@ -113,11 +113,6 @@ SECTIONS *(.sun4v_2insn_patch) __sun4v_2insn_patch_end = .; } - .leon_1insn_patch : { - __leon_1insn_patch = .; - *(.leon_1insn_patch) - __leon_1insn_patch_end = .; - } .swapper_tsb_phys_patch : { __swapper_tsb_phys_patch = .; *(.swapper_tsb_phys_patch)
arch/sparc/kernel/wof.S +6 -12
@@ -333,30 +333,24 @@ spwin_srmmu_stackchk: mov AC_M_SFSR, %glob_tmp /* Clear the fault status and turn on the no_fault bit. */ -LEON_PI(lda [%glob_tmp] ASI_LEON_MMUREGS, %g0) ! eat SFSR -SUN_PI_(lda [%glob_tmp] ASI_M_MMUREGS, %g0) ! eat SFSR + lda [%glob_tmp] ASI_LEON_MMUREGS, %g0 ! eat SFSR -LEON_PI(lda [%g0] ASI_LEON_MMUREGS, %glob_tmp) ! read MMU control -SUN_PI_(lda [%g0] ASI_M_MMUREGS, %glob_tmp) ! read MMU control + lda [%g0] ASI_LEON_MMUREGS, %glob_tmp ! read MMU control or %glob_tmp, 0x2, %glob_tmp ! or in no_fault bit -LEON_PI(sta %glob_tmp, [%g0] ASI_LEON_MMUREGS) ! set it -SUN_PI_(sta %glob_tmp, [%g0] ASI_M_MMUREGS) ! set it + sta %glob_tmp, [%g0] ASI_LEON_MMUREGS ! set it /* Dump the registers and cross fingers. */ STORE_WINDOW(sp) /* Clear the no_fault bit and check the status. */ andn %glob_tmp, 0x2, %glob_tmp -LEON_PI(sta %glob_tmp, [%g0] ASI_LEON_MMUREGS) -SUN_PI_(sta %glob_tmp, [%g0] ASI_M_MMUREGS) + sta %glob_tmp, [%g0] ASI_LEON_MMUREGS mov AC_M_SFAR, %glob_tmp -LEON_PI(lda [%glob_tmp] ASI_LEON_MMUREGS, %g0) -SUN_PI_(lda [%glob_tmp] ASI_M_MMUREGS, %g0) + lda [%glob_tmp] ASI_LEON_MMUREGS, %g0 mov AC_M_SFSR, %glob_tmp -LEON_PI(lda [%glob_tmp] ASI_LEON_MMUREGS, %glob_tmp) -SUN_PI_(lda [%glob_tmp] ASI_M_MMUREGS, %glob_tmp) + lda [%glob_tmp] ASI_LEON_MMUREGS, %glob_tmp andcc %glob_tmp, 0x2, %g0 ! did we fault? be,a spwin_finish_up + 0x4 ! cool beans, success restore %g0, %g0, %g0
arch/sparc/kernel/wuf.S +7 -14
@@ -255,19 +255,16 @@ srmmu_fwin_stackchk: mov AC_M_SFSR, %l4 cmp %l5, %sp bleu fwin_user_stack_is_bolixed -LEON_PI( lda [%l4] ASI_LEON_MMUREGS, %g0) ! clear fault status -SUN_PI_( lda [%l4] ASI_M_MMUREGS, %g0) ! clear fault status + lda [%l4] ASI_LEON_MMUREGS, %g0 ! clear fault status /* The technique is, turn off faults on this processor, * just let the load rip, then check the sfsr to see if * a fault did occur. Then we turn on fault traps again * and branch conditionally based upon what happened. */ -LEON_PI(lda [%g0] ASI_LEON_MMUREGS, %l5) ! read mmu-ctrl reg -SUN_PI_(lda [%g0] ASI_M_MMUREGS, %l5) ! read mmu-ctrl reg + lda [%g0] ASI_LEON_MMUREGS, %l5 ! read mmu-ctrl reg or %l5, 0x2, %l5 ! turn on no-fault bit -LEON_PI(sta %l5, [%g0] ASI_LEON_MMUREGS) ! store it -SUN_PI_(sta %l5, [%g0] ASI_M_MMUREGS) ! store it + sta %l5, [%g0] ASI_LEON_MMUREGS ! store it /* Cross fingers and go for it. */ LOAD_WINDOW(sp)
@@ -279,19 +276,15 @@ SUN_PI_(sta %l5, [%g0] ASI_M_MMUREGS) ! store it /* LOCATION: Window 'T' */ -LEON_PI(lda [%g0] ASI_LEON_MMUREGS, %twin_tmp1) ! load mmu-ctrl again -SUN_PI_(lda [%g0] ASI_M_MMUREGS, %twin_tmp1) ! load mmu-ctrl again + lda [%g0] ASI_LEON_MMUREGS, %twin_tmp1 ! load mmu-ctrl again andn %twin_tmp1, 0x2, %twin_tmp1 ! clear no-fault bit -LEON_PI(sta %twin_tmp1, [%g0] ASI_LEON_MMUREGS) ! store it -SUN_PI_(sta %twin_tmp1, [%g0] ASI_M_MMUREGS) ! store it + sta %twin_tmp1, [%g0] ASI_LEON_MMUREGS ! store it mov AC_M_SFAR, %twin_tmp2 -LEON_PI(lda [%twin_tmp2] ASI_LEON_MMUREGS, %g0) ! read fault address -SUN_PI_(lda [%twin_tmp2] ASI_M_MMUREGS, %g0) ! read fault address + lda [%twin_tmp2] ASI_LEON_MMUREGS, %g0 ! read fault address mov AC_M_SFSR, %twin_tmp2 -LEON_PI(lda [%twin_tmp2] ASI_LEON_MMUREGS, %twin_tmp2) ! read fault status -SUN_PI_(lda [%twin_tmp2] ASI_M_MMUREGS, %twin_tmp2) ! read fault status + lda [%twin_tmp2] ASI_LEON_MMUREGS, %twin_tmp2 ! read fault status andcc %twin_tmp2, 0x2, %g0 ! did fault occur? bne 1f ! yep, cleanup
arch/sparc/mm/Makefile +0 -1
@@ -8,7 +8,6 @@ obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o obj-y += fault_$(BITS).o obj-y += init_$(BITS).o obj-$(CONFIG_SPARC32) += srmmu.o iommu.o io-unit.o -obj-$(CONFIG_SPARC32) += srmmu_access.o obj-$(CONFIG_SPARC32) += leon_mm.o # Only used by sparc64
arch/sparc/mm/srmmu_access.S deleted +0 -83
83 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 19/28 sparc32: Drop support for 7 register windows
In reply to Sam RavnborgSome older SPARC CPUs had support for only 7 register windows. To support this run-time patching was used.
LEON demand 8 register windows for use with Linux so there is no need to support the 7 window configuration.
The complexity of the assembler code is reduced when dropping the run-time patching, thus increasing the maintainability.
--- arch/sparc/include/asm/switch_to_32.h | 1 - arch/sparc/kernel/entry.S | 28 ++++----------- arch/sparc/kernel/etrap_32.S | 35 +++++-------------- arch/sparc/kernel/head_32.S | 65 ----------------------------------- arch/sparc/kernel/rtrap_32.S | 55 +++++++++++++---------------- arch/sparc/kernel/wof.S | 43 ++++++++--------------- arch/sparc/kernel/wuf.S | 20 +++-------- 7 files changed, 57 insertions(+), 190 deletions(-)
arch/sparc/include/asm/switch_to_32.h +0 -1
@@ -37,7 +37,6 @@ extern struct thread_info *current_set[NR_CPUS];#define prepare_arch_switch (next) do { \ __asm__ __volatile__( \ - ".globl\tflush_patch_switch\nflush_patch_switch:\n\t" \ "save %sp, -0x40, %sp; save %sp, -0x40, %sp; save %sp, -0x40, %sp\n\t" \ "save %sp, -0x40, %sp; save %sp, -0x40, %sp; save %sp, -0x40, %sp\n\t" \ "save %sp, -0x40, %sp\n\t" \
arch/sparc/kernel/entry.S +6 -22
@@ -384,11 +384,8 @@ do_flush_windows: RESTORE_ALL - .globl flush_patch_one - /* We get these for debugging routines using __builtin_return_address() */ dfw_kernel: -flush_patch_one: FLUSH_ALL_KERNEL_WINDOWS /* Advance over the trap instruction. */
@@ -558,10 +555,9 @@ sys_rt_sigreturn: * XXX code just like on sparc64... -DaveM */ .align 4 - .globl sys_fork, flush_patch_two + .globl sys_fork sys_fork: mov %o7, %l5 -flush_patch_two: FLUSH_ALL_KERNEL_WINDOWS; ld [%curptr + TI_TASK], %o4 rd %psr, %g4
@@ -574,10 +570,9 @@ flush_patch_two: mov %l5, %o7 /* Whee, kernel threads! */ - .globl sys_clone, flush_patch_three + .globl sys_clone sys_clone: mov %o7, %l5 -flush_patch_three: FLUSH_ALL_KERNEL_WINDOWS; ld [%curptr + TI_TASK], %o4 rd %psr, %g4
@@ -590,9 +585,8 @@ flush_patch_three: mov %l5, %o7 /* Whee, real vfork! */ - .globl sys_vfork, flush_patch_four + .globl sys_vfork sys_vfork: -flush_patch_four: FLUSH_ALL_KERNEL_WINDOWS; ld [%curptr + TI_TASK], %o4 rd %psr, %g4
@@ -909,17 +903,7 @@ breakpoint_trap: #endif .align 4 - .globl flush_patch_exception -flush_patch_exception: - FLUSH_ALL_KERNEL_WINDOWS; - ldd [%o0], %o6 - jmpl %o7 + 0xc, %g0 ! see asm-sparc/processor.h - mov 1, %g1 ! signal EFAULT condition - - .align 4 - .globl kill_user_windows, kuw_patch1_7win - .globl kuw_patch1 -kuw_patch1_7win: sll %o3, 6, %o3 + .globl kill_user_windows /* No matter how much overhead this routine has in the worst * case scenario, it is several times better than taking the
@@ -939,11 +923,11 @@ kill_user_windows: be 4f ! yep, we are done rd %wim, %o3 ! get current wim srl %o3, 1, %o4 ! simulate a save -kuw_patch1: +kuw_next: sll %o3, 7, %o3 ! compute next wim or %o4, %o3, %o3 ! result andncc %o0, %o3, %o0 ! clean this bit in umask - bne kuw_patch1 ! not done yet + bne kuw_next ! not done yet srl %o3, 1, %o4 ! begin another save simulation wr %o3, 0x0, %wim ! set the new wim st %g0, [%g6 + TI_UWINMASK] ! clear uwinmask
arch/sparc/kernel/etrap_32.S +8 -27
@@ -30,18 +30,6 @@ .text .align 4 - /* SEVEN WINDOW PATCH INSTRUCTIONS */ - .globl tsetup_7win_patch1, tsetup_7win_patch2 - .globl tsetup_7win_patch3, tsetup_7win_patch4 - .globl tsetup_7win_patch5, tsetup_7win_patch6 -tsetup_7win_patch1: sll %t_wim, 0x6, %t_wim -tsetup_7win_patch2: and %g2, 0x7f, %g2 -tsetup_7win_patch3: and %g2, 0x7f, %g2 -tsetup_7win_patch4: and %g1, 0x7f, %g1 -tsetup_7win_patch5: sll %t_wim, 0x6, %t_wim -tsetup_7win_patch6: and %g2, 0x7f, %g2 - /* END OF PATCH INSTRUCTIONS */ - /* At trap time, interrupts and all generic traps do the * following: *
@@ -72,9 +60,7 @@ tsetup_7win_patch6: and %g2, 0x7f, %g2 * trap pc and npc, and %l3 contains the trap time %wim. */ - .globl trap_setup, tsetup_patch1, tsetup_patch2 - .globl tsetup_patch3, tsetup_patch4 - .globl tsetup_patch5, tsetup_patch6 + .globl trap_setup trap_setup: /* Calculate mask of trap window. See if from user * or kernel and branch conditionally.
@@ -109,11 +95,10 @@ trap_setup_kernel_spill: * %wim and go. */ srl %t_wim, 0x1, %g2 ! begin computation of new %wim -tsetup_patch1: - sll %t_wim, 0x7, %t_wim ! patched on 7 window Sparcs + + sll %t_wim, 0x7, %t_wim or %t_wim, %g2, %g2 -tsetup_patch2: - and %g2, 0xff, %g2 ! patched on 7 window Sparcs + and %g2, 0xff, %g2 save %g0, %g0, %g0
@@ -185,8 +170,7 @@ trap_setup_from_user: sub %g2, 0x1, %g2 1: andn %g2, %t_twinmask, %g2 -tsetup_patch3: - and %g2, 0xff, %g2 ! patched on 7win Sparcs + and %g2, 0xff, %g2 st %g2, [%curptr + TI_UWINMASK] ! store new umask jmpl %t_retpc + 0x8, %g0 ! return to caller
@@ -199,14 +183,11 @@ trap_setup_user_spill: * is in %g1 upon entry to here. */ -tsetup_patch4: - and %g1, 0xff, %g1 ! patched on 7win Sparcs, mask + and %g1, 0xff, %g1 srl %t_wim, 0x1, %g2 ! compute new %wim -tsetup_patch5: - sll %t_wim, 0x7, %t_wim ! patched on 7win Sparcs + sll %t_wim, 0x7, %t_wim or %t_wim, %g2, %g2 ! %g2 is new %wim -tsetup_patch6: - and %g2, 0xff, %g2 ! patched on 7win Sparcs + and %g2, 0xff, %g2 andn %g1, %g2, %g1 ! clear this bit in %g1 st %g1, [%curptr + TI_UWINMASK]
arch/sparc/kernel/head_32.S +0 -65
71 lines not on this page · raw message
arch/sparc/kernel/rtrap_32.S +23 -32
75 lines not on this page · raw message
arch/sparc/kernel/wof.S +15 -28
67 lines not on this page · raw message
arch/sparc/kernel/wuf.S +5 -15
@@ -68,27 +68,17 @@ * are done and return from trap if successful */ - /* BEGINNING OF PATCH INSTRUCTIONS */ - - /* On 7-window Sparc the boot code patches fnwin_patch1 - * with the following instruction. - */ - .globl fnwin_patch1_7win, fnwin_patch2_7win -fnwin_patch1_7win: srl %t_wim, 6, %twin_tmp2 -fnwin_patch2_7win: and %twin_tmp1, 0x7f, %twin_tmp1 - /* END OF PATCH INSTRUCTIONS */ - - .globl fill_window_entry, fnwin_patch1, fnwin_patch2 + .globl fill_window_entry fill_window_entry: /* LOCATION: Window 'T' */ /* Compute what the new %wim is going to be if we retrieve * the proper window off of the stack. */ - sll %t_wim, 1, %twin_tmp1 -fnwin_patch1: srl %t_wim, 7, %twin_tmp2 - or %twin_tmp1, %twin_tmp2, %twin_tmp1 -fnwin_patch2: and %twin_tmp1, 0xff, %twin_tmp1 + sll %t_wim, 1, %twin_tmp1 + srl %t_wim, 7, %twin_tmp2 + or %twin_tmp1, %twin_tmp2, %twin_tmp1 + and %twin_tmp1, 0xff, %twin_tmp1 wr %twin_tmp1, 0x0, %wim /* Make window 'I' invalid */
Signature · 1 line
2.34.1
PATCH v2 20/28 sparc32: Drop additional sun4d bits
In reply to Sam RavnborgDrop sun4d specific support. Not used by LEON.
--- arch/sparc/include/asm/io-unit.h | 59 -------- arch/sparc/include/asm/obio.h | 226 ------------------------------- arch/sparc/include/asm/sbi.h | 116 ---------------- arch/sparc/kernel/entry.S | 1 - arch/sparc/kernel/ioport.c | 1 - arch/sparc/mm/Makefile | 2 +- arch/sparc/mm/io-unit.c | 283 --------------------------------------- arch/sparc/mm/srmmu.c | 1 - 8 files changed, 1 insertion(+), 688 deletions(-)
arch/sparc/include/asm/io-unit.h deleted +0 -59
@@ -1,59 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* io-unit.h: Definitions for the sun4d IO-UNIT. -* -* Copyright (C) 1997,1998 Jakub Jelinek ([email protected]) -*/ -#ifndef _SPARC_IO_UNIT_H -#define _SPARC_IO_UNIT_H - -#include <linux/spinlock.h> -#include <linux/pgtable.h> -#include <asm/page.h> - -/* The io-unit handles all virtual to physical address translations -* that occur between the SBUS and physical memory. Access by -* the cpu to IO registers and similar go over the xdbus so are -* translated by the on chip SRMMU. The io-unit and the srmmu do -* not need to have the same translations at all, in fact most -* of the time the translations they handle are a disjunct set. -* Basically the io-unit handles all dvma sbus activity. -*/ - -/* AIEEE, unlike the nice sun4m, these monsters have -fixed DMA range 64M */ - -#define IOUNIT_DMA_BASE 0xfc000000/* TOP - 64M */ -#define IOUNIT_DMA_SIZE 0x04000000/* 64M */ -/* We use last 1M for sparc_dvma_malloc */ -#define IOUNIT_DVMA_SIZE 0x00100000/* 1M */ - -/* The format of an iopte in the external page tables */ -#define IOUPTE_PAGE 0xffffff00/* Physical page number (PA[35:12]) */ -#define IOUPTE_CACHE 0x00000080/* Cached (in Viking/MXCC) */ -/* XXX Jakub, find out how to program SBUS streaming cache on XDBUS/sun4d. -* XXX Actually, all you should need to do is find out where the registers -* XXX are and copy over the sparc64 implementation I wrote. There may be -* XXX some horrible hwbugs though, so be careful. -DaveM -*/ -#define IOUPTE_STREAM 0x00000040/* Translation can use streaming cache */ -#define IOUPTE_INTRA 0x00000008/* SBUS direct slot->slot transfer */ -#define IOUPTE_WRITE 0x00000004/* Writeable */ -#define IOUPTE_VALID 0x00000002/* IOPTE is valid */ -#define IOUPTE_PARITY 0x00000001/* Parity is checked during DVMA */ - -struct iounit_struct { -unsigned long bmap[(IOUNIT_DMA_SIZE >> (PAGE_SHIFT +3 )) /sizeof (unsigned long )]; -spinlock_t lock; -iopte_t __iomem *page_table; -unsigned long rotor[3 ]; -unsigned long limit[4 ]; -}; - -#define IOUNIT_BMAP1_START 0x00000000 -#define IOUNIT_BMAP1_END (IOUNIT_DMA_SIZE >> (PAGE_SHIFT + 1)) -#define IOUNIT_BMAP2_START IOUNIT_BMAP1_END -#define IOUNIT_BMAP2_END IOUNIT_BMAP2_START + (IOUNIT_DMA_SIZE >> (PAGE_SHIFT + 2)) -#define IOUNIT_BMAPM_START IOUNIT_BMAP2_END -#define IOUNIT_BMAPM_END ((IOUNIT_DMA_SIZE - IOUNIT_DVMA_SIZE) >> PAGE_SHIFT) - -#endif /* !(_SPARC_IO_UNIT_H) */
arch/sparc/include/asm/obio.h deleted +0 -226
226 lines not on this page · raw message
arch/sparc/include/asm/sbi.h deleted +0 -116
116 lines not on this page · raw message
arch/sparc/kernel/entry.S +0 -1
@@ -24,7 +24,6 @@ #include <asm/page.h> #include <asm/winmacro.h> #include <asm/signal.h> -#include <asm/obio.h> #include <asm/thread_info.h> #include <asm/param.h> #include <asm/unistd.h>
arch/sparc/kernel/ioport.c +0 -1
@@ -49,7 +49,6 @@#include <asm/pgalloc.h> #include <asm/dma.h> #include <asm/iommu.h> -#include <asm/io-unit.h> #include <asm/leon.h> static void __iomem *_sparc_ioremap (struct resource *res,u32 bus,u32 pa,int sz);
arch/sparc/mm/Makefile +1 -1
@@ -7,7 +7,7 @@ asflags-y := -ansi obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o obj-y += fault_$(BITS).o obj-y += init_$(BITS).o -obj-$(CONFIG_SPARC32) += srmmu.o iommu.o io-unit.o +obj-$(CONFIG_SPARC32) += srmmu.o iommu.o obj-$(CONFIG_SPARC32) += leon_mm.o # Only used by sparc64
arch/sparc/mm/io-unit.c deleted +0 -283
283 lines not on this page · raw message
arch/sparc/mm/srmmu.c +0 -1
@@ -26,7 +26,6 @@#include <asm/mmu_context.h> #include <asm/cacheflush.h> #include <asm/tlbflush.h> -#include <asm/io-unit.h> #include <asm/pgalloc.h> #include <asm/pgtable.h> #include <asm/bitext.h>
Signature · 1 line
2.34.1
PATCH v2 21/28 sparc32: Drop unused prom ranges support
In reply to Sam RavnborgDrop support for prom ranges - not used anymore.
--- arch/sparc/include/asm/oplib_32.h | 11 ---- arch/sparc/prom/Makefile | 1 - arch/sparc/prom/init_32.c | 2 - arch/sparc/prom/ranges.c | 114 -------------------------------------- 4 files changed, 128 deletions(-)
arch/sparc/include/asm/oplib_32.h +0 -11
@@ -163,17 +163,6 @@ int prom_setprop(phandle node, const char *prop_name, char *prop_value,phandle prom_inst2pkg (int ); -/* Dorking with Bus ranges... */ - -/* Apply promlib probes OBIO ranges to registers. */ -void prom_apply_obio_ranges (struct linux_prom_registers *obioregs,int nregs); - -/* Apply ranges of any prom node (and optionally parent node as well) to registers. */ -void prom_apply_generic_ranges (phandle node,phandle parent, -struct linux_prom_registers *sbusregs,int nregs); - -void prom_ranges_init (void ); -/* CPU probing helpers. */ int cpu_find_by_instance (int instance,phandle *prom_node,int *mid);int cpu_find_by_mid (int mid,phandle *prom_node);
arch/sparc/prom/Makefile +0 -1
@@ -9,7 +9,6 @@ lib-y += init_$(BITS).o lib-$(CONFIG_SPARC32) += memory.o lib-y += misc_$(BITS).o lib-$(CONFIG_SPARC32) += mp.o -lib-$(CONFIG_SPARC32) += ranges.o lib-y += console_$(BITS).o lib-y += printf.o lib-y += tree_$(BITS).o
arch/sparc/prom/init_32.c +0 -2
@@ -67,8 +67,6 @@ void __init prom_init(struct linux_romvec *rp)prom_meminit (); -prom_ranges_init (); -printk ("PROMLIB: Sun Boot Prom Version %d Revision %d\n" , romvec->pv_romvers, prom_rev);
arch/sparc/prom/ranges.c deleted +0 -114
114 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 22/28 sparc32: Drop unused sbus iommu support
In reply to Sam RavnborgLEON do not have sbus iommu support - drop it.
--- arch/sparc/include/asm/iommu.h | 2 - arch/sparc/include/asm/iommu_32.h | 122 ----------- arch/sparc/kernel/ioport.c | 1 - arch/sparc/mm/Makefile | 2 +- arch/sparc/mm/iommu.c | 420 -------------------------------------- arch/sparc/mm/mm_32.h | 3 - arch/sparc/mm/srmmu.c | 3 - 7 files changed, 1 insertion(+), 552 deletions(-)
arch/sparc/include/asm/iommu.h +0 -2
@@ -3,7 +3,5 @@#define ___ASM_SPARC_IOMMU_H#if defined(__sparc__) && defined(__arch64__)#include <asm/iommu_64.h> -#else -#include <asm/iommu_32.h> #endif #endif
arch/sparc/include/asm/iommu_32.h deleted +0 -122
122 lines not on this page · raw message
arch/sparc/kernel/ioport.c +0 -1
@@ -48,7 +48,6 @@#include <asm/page.h> #include <asm/pgalloc.h> #include <asm/dma.h> -#include <asm/iommu.h> #include <asm/leon.h> static void __iomem *_sparc_ioremap (struct resource *res,u32 bus,u32 pa,int sz);
arch/sparc/mm/Makefile +1 -1
@@ -7,7 +7,7 @@ asflags-y := -ansi obj-$(CONFIG_SPARC64) += ultra.o tlb.o tsb.o obj-y += fault_$(BITS).o obj-y += init_$(BITS).o -obj-$(CONFIG_SPARC32) += srmmu.o iommu.o +obj-$(CONFIG_SPARC32) += srmmu.o obj-$(CONFIG_SPARC32) += leon_mm.o # Only used by sparc64
arch/sparc/mm/iommu.c deleted +0 -420
420 lines not on this page · raw message
arch/sparc/mm/mm_32.h +0 -3
@@ -14,6 +14,3 @@ extern int flush_page_for_dma_global;extern void (*poke_srmmu)(void );void __init srmmu_paging_init (void ); - -/* iommu.c */ -void ld_mmu_iommu (void );
arch/sparc/mm/srmmu.c +0 -3
@@ -1023,10 +1023,7 @@ void __init load_mmu(void)/* It really is const after this point. */ sparc32_cachetlb_ops = (const struct sparc32_cachetlb_ops *) &smp_cachetlb_ops; -#endif -ld_mmu_iommu (); -#ifdef CONFIG_SMP leon_init_smp ();#endif }
Signature · 1 line
2.34.1
PATCH v2 23/28 sparc32: Drop sun4m irq support
In reply to Sam RavnborgDrop all code used to support sun4m irqs.
Update entry.S to call the leon_nmi function.
--- arch/sparc/kernel/Makefile | 1 - arch/sparc/kernel/entry.S | 29 ++--- arch/sparc/kernel/irq.h | 46 +------- arch/sparc/kernel/irq_32.c | 6 +- arch/sparc/kernel/kernel.h | 4 - arch/sparc/kernel/leon_kernel.c | 10 +- arch/sparc/kernel/sun4m_irq.c | 238 ---------------------------------------- 7 files changed, 23 insertions(+), 311 deletions(-)
arch/sparc/kernel/Makefile +0 -1
@@ -28,7 +28,6 @@ obj-y += traps_$(BITS).o # IRQ obj-y += irq_$(BITS).o -obj-$(CONFIG_SPARC32) += sun4m_irq.o obj-y += process_$(BITS).o obj-y += process.o
arch/sparc/kernel/entry.S +7 -22
@@ -427,36 +427,21 @@ setcc_trap_handler: jmp %l2 ! advance over trap instruction rett %l2 + 0x4 ! like this... -sun4m_nmi_error: +nmi_error: /* NMI async memory error handling. */ - sethi %hi(0x80000000), %l4 - sethi %hi(sun4m_irq_global), %o5 - ld [%o5 + %lo(sun4m_irq_global)], %l5 - st %l4, [%l5 + 0x0c] ! sun4m_irq_global->mask_set=0x80000000 - WRITE_PAUSE - ld [%l5 + 0x00], %g0 ! sun4m_irq_global->pending - WRITE_PAUSE +#ifndef CONFIG_SMP + .align 4 + .globl linux_trap_ipi15_leon +linux_trap_ipi15_leon: + SAVE_ALL or %l0, PSR_PIL, %l4 wr %l4, 0x0, %psr WRITE_PAUSE wr %l4, PSR_ET, %psr WRITE_PAUSE - call sun4m_nmi + call leon_nmi nop - st %l4, [%l5 + 0x08] ! sun4m_irq_global->mask_clear=0x80000000 - WRITE_PAUSE - ld [%l5 + 0x00], %g0 ! sun4m_irq_global->pending - WRITE_PAUSE RESTORE_ALL - -#ifndef CONFIG_SMP - .align 4 - .globl linux_trap_ipi15_leon -linux_trap_ipi15_leon: - SAVE_ALL - - ba sun4m_nmi_error - nop #endif /* CONFIG_SMP */ .align 4
arch/sparc/kernel/irq.h +4 -42
65 lines not on this page · raw message
arch/sparc/kernel/irq_32.c +3 -3
@@ -111,7 +111,7 @@ static struct irq_bucket irq_table[NR_IRQS];static DEFINE_SPINLOCK (irq_table_lock);/* Map between the irq identifier used in hw to the irq_bucket. */ -struct irq_bucket *irq_map[SUN4D_MAX_IRQ ]; +struct irq_bucket *irq_map[MAX_IRQ ];/* Protect access to irq_map */ static DEFINE_SPINLOCK (irq_map_lock);
@@ -162,7 +162,7 @@ void irq_link(unsigned int irq) p = &irq_table[irq]; pil = p->pil; -BUG_ON (pil >=SUN4D_MAX_IRQ ); +BUG_ON (pil >=MAX_IRQ ); p->next = irq_map[pil]; irq_map[pil] = p;
@@ -179,7 +179,7 @@ void irq_unlink(unsigned int irq)spin_lock_irqsave (&irq_map_lock, flags); p = &irq_table[irq]; -BUG_ON (p->pil >=SUN4D_MAX_IRQ ); +BUG_ON (p->pil >=MAX_IRQ ); pnext = &irq_map[p->pil];while (*pnext != p) pnext = &(*pnext)->next;
arch/sparc/kernel/kernel.h +0 -4
@@ -92,10 +92,6 @@ extern spinlock_t irq_action_lock;void unexpected_irq (int irq,void *dev_id,struct pt_regs * regs); -/* sun4m_irq.c */ -void sun4m_unmask_profile_irq (void ); -void sun4m_clear_profile_irq (int cpu); -/* leon_smp.c */ void leon_cpu_pre_starting (void *arg);void leon_cpu_pre_online (void *arg);
arch/sparc/kernel/leon_kernel.c +9 -1
@@ -9,6 +9,7 @@#include <linux/mutex.h> #include <linux/of.h> #include <linux/interrupt.h> +#include <linux/sched/debug.h> #include <linux/clocksource.h> #include <linux/clockchips.h>
@@ -269,8 +270,15 @@ u32 leon_cycles_offset(void)return off; } -#ifdef CONFIG_SMP +/* NMI interrupt (15) */ +void leon_nmi (struct pt_regs *regs) +{ +printk (KERN_ERR "Aieee: NMI received!\n" ); +show_regs (regs); +prom_halt (); +} +#ifdef CONFIG_SMP /* smp clockevent irq */ static irqreturn_t leon_percpu_timer_ce_interrupt (int irq,void *unused) {
arch/sparc/kernel/sun4m_irq.c deleted +0 -238
238 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 24/28 sparc32: Drop unused trampoline code
In reply to Sam RavnborgDrop the sun4m and sun4d code from trampoline_32
--- arch/sparc/kernel/kernel.h | 3 +- arch/sparc/kernel/trampoline_32.S | 127 +------------------------------------- 2 files changed, 3 insertions(+), 127 deletions(-)
arch/sparc/kernel/kernel.h +1 -2
@@ -112,8 +112,7 @@ extern unsigned int real_irq_entry[];extern unsigned int smp4d_ticker[];/* trampoline_32.S */ -extern unsigned long sun4m_cpu_startup; -extern unsigned long sun4d_cpu_startup; +void leon_smp_cpu_startup (int boot_cpu);/* signal_32.c */ asmlinkage void do_sigreturn(struct pt_regs *regs);
arch/sparc/kernel/trampoline_32.S +2 -125
142 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 25/28 sparc32: Drop config SPARC_LEON
In reply to Sam RavnborgThe only supported sparc32 CPU is LEON, so there is no need for a config option to select it.
--- arch/sparc/Kconfig | 27 +++++++++------------------ arch/sparc/configs/sparc32_defconfig | 1 - drivers/usb/host/Kconfig | 2 +- drivers/usb/host/ehci-hcd.c | 4 ++-- drivers/usb/host/uhci-hcd.c | 2 +- 5 files changed, 13 insertions(+), 23 deletions(-)
arch/sparc/Kconfig +9 -18
@@ -9,6 +9,10 @@ config 64BIT Say yes to build a 64-bit kernel - formerly known as sparc64 Say no to build a 32-bit kernel - formerly known as sparc + The 32-bit kernel target the synthesizable LEON SPARC processor. + LEON is a part of the GRLIB collection of IP cores that are + distributed under GPL. GRLIB can be downloaded from www.gaisler.com. + You can download a sparc-linux cross-compilation toolchain at www.gaisler.com. config SPARC bool
@@ -62,6 +66,10 @@ config SPARC32 select HAVE_UID16 select LOCK_MM_AND_FIND_VMA select OLD_SIGACTION + select USB_EHCI_BIG_ENDIAN_MMIO + select USB_EHCI_BIG_ENDIAN_DESC + select USB_UHCI_BIG_ENDIAN_MMIO + select USB_UHCI_BIG_ENDIAN_DESC select ZONE_DMA config SPARC64
@@ -344,22 +352,6 @@ config SERIAL_CONSOLE If unsure, say N. -config SPARC_LEON - bool "Sparc Leon processor family" - depends on SPARC32 - select USB_EHCI_BIG_ENDIAN_MMIO - select USB_EHCI_BIG_ENDIAN_DESC - select USB_UHCI_BIG_ENDIAN_MMIO - select USB_UHCI_BIG_ENDIAN_DESC - help - If you say Y here if you are running on a SPARC-LEON processor. - The LEON processor is a synthesizable VHDL model of the - SPARC-v8 standard. LEON is part of the GRLIB collection of - IP cores that are distributed under GPL. GRLIB can be downloaded - from www.gaisler.com. You can download a sparc-linux cross-compilation - toolchain at www.gaisler.com. - -if SPARC_LEON menu "U-Boot options" config UBOOT_LOAD_ADDR
@@ -390,7 +382,6 @@ config UBOOT_ENTRY_ADDR Kernel. endmenu -endif endmenu
@@ -412,7 +403,7 @@ config SUN_LDOMS config LEON_PCI bool - depends on PCI && SPARC_LEON + depends on PCI && SPARC32 default y config SPARC_GRPCI1
arch/sparc/configs/sparc32_defconfig +0 -1
@@ -10,7 +10,6 @@ CONFIG_BLK_DEV_INITRD=y # CONFIG_RD_ZSTD is not set CONFIG_SMP=y CONFIG_HZ_100=y -CONFIG_SPARC_LEON=y CONFIG_SUN_OPENPROMFS=y CONFIG_SUN_OPENPROMIO=y # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
drivers/usb/host/Kconfig +1 -1
@@ -595,7 +595,7 @@ config USB_UHCI_HCD config USB_UHCI_SUPPORT_NON_PCI_HC bool - default y if (SPARC_LEON || USB_UHCI_PLATFORM) + default y if (SPARC32 || USB_UHCI_PLATFORM) config USB_UHCI_PLATFORM bool
drivers/usb/host/ehci-hcd.c +2 -2
@@ -1329,7 +1329,7 @@ MODULE_LICENSE ("GPL");#include "ehci-xilinx-of.c" #endif -#ifdef CONFIG_SPARC_LEON +#ifdef CONFIG_SPARC32 #include "ehci-grlib.c" #endif
@@ -1343,7 +1343,7 @@ static struct platform_driver * const platform_drivers[] = {#ifdef CONFIG_XPS_USB_HCD_XILINX &ehci_hcd_xilinx_of_driver,#endif -#ifdef CONFIG_SPARC_LEON +#ifdef CONFIG_SPARC32 &ehci_grlib_driver,#endif };
drivers/usb/host/uhci-hcd.c +1 -1
@@ -846,7 +846,7 @@ static const char hcd_name[] = "uhci_hcd";#define PCI_DRIVER uhci_pci_driver#endif -#ifdef CONFIG_SPARC_LEON +#ifdef CONFIG_SPARC32 #include "uhci-grlib.c" #define PLATFORM_DRIVER uhci_grlib_driver#endif
Signature · 1 line
2.34.1
PATCH v2 26/28 sparc32: Drop sbus support
In reply to Sam RavnborgLEON do not have an sbus - so drop support for that for sparc32. Fix a few Kconfig expressions to use CONFIG_SBUS rather than SPARC as only SPARC64 has an sbus now.
--- arch/sparc/Kconfig | 4 +- arch/sparc/include/asm/fb.h | 8 ++-- arch/sparc/include/asm/io_32.h | 83 ---------------------------------------- arch/sparc/kernel/ioport.c | 49 ------------------------ arch/sparc/kernel/of_device_32.c | 14 ------- drivers/video/fbdev/Kconfig | 2 +- sound/sparc/Kconfig | 1 + 7 files changed, 9 insertions(+), 152 deletions(-)
arch/sparc/Kconfig +2 -2
@@ -388,11 +388,11 @@ endmenu menu "Bus options (PCI etc.)" config SBUS bool - default y + default y if SPARC64 config SBUSCHAR bool - default y + default y if SPARC64 config SUN_LDOMS bool "Sun Logical Domains support"
arch/sparc/include/asm/fb.h +5 -3
@@ -8,6 +8,9 @@struct fb_info ; +int fb_is_primary_device (struct fb_info *info); +#define fb_is_primary_device fb_is_primary_device +#ifdef CONFIG_SPARC32 static inline pgprot_t pgprot_framebuffer(pgprot_t prot, unsigned long vm_start, unsigned long vm_end,
@@ -18,9 +21,7 @@ static inline pgprot_t pgprot_framebuffer(pgprot_t prot,#define pgprot_framebuffer pgprot_framebuffer#endif -int fb_is_primary_device (struct fb_info *info); -#define fb_is_primary_device fb_is_primary_device - +#ifdef CONFIG_SPARC64 static inline void fb_memcpy_fromio (void *to,const volatile void __iomem *from,size_t n) {sbus_memcpy_fromio (to, from, n);
@@ -38,6 +39,7 @@ static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n) sbus_memset_io(addr, c, n); }#define fb_memset fb_memset_io +#endif #include <asm-generic/fb.h>
arch/sparc/include/asm/io_32.h +0 -83
95 lines not on this page · raw message
arch/sparc/kernel/ioport.c +0 -49
64 lines not on this page · raw message
arch/sparc/kernel/of_device_32.c +0 -14
@@ -96,11 +96,6 @@ static unsigned long of_bus_pci_get_flags(const u32 *addr, unsigned long flags)return flags; } -static unsigned long of_bus_sbus_get_flags (const u32 *addr,unsigned long flags) -{ -return IORESOURCE_MEM ; -} -/* * AMBAPP bus specific translator */
@@ -145,15 +140,6 @@ static struct of_bus of_busses[] = { .map = of_bus_pci_map, .get_flags = of_bus_pci_get_flags, }, -/* SBUS */ - { - .name = "sbus", - .addr_prop_name = "reg", - .match = of_bus_sbus_match, - .count_cells = of_bus_sbus_count_cells, - .map = of_bus_default_map, - .get_flags = of_bus_sbus_get_flags, - },/* AMBA */ { .name = "ambapp",
drivers/video/fbdev/Kconfig +1 -1
@@ -492,7 +492,7 @@ config FB_GBE_MEM config FB_SBUS bool "SBUS and UPA framebuffers" - depends on (FB = y) && SPARC + depends on (FB = y) && SBUS help Say Y if you want support for SBUS or UPA based frame buffer device.
sound/sparc/Kconfig +1 -0
@@ -4,6 +4,7 @@ menuconfig SND_SPARC bool "Sparc sound devices" depends on SPARC + depends on SBUS default y help Support for sound devices specific to Sun SPARC architectures.
Signature · 1 line
2.34.1
PATCH v2 27/28 sbus: char: Drop now unused uctrl driver
In reply to Sam RavnborgThe uctrl driver is only relevant for the Sparcbook 3 machine, and with sun4m support removed this driver is no logner relevant.
--- drivers/sbus/char/Kconfig | 8 - drivers/sbus/char/Makefile | 1 - drivers/sbus/char/uctrl.c | 434 --------------------------------------------- 3 files changed, 443 deletions(-)
drivers/sbus/char/Kconfig +0 -8
@@ -21,14 +21,6 @@ config OBP_FLASH The OpenBoot PROM on Ultra systems is flashable. If you want to be able to upgrade the OBP firmware, say Y here. -config TADPOLE_TS102_UCTRL - tristate "Tadpole TS102 Microcontroller support" - help - Say Y here to directly support the TS102 Microcontroller interface - on the Tadpole Sparcbook 3. This device handles power-management - events, and can also notice the attachment/detachment of external - monitors and mice. - config BBC_I2C tristate "UltraSPARC-III bootbus i2c controller driver" depends on PCI && SPARC64
drivers/sbus/char/Makefile +0 -1
@@ -14,6 +14,5 @@ obj-$(CONFIG_ENVCTRL) += envctrl.o obj-$(CONFIG_DISPLAY7SEG) += display7seg.o obj-$(CONFIG_OBP_FLASH) += flash.o obj-$(CONFIG_SUN_OPENPROMIO) += openprom.o -obj-$(CONFIG_TADPOLE_TS102_UCTRL) += uctrl.o obj-$(CONFIG_BBC_I2C) += bbc.o obj-$(CONFIG_ORACLE_DAX) += oradax.o
drivers/sbus/char/uctrl.c deleted +0 -434
434 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 28/28 fbdev/p9100: Drop now unused driver p9100
In reply to Sam RavnborgThe p9100 driver is only relevant for the Sparcbook 3 machine, and with sun4m support removed this driver is no longer relevant.
--- drivers/video/fbdev/Kconfig | 8 - drivers/video/fbdev/Makefile | 1 - drivers/video/fbdev/p9100.c | 372 ------------------------------------------- 3 files changed, 381 deletions(-)
drivers/video/fbdev/Kconfig +0 -8
@@ -550,14 +550,6 @@ config FB_CG14 This is the frame buffer device driver for the CGfourteen frame buffer on Desktop SPARCsystems with the SX graphics option. -config FB_P9100 - bool "P9100 (Sparcbook 3 only) support" - depends on FB_SBUS - select FB_SBUS_HELPERS - help - This is the frame buffer device driver for the P9100 card - supported on Sparcbook 3 machines. - config FB_LEO bool "Leo (ZX) support" depends on FB_SBUS
drivers/video/fbdev/Makefile +0 -1
@@ -50,7 +50,6 @@ obj-$(CONFIG_FB_CG6) += cg6.o obj-$(CONFIG_FB_CG3) += cg3.o obj-$(CONFIG_FB_BW2) += bw2.o obj-$(CONFIG_FB_CG14) += cg14.o -obj-$(CONFIG_FB_P9100) += p9100.o obj-$(CONFIG_FB_TCX) += tcx.o obj-$(CONFIG_FB_LEO) += leo.o obj-$(CONFIG_FB_ACORN) += acornfb.o
drivers/video/fbdev/p9100.c deleted +0 -372
372 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v2 28/28] fbdev/p9100: Drop now unused driver p9100
Quoted 12 lines · On Sat, Mar 9, 2024, at 19:15, Sam Ravnborg via B4 Relay wrote:
From: Sam Ravnborg <[email protected]>
The p9100 driver is only relevant for the Sparcbook 3 machine, and with sun4m support removed this driver is no longer relevant.
Signed-off-by Sam Ravnborg <[email protected]>Acked-by Arnd Bergmann <[email protected]>Cc "David S. Miller" <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Andreas Larsson <[email protected]>Cc Helge Deller <[email protected]>
Quoted 5 lines
--- drivers/video/fbdev/Kconfig | 8 - drivers/video/fbdev/Makefile | 1 - drivers/video/fbdev/p9100.c | 372 ------------------------------------------- 3 files changed, 381 deletions(-)
I tried to figure out if there are other drivers in the same category and found the list at
https://everything2.com/title/Sun+graphics+cards
As far as I can tell, the only SBUS graphics that were shipped on sparc64 are FB_FFB and FB_CG6, so we could go further and remove BW2, CG3, TCX, CG14 and LEO as well.
No need to change anything here for the moment, dropping p9100 is already a step in the right direction.
Arnd
Re: [PATCH v2 28/28] fbdev/p9100: Drop now unused driver p9100
Hi Arnd.
Quoted 19 lines · Arnd Bergmann
Quoted 12 lines · On Sat, Mar 9, 2024, at 19:15, Sam Ravnborg via B4 Relay wrote:
From: Sam Ravnborg <[email protected]>
The p9100 driver is only relevant for the Sparcbook 3 machine, and with sun4m support removed this driver is no longer relevant.
Signed-off-by Sam Ravnborg <[email protected]>Acked-by Arnd Bergmann <[email protected]>Cc "David S. Miller" <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Andreas Larsson <[email protected]>Cc Helge Deller <[email protected]>Quoted 5 lines
--- drivers/video/fbdev/Kconfig | 8 - drivers/video/fbdev/Makefile | 1 - drivers/video/fbdev/p9100.c | 372 ------------------------------------------- 3 files changed, 381 deletions(-)
Quoted 8 lines
I tried to figure out if there are other drivers in the same category and found the list at
https://everything2.com/title/Sun+graphics+cardsAs far as I can tell, the only SBUS graphics that were shipped on sparc64 are
FB_FFBandFB_CG6, so we could go further and remove BW2, CG3, TCX, CG14 and LEO as well.
Looks like you are right, so we can drop more - good.
As you already wrote - let's get the current patch set processed first.
I did a quick hack on top of my current sparc32 patches. This is nice reduction of ~2700 lines and 5 fbdev drivers less to care about.
Sam
Hi Andreas,
Quoted 21 lines · On Sat, Mar 09, 2024 at 07:15:21PM +0100, Sam Ravnborg via B4 Relay wrote:
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.
Quoted 5 lines
Changes in v2:
- Rebased on top of Andreas' for-next branch
- Collected ack's
- Added patch to remove cpuid patching (Andreas)
- Run-time testing using qemu (Andreas, Mark Cave-Ayland)
Please let me know if you expect me to rebase this on for-next. I have not yet tried if there are merge conflicts but can take a look in a some days if required.
That is assuming you agree with the sunset of the sun platforms...
Sam
Andreas Larsson
maintainerQuoted 3 lines · Sam Ravnborg
Please let me know if you expect me to rebase this on for-next. I have not yet tried if there are merge conflicts but can take a look in a some days if required.
My local testing branch for this patchset rebased with trivial fixups, so no immediate rebase and resubmission is needed. I do run into some strange problems on SMP with this patchset plus your CAS patchset, that I do not get when I rebase the Linux patches from our kernel release that has my CAS patchset. With no CAS at all these things fails even worse, so do I need one or the other for these tests.
I will need to dig deeper into figuring out the problems seems to be due to something in any of your two patchsets in themselves or if it is something else. I do need some additional fixes from our kernel release for SMP to work properly, so it could also be that there is something with my combination of your patches and my patches adapted on top of yours.
There are also some needed fixes for LEON that relies upon code removed in this patchset. Maybe the best solution for that would be if I submit those and you then rebase upon them.
Quoted 1 line
That is assuming you agree with the sunset of the sun platforms...
I do agree with the idea in general, but being busy with other things I have had little time to dig into this lately.
Thanks,
Andreas
Hi Andreas.
Quoted 11 lines · Andreas Larsson
Quoted 3 lines · Sam Ravnborg
Please let me know if you expect me to rebase this on for-next. I have not yet tried if there are merge conflicts but can take a look in a some days if required.
My local testing branch for this patchset rebased with trivial fixups, so no immediate rebase and resubmission is needed. I do run into some strange problems on SMP with this patchset plus your CAS patchset, that I do not get when I rebase the Linux patches from our kernel release that has my CAS patchset. With no CAS at all these things fails even worse, so do I need one or the other for these tests.
:-(
Quoted 11 lines
I will need to dig deeper into figuring out the problems seems to be due to something in any of your two patchsets in themselves or if it is something else. I do need some additional fixes from our kernel release for SMP to work properly, so it could also be that there is something with my combination of your patches and my patches adapted on top of yours.
There are also some needed fixes for LEON that relies upon code removed in this patchset. Maybe the best solution for that would be if I submit those and you then rebase upon them.
If you can make LEON stable before starting the code removal that would be the best way forward. Then it should be easier to identify when the removal patches breaks things.
With all the surgery I had to do to remove stuff it would have been a big surprise if it just worked - so it goes as expected. qemu only verify so much - the real target (and SMP) is way better.
Quoted 4 lines
Quoted 1 line
That is assuming you agree with the sunset of the sun platforms...
I do agree with the idea in general, but being busy with other things I have had little time to dig into this lately.
If this round could be used to stabilize LEON and apply other more trivial stuff, then I am happy to rebase the "sunset" patchset sometimes after next -rc1.
I have accumulated a bit more on top of what I already posted, and I will include a few more patches in the next round.
In other words - take your time!
Sam
Hi everyone,
Quoted 8 lines · Sam Ravnborg
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.
I'd like to revisit this discussion. I recently got SILO and modern kernels working on legacy sun4m systems. I missed this discussion the last time around, but I am glad the series has not been merged.
The kernel patches are available here:
https://lore.kernel.org/sparclinux/[email protected]/T/#t
The SILO patches are available here:
https://github.com/linmag7/silo/tree/release
Code that is not tested or maintained will inevitably deteriorate over time. I hope we can keep sun4m/sun4d support in the mainline kernel. If the lack of testing and general maintenance was the main reason for proposing its removal, I would be happy to help with both.
I have plenty of old SPARC32 hardware with various CPU configurations available for testing, and I am willing to assist with maintaining the support in any way I can.
Regards,
Magnus
Hi Magnus.
Quoted 24 lines · Magnus Lindholm
Hi everyone,
Quoted 8 lines · Sam Ravnborg
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.
I'd like to revisit this discussion. I recently got SILO and modern kernels working on legacy sun4m systems. I missed this discussion the last time around, but I am glad the series has not been merged.
The kernel patches are available here:
https://lore.kernel.org/sparclinux/[email protected]/T/#t
The SILO patches are available here:
Quoted 8 lines
Code that is not tested or maintained will inevitably deteriorate over time. I hope we can keep sun4m/sun4d support in the mainline kernel. If the lack of testing and general maintenance was the main reason for proposing its removal, I would be happy to help with both.
I have plenty of old SPARC32 hardware with various CPU configurations available for testing, and I am willing to assist with maintaining the support in any way I can.
If there is a community that is interested in keeping sun 4m/4d alive then having it upstream is the right call.
But if this falls down to a single person doing this only for the sake of being able to boot Linux on HW that is not used in reality the right call is to cut it out.
I was in the "Keep sun 4m/4d" camp for a while, but felt we could do the sparc32 architecture a favour cutting out the support for the old HW. When I was active here, I had the ambition to move sparc32/LEON over to use DT files, and skip all prom features and I had something remotely booting, but then priorities changed and I stopped playing with this.
Note: I have not talked with anyone about moving sparc32/LEON to use DT files, so that idea could easily be rejected.
An open question is if we have more than one person interested to invest time in keeping sun 4m/4d alive?
Sam