Skip to contentSkip to conversation

ARM, timers: ebsa110 cleanup

PATCH In review Arnd Bergmann 5 participants 11 messages Oct 8, 2020 – Oct 18, 2020

Subsystems (8)
lore
Share & tools
lore
#0 lore raw

cover ARM, timers: ebsa110 cleanup

The ebsa110 platform is the last thing that uses CONFIG_ARCH_USES_GETTIMEOFFSET, and Russell has previously said that he thinks the platform can be retired now.

Removing it allows us clean up the timer code by throwing out all of the references to arch_gettimeoffset().

The am79c961a network driver can presumably also go, as no other platform references it.

I don't expect these to make it into the coming merge window, posting here as an RFC, and as a reference for the mildly related timer tick series.

Arnd

Arnd Bergmann (3):
ARM: remove ebsa110 platform
net: remove am79c961a driver
timekeeping: remove arch_gettimeoffset

 .../time/modern-timekeeping/arch-support.txt  |  33 -
 MAINTAINERS                                   |   8 -
 arch/arm/Kconfig                              |  24 +-
 arch/arm/Kconfig.debug                        |   6 +-
 arch/arm/Makefile                             |   8 -
 arch/arm/configs/ebsa110_defconfig            |  74 --
 arch/arm/kernel/Makefile                      |   6 +-
 arch/arm/mach-ebsa110/Makefile                |   8 -
 arch/arm/mach-ebsa110/Makefile.boot           |   5 -
 arch/arm/mach-ebsa110/core.c                  | 323 --------
 arch/arm/mach-ebsa110/core.h                  |  38 -
 .../mach-ebsa110/include/mach/entry-macro.S   |  33 -
 arch/arm/mach-ebsa110/include/mach/hardware.h |  21 -
 arch/arm/mach-ebsa110/include/mach/io.h       |  89 --
 arch/arm/mach-ebsa110/include/mach/irqs.h     |  17 -
 arch/arm/mach-ebsa110/include/mach/memory.h   |  22 -
 .../mach-ebsa110/include/mach/uncompress.h    |  41 -
 arch/arm/mach-ebsa110/io.c                    | 440 ----------
 arch/arm/mach-ebsa110/leds.c                  |  71 --
 drivers/Makefile                              |   2 -
 drivers/clocksource/Kconfig                   |   2 +-
 drivers/net/ethernet/amd/Kconfig              |  10 +-
 drivers/net/ethernet/amd/Makefile             |   1 -
 drivers/net/ethernet/amd/am79c961a.c          | 763 ------------------
 drivers/net/ethernet/amd/am79c961a.h          | 143 ----
 include/linux/time.h                          |  13 -
 kernel/time/Kconfig                           |   9 -
 kernel/time/clocksource.c                     |   8 -
 kernel/time/timekeeping.c                     |  25 +-
 kernel/trace/Kconfig                          |   2 -
 30 files changed, 9 insertions(+), 2236 deletions(-)
 delete mode 100644 Documentation/features/time/modern-timekeeping/arch-support.txt
 delete mode 100644 arch/arm/configs/ebsa110_defconfig
 delete mode 100644 arch/arm/mach-ebsa110/Makefile
 delete mode 100644 arch/arm/mach-ebsa110/Makefile.boot
 delete mode 100644 arch/arm/mach-ebsa110/core.c
 delete mode 100644 arch/arm/mach-ebsa110/core.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/entry-macro.S
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/io.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/memory.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-ebsa110/io.c
 delete mode 100644 arch/arm/mach-ebsa110/leds.c
 delete mode 100644 drivers/net/ethernet/amd/am79c961a.c
 delete mode 100644 drivers/net/ethernet/amd/am79c961a.h
Cc Russell King <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc John Stultz <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Linus Walleij <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jakub Kicinski <[email protected]>
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/3 ARM: remove ebsa110 platform

Russell said that he is no longer using this machine, and it seems that nobody else has in a long time, so it's time to say goodbye to it.

As this is the last platform using CONFIG_ARCH_USES_GETTIMEOFFSET, there are some follow-up patches to remove that as well.

---
 MAINTAINERS                                   |   8 -
 arch/arm/Kconfig                              |  24 +-
 arch/arm/Kconfig.debug                        |   6 +-
 arch/arm/Makefile                             |   8 -
 arch/arm/configs/ebsa110_defconfig            |  74 ---
 arch/arm/kernel/Makefile                      |   6 +-
 arch/arm/mach-ebsa110/Makefile                |   8 -
 arch/arm/mach-ebsa110/Makefile.boot           |   5 -
 arch/arm/mach-ebsa110/core.c                  | 323 -------------
 arch/arm/mach-ebsa110/core.h                  |  38 --
 .../mach-ebsa110/include/mach/entry-macro.S   |  33 --
 arch/arm/mach-ebsa110/include/mach/hardware.h |  21 -
 arch/arm/mach-ebsa110/include/mach/io.h       |  89 ----
 arch/arm/mach-ebsa110/include/mach/irqs.h     |  17 -
 arch/arm/mach-ebsa110/include/mach/memory.h   |  22 -
 .../mach-ebsa110/include/mach/uncompress.h    |  41 --
 arch/arm/mach-ebsa110/io.c                    | 440 ------------------
 arch/arm/mach-ebsa110/leds.c                  |  71 ---
 18 files changed, 6 insertions(+), 1228 deletions(-)
 delete mode 100644 arch/arm/configs/ebsa110_defconfig
 delete mode 100644 arch/arm/mach-ebsa110/Makefile
 delete mode 100644 arch/arm/mach-ebsa110/Makefile.boot
 delete mode 100644 arch/arm/mach-ebsa110/core.c
 delete mode 100644 arch/arm/mach-ebsa110/core.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/entry-macro.S
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/hardware.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/io.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/irqs.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/memory.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/uncompress.h
 delete mode 100644 arch/arm/mach-ebsa110/io.c
 delete mode 100644 arch/arm/mach-ebsa110/leds.c
MAINTAINERS +0 -8
index 0d0862b19ce5..6096b16cac12 100644
@@ -1809,14 +1809,6 @@ F:	drivers/firmware/turris-mox-rwtm.c
 F:	drivers/gpio/gpio-moxtet.c
 F:	include/linux/moxtet.h
 
-ARM/EBSA110 MACHINE SUPPORT
-M:	Russell King <[email protected]>
-L:	[email protected] (moderated for non-subscribers)
-S:	Maintained
-W:	http://www.armlinux.org.uk/
-F:	arch/arm/mach-ebsa110/
-F:	drivers/net/ethernet/amd/am79c961a.*
-
 ARM/ENERGY MICRO (SILICON LABS) EFM32 SUPPORT
 M:	Uwe Kleine-König <[email protected]>
 R:	Pengutronix Kernel Team <[email protected]>
arch/arm/Kconfig +3 -21
index e00d94b16658..a14266667bcd 100644
@@ -264,8 +264,7 @@ config PHYS_OFFSET
 	hex "Physical address of main memory" if MMU
 	depends on !ARM_PATCH_PHYS_VIRT
 	default DRAM_BASE if !MMU
-	default 0x00000000 if ARCH_EBSA110 || \
-			ARCH_FOOTBRIDGE || \
+	default 0x00000000 if ARCH_FOOTBRIDGE || \
 			ARCH_INTEGRATOR || \
 			ARCH_REALVIEW
 	default 0x10000000 if ARCH_OMAP1 || ARCH_RPC
@@ -341,20 +340,6 @@ config ARM_SINGLE_ARMV7M
 	select SPARSE_IRQ
 	select USE_OF
 
-config ARCH_EBSA110
-	bool "EBSA-110"
-	select ARCH_USES_GETTIMEOFFSET
-	select CPU_SA110
-	select ISA
-	select NEED_MACH_IO_H
-	select NEED_MACH_MEMORY_H
-	select NO_IOPORT_MAP
-	help
-	  This is an evaluation board for the StrongARM processor available
-	  from Digital. It has limited hardware on-board, including an
-	  Ethernet interface, two PCMCIA sockets, two serial ports and a
-	  parallel port.
-
 config ARCH_EP93XX
 	bool "EP93xx-based"
 	select ARCH_SPARSEMEM_ENABLE
@@ -1372,7 +1357,6 @@ config ARCH_NR_GPIO
 
 config HZ_FIXED
 	int
-	default 200 if ARCH_EBSA110
 	default 128 if SOC_AT91RM9200
 	default 0
 
@@ -1588,9 +1572,7 @@ config FORCE_MAX_ZONEORDER
 	  a value of 11 means that the largest free memory block is 2^10 pages.
 
 config ALIGNMENT_TRAP
-	bool
-	depends on CPU_CP15_MMU
-	default y if !ARCH_EBSA110
+	def_bool CPU_CP15_MMU
 	select HAVE_PROC_CPU if PROC_FS
 	help
 	  ARM processors cannot fetch/store information which is not
@@ -1799,7 +1781,7 @@ config CMDLINE
 	string "Default kernel command string"
 	default ""
 	help
-	  On some architectures (EBSA110 and CATS), there is currently no way
+	  On some architectures (e.g. CATS), there is currently no way
 	  for the boot loader to pass arguments to the kernel. For these
 	  architectures, you should supply some command-line options at build
 	  time by entering them here. As a minimum, you should specify the
arch/arm/Kconfig.debug +2 -4
index 80000a66a4e3..48e13a7c694b 100644
@@ -1610,7 +1610,7 @@ config DEBUG_UART_PL01X
 
 # Compatibility options for 8250
 config DEBUG_UART_8250
-	def_bool ARCH_EBSA110 || ARCH_IOP32X || ARCH_IXP4XX || ARCH_RPC
+	def_bool ARCH_IOP32X || ARCH_IXP4XX || ARCH_RPC
 
 config DEBUG_UART_PHYS
 	hex "Physical base address of debug UART"
@@ -1713,7 +1713,6 @@ config DEBUG_UART_PHYS
 	default 0xe8008000 if DEBUG_R7S72100_SCIF2 || DEBUG_R7S9210_SCIF2
 	default 0xe8009000 if DEBUG_R7S9210_SCIF4
 	default 0xf0000000 if DEBUG_DIGICOLOR_UA0
-	default 0xf0000be0 if ARCH_EBSA110
 	default 0xf1012000 if DEBUG_MVEBU_UART0_ALTERNATE
 	default 0xf1012100 if DEBUG_MVEBU_UART1_ALTERNATE
 	default 0xf7fc9000 if DEBUG_BERLIN_UART
@@ -1760,7 +1759,6 @@ config DEBUG_UART_VIRT
 	default 0xc8821000 if DEBUG_RV1108_UART1
 	default 0xc8912000 if DEBUG_RV1108_UART0
 	default 0xe0010fe0 if ARCH_RPC
-	default 0xf0000be0 if ARCH_EBSA110
 	default 0xf0010000 if DEBUG_ASM9260_UART
 	default 0xf0100000 if DEBUG_DIGICOLOR_UA0
 	default 0xf01fb000 if DEBUG_NOMADIK_UART
@@ -1896,7 +1894,7 @@ config DEBUG_UART_8250_PALMCHIP
 config DEBUG_UART_8250_FLOW_CONTROL
 	bool "Enable flow control for 8250 UART"
 	depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
-	default y if ARCH_EBSA110 || DEBUG_FOOTBRIDGE_COM1 || DEBUG_GEMINI || ARCH_RPC
+	default y if DEBUG_FOOTBRIDGE_COM1 || DEBUG_GEMINI || ARCH_RPC
 
 config DEBUG_UNCOMPRESS
 	bool "Enable decompressor debugging via DEBUG_LL output"
arch/arm/Makefile +0 -8
index 4e877354515f..ec150cf06729 100644
@@ -169,7 +169,6 @@ machine-$(CONFIG_ARCH_CNS3XXX)		+= cns3xxx
 machine-$(CONFIG_ARCH_DAVINCI)		+= davinci
 machine-$(CONFIG_ARCH_DIGICOLOR)	+= digicolor
 machine-$(CONFIG_ARCH_DOVE)		+= dove
-machine-$(CONFIG_ARCH_EBSA110)		+= ebsa110
 machine-$(CONFIG_ARCH_EFM32)		+= efm32
 machine-$(CONFIG_ARCH_EP93XX)		+= ep93xx
 machine-$(CONFIG_ARCH_EXYNOS)		+= exynos
@@ -241,13 +240,6 @@ plat-$(CONFIG_PLAT_PXA)		+= pxa
 plat-$(CONFIG_PLAT_S3C24XX)	+= samsung
 plat-$(CONFIG_PLAT_VERSATILE)	+= versatile
 
-ifeq ($(CONFIG_ARCH_EBSA110),y)
-# This is what happens if you forget the IOCS16 line.
-# PCMCIA cards stop working.
-CFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL
-export CFLAGS_3c589_cs.o
-endif
-
 # The byte offset of the kernel image in RAM from the start of RAM.
 TEXT_OFFSET := $(textofs-y)
 
arch/arm/configs/ebsa110_defconfig deleted +0 -74

74 lines not on this page · raw message

arch/arm/kernel/Makefile +1 -5
index 89e5d864e923..09e67cb02b20 100644
@@ -17,7 +17,7 @@ CFLAGS_REMOVE_return_address.o = -pg
 # Object file lists.
 
 obj-y		:= elf.o entry-common.o irq.o opcodes.o \
-		   process.o ptrace.o reboot.o \
+		   process.o ptrace.o reboot.o io.o \
 		   setup.o signal.o sigreturn_codes.o \
 		   stacktrace.o sys_arm.o time.o traps.o
 
@@ -83,10 +83,6 @@ AFLAGS_iwmmxt.o			:= -Wa,-mcpu=iwmmxt
 obj-$(CONFIG_ARM_CPU_TOPOLOGY)  += topology.o
 obj-$(CONFIG_VDSO)		+= vdso.o
 obj-$(CONFIG_EFI)		+= efi.o
-
-ifneq ($(CONFIG_ARCH_EBSA110),y)
-  obj-y		+= io.o
-endif
 obj-$(CONFIG_PARAVIRT)	+= paravirt.o
 
 head-y			:= head$(MMUEXT).o
arch/arm/mach-ebsa110/Makefile deleted +0 -8
deleted file mode 100644
index 296541315d25..000000000000
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y			:= core.o io.o leds.o
arch/arm/mach-ebsa110/Makefile.boot deleted +0 -5
deleted file mode 100644
index e7e98937c71b..000000000000
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-   zreladdr-y	+= 0x00008000
-params_phys-y	:= 0x00000400
-initrd_phys-y	:= 0x00800000
-
arch/arm/mach-ebsa110/core.c deleted +0 -323

323 lines not on this page · raw message

arch/arm/mach-ebsa110/core.h deleted +0 -38
deleted file mode 100644
index 47acc610b6b4..000000000000
@@ -1,38 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  Copyright (C) 1996-2000 Russell King.
- *
- * This file contains the core hardware definitions of the EBSA-110.
- */
-#ifndef CORE_H
-#define CORE_H
-
-/* Physical addresses/sizes */
-#define ISAMEM_PHYS		0xe0000000
-#define ISAMEM_SIZE		0x10000000
-
-#define ISAIO_PHYS		0xf0000000
-#define ISAIO_SIZE		PGDIR_SIZE
-
-#define TRICK0_PHYS		0xf2000000
-#define TRICK0_SIZE		PGDIR_SIZE
-#define TRICK1_PHYS		0xf2400000
-#define TRICK1_SIZE		PGDIR_SIZE
-#define TRICK2_PHYS		0xf2800000
-#define TRICK3_PHYS		0xf2c00000
-#define TRICK3_SIZE		PGDIR_SIZE
-#define TRICK4_PHYS		0xf3000000
-#define TRICK4_SIZE		PGDIR_SIZE
-#define TRICK5_PHYS		0xf3400000
-#define TRICK6_PHYS		0xf3800000
-#define TRICK7_PHYS		0xf3c00000
-
-/* Virtual addresses */
-#define PIT_BASE		IOMEM(0xfc000000)	/* trick 0 */
-#define SOFT_BASE		IOMEM(0xfd000000)	/* trick 1 */
-#define IRQ_MASK		IOMEM(0xfe000000)	/* trick 3 - read */
-#define IRQ_MSET		IOMEM(0xfe000000)	/* trick 3 - write */
-#define IRQ_STAT		IOMEM(0xff000000)	/* trick 4 - read */
-#define IRQ_MCLR		IOMEM(0xff000000)	/* trick 4 - write */
-
-#endif
arch/arm/mach-ebsa110/include/mach/entry-macro.S deleted +0 -33
deleted file mode 100644
index 14b110de78a9..000000000000
@@ -1,33 +0,0 @@
-/*
- * arch/arm/mach-ebsa110/include/mach/entry-macro.S
- *
- * Low-level IRQ helper macros for ebsa110 platform.
- *
- * This file is licensed under  the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-
-
-#define IRQ_STAT		0xff000000	/* read */
-
-	.macro  get_irqnr_preamble, base, tmp
-	mov	\base, #IRQ_STAT
-	.endm
-
-	.macro	get_irqnr_and_base, irqnr, stat, base, tmp
-	ldrb	\stat, [\base]			@ get interrupts
-	mov	\irqnr, #0
-	tst	\stat, #15
-	addeq	\irqnr, \irqnr, #4
-	moveq	\stat, \stat, lsr #4
-	tst	\stat, #3
-	addeq	\irqnr, \irqnr, #2
-	moveq	\stat, \stat, lsr #2
-	tst	\stat, #1
-	addeq	\irqnr, \irqnr, #1
-	moveq	\stat, \stat, lsr #1
-	tst	\stat, #1			@ bit 0 should be set
-	.endm
-
arch/arm/mach-ebsa110/include/mach/hardware.h deleted +0 -21
deleted file mode 100644
index 81f6967683f6..000000000000
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/mach-ebsa110/include/mach/hardware.h
- *
- *  Copyright (C) 1996-2000 Russell King.
- *
- * This file contains the hardware definitions of the EBSA-110.
- */
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-#define ISAMEM_BASE		0xe0000000
-#define ISAIO_BASE		0xf0000000
-
-/*
- * RAM definitions
- */
-#define UNCACHEABLE_ADDR	0xff000000	/* IRQ_STAT */
-
-#endif
-
arch/arm/mach-ebsa110/include/mach/io.h deleted +0 -89

89 lines not on this page · raw message

arch/arm/mach-ebsa110/include/mach/irqs.h deleted +0 -17
deleted file mode 100644
index 29a8671fe849..000000000000
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/mach-ebsa110/include/mach/irqs.h
- *
- *  Copyright (C) 1996 Russell King
- */
-
-#define NR_IRQS			8
-
-#define IRQ_EBSA110_PRINTER	0
-#define IRQ_EBSA110_COM1	1
-#define IRQ_EBSA110_COM2	2
-#define IRQ_EBSA110_ETHERNET	3
-#define IRQ_EBSA110_TIMER0	4
-#define IRQ_EBSA110_TIMER1	5
-#define IRQ_EBSA110_PCMCIA	6
-#define IRQ_EBSA110_IMMEDIATE	7
arch/arm/mach-ebsa110/include/mach/memory.h deleted +0 -22
deleted file mode 100644
index f025f405de50..000000000000
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- *  arch/arm/mach-ebsa110/include/mach/memory.h
- *
- *  Copyright (C) 1996-1999 Russell King.
- *
- *  Changelog:
- *   20-Oct-1996 RMK	Created
- *   31-Dec-1997 RMK	Fixed definitions to reduce warnings
- *   21-Mar-1999 RMK	Renamed to memory.h
- *		 RMK	Moved TASK_SIZE and PAGE_OFFSET here
- */
-#ifndef __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H
-
-/*
- * Cache flushing area - SRAM
- */
-#define FLUSH_BASE_PHYS		0x40000000
-#define FLUSH_BASE		0xdf000000
-
-#endif
arch/arm/mach-ebsa110/include/mach/uncompress.h deleted +0 -41

41 lines not on this page · raw message

arch/arm/mach-ebsa110/io.c deleted +0 -440

440 lines not on this page · raw message

arch/arm/mach-ebsa110/leds.c deleted +0 -71

71 lines not on this page · raw message

Signature · 1 line
2.27.0
#2 lore raw

PATCH 2/3 net: remove am79c961a driver

In reply to Arnd Bergmann

This driver was only used on the EBSA110 platform, which is now getting removed, so the driver is no longer needed either.

---
 drivers/net/ethernet/amd/Kconfig     |  10 +-
 drivers/net/ethernet/amd/Makefile    |   1 -
 drivers/net/ethernet/amd/am79c961a.c | 763 ---------------------------
 drivers/net/ethernet/amd/am79c961a.h | 143 -----
 4 files changed, 1 insertion(+), 916 deletions(-)
 delete mode 100644 drivers/net/ethernet/amd/am79c961a.c
 delete mode 100644 drivers/net/ethernet/amd/am79c961a.h
drivers/net/ethernet/amd/Kconfig +1 -9
index db7d956a9c9b..d0b0609bbe23 100644
@@ -8,7 +8,7 @@ config NET_VENDOR_AMD
 	default y
 	depends on DIO || MACH_DECSTATION || MVME147 || ATARI || SUN3 || \
 		   SUN3X || SBUS || PCI || ZORRO || (ISA && ISA_DMA_API) || \
-		   (ARM && ARCH_EBSA110) || ISA || EISA || PCMCIA || ARM64
+		   ISA || EISA || PCMCIA || ARM64
 	help
 	  If you have a network (Ethernet) chipset belonging to this class,
 	  say Y.
@@ -75,14 +75,6 @@ config ARIADNE
 	  To compile this driver as a module, choose M here: the module
 	  will be called ariadne.
 
-config ARM_AM79C961A
-	bool "ARM EBSA110 AM79C961A support"
-	depends on ARM && ARCH_EBSA110
-	select CRC32
-	help
-	  If you wish to compile a kernel for the EBSA-110, then you should
-	  always answer Y to this.
-
 config ATARILANCE
 	tristate "Atari LANCE support"
 	depends on ATARI
drivers/net/ethernet/amd/Makefile +0 -1
index 45f86822a5f7..0d2f478b49a5 100644
@@ -5,7 +5,6 @@
 
 obj-$(CONFIG_A2065) += a2065.o
 obj-$(CONFIG_AMD8111_ETH) += amd8111e.o
-obj-$(CONFIG_ARM_AM79C961A) += am79c961a.o
 obj-$(CONFIG_ARIADNE) += ariadne.o
 obj-$(CONFIG_ATARILANCE) += atarilance.o
 obj-$(CONFIG_DECLANCE) += declance.o
drivers/net/ethernet/amd/am79c961a.c deleted +0 -763

763 lines not on this page · raw message

drivers/net/ethernet/amd/am79c961a.h deleted +0 -143

143 lines not on this page · raw message

Signature · 1 line
2.27.0
#4 lore raw

PATCH 3/3 timekeeping: remove arch_gettimeoffset

In reply to Arnd Bergmann

With Arm EBSA110 gone, nothing uses it any more, so the corresponding code and the Kconfig option can be removed.

---
 .../time/modern-timekeeping/arch-support.txt  | 33 -------------------
 drivers/Makefile                              |  2 --
 drivers/clocksource/Kconfig                   |  2 +-
 include/linux/time.h                          | 13 --------
 kernel/time/Kconfig                           |  9 -----
 kernel/time/clocksource.c                     |  8 -----
 kernel/time/timekeeping.c                     | 25 +-------------
 kernel/trace/Kconfig                          |  2 --
 8 files changed, 2 insertions(+), 92 deletions(-)
 delete mode 100644 Documentation/features/time/modern-timekeeping/arch-support.txt
Documentation/features/time/modern-timekeeping/arch-support.txt deleted +0 -33
deleted file mode 100644
index a84c3b9d9a94..000000000000
@@ -1,33 +0,0 @@
-#
-# Feature name:          modern-timekeeping
-#         Kconfig:       !ARCH_USES_GETTIMEOFFSET
-#         description:   arch does not use arch_gettimeoffset() anymore
-#
-    -----------------------
-    |         arch |status|
-    -----------------------
-    |       alpha: |  ok  |
-    |         arc: |  ok  |
-    |         arm: | TODO |
-    |       arm64: |  ok  |
-    |         c6x: |  ok  |
-    |        csky: |  ok  |
-    |       h8300: |  ok  |
-    |     hexagon: |  ok  |
-    |        ia64: |  ok  |
-    |        m68k: |  ok  |
-    |  microblaze: |  ok  |
-    |        mips: |  ok  |
-    |       nds32: |  ok  |
-    |       nios2: |  ok  |
-    |    openrisc: |  ok  |
-    |      parisc: |  ok  |
-    |     powerpc: |  ok  |
-    |       riscv: |  ok  |
-    |        s390: |  ok  |
-    |          sh: |  ok  |
-    |       sparc: |  ok  |
-    |          um: |  ok  |
-    |         x86: |  ok  |
-    |      xtensa: |  ok  |
-    -----------------------
drivers/Makefile +0 -2
index c0cd1b9075e3..4ff1e4459512 100644
@@ -135,9 +135,7 @@ obj-$(CONFIG_INFINIBAND)	+= infiniband/
 obj-y				+= firmware/
 obj-$(CONFIG_CRYPTO)		+= crypto/
 obj-$(CONFIG_SUPERH)		+= sh/
-ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
 obj-y				+= clocksource/
-endif
 obj-$(CONFIG_DCA)		+= dca/
 obj-$(CONFIG_HID)		+= hid/
 obj-$(CONFIG_PPC_PS3)		+= ps3/
drivers/clocksource/Kconfig +1 -1
index 68b087bff59c..764936bfcb2c 100644
@@ -563,7 +563,7 @@ config CLKSRC_QCOM
 
 config CLKSRC_VERSATILE
 	bool "ARM Versatile (Express) reference platforms clock source" if COMPILE_TEST
-	depends on GENERIC_SCHED_CLOCK && !ARCH_USES_GETTIMEOFFSET
+	depends on GENERIC_SCHED_CLOCK
 	select TIMER_OF
 	default y if (ARCH_VEXPRESS || ARCH_VERSATILE) && ARM
 	help
include/linux/time.h +0 -13
index b142cb5f5a53..16cf4522d6f3 100644
@@ -21,19 +21,6 @@ extern time64_t mktime64(const unsigned int year, const unsigned int mon,
 			const unsigned int day, const unsigned int hour,
 			const unsigned int min, const unsigned int sec);
 
-/* Some architectures do not supply their own clocksource.
- * This is mainly the case in architectures that get their
- * inter-tick times by reading the counter on their interval
- * timer. Since these timers wrap every tick, they're not really
- * useful as clocksources. Wrapping them to act like one is possible
- * but not very efficient. So we provide a callout these arches
- * can implement for use with the jiffies clocksource to provide
- * finer then tick granular time.
- */
-#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
-extern u32 (*arch_gettimeoffset)(void);
-#endif
-
 #ifdef CONFIG_POSIX_TIMERS
 extern void clear_itimer(void);
 #else
kernel/time/Kconfig +0 -9
index a09b1d61df6a..51d298ccbe05 100644
@@ -26,10 +26,6 @@ config CLOCKSOURCE_VALIDATE_LAST_CYCLE
 config GENERIC_TIME_VSYSCALL
 	bool
 
-# Old style timekeeping
-config ARCH_USES_GETTIMEOFFSET
-	bool
-
 # The generic clock events infrastructure
 config GENERIC_CLOCKEVENTS
 	bool
@@ -72,7 +68,6 @@ config TICK_ONESHOT
 
 config NO_HZ_COMMON
 	bool
-	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
 	select TICK_ONESHOT
 
 choice
@@ -87,7 +82,6 @@ config HZ_PERIODIC
 
 config NO_HZ_IDLE
 	bool "Idle dynticks system (tickless idle)"
-	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
 	select NO_HZ_COMMON
 	help
 	  This option enables a tickless idle system: timer interrupts
@@ -99,7 +93,6 @@ config NO_HZ_IDLE
 config NO_HZ_FULL
 	bool "Full dynticks system (tickless)"
 	# NO_HZ_COMMON dependency
-	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
 	# We need at least one periodic CPU for timekeeping
 	depends on SMP
 	depends on HAVE_CONTEXT_TRACKING
@@ -158,7 +151,6 @@ config CONTEXT_TRACKING_FORCE
 
 config NO_HZ
 	bool "Old Idle dynticks config"
-	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
 	help
 	  This is the old config entry that enables dynticks idle.
 	  We keep it around for a little while to enforce backward
@@ -166,7 +158,6 @@ config NO_HZ
 
 config HIGH_RES_TIMERS
 	bool "High Resolution Timer Support"
-	depends on !ARCH_USES_GETTIMEOFFSET && GENERIC_CLOCKEVENTS
 	select TICK_ONESHOT
 	help
 	  This option enables high resolution timer support. If your
kernel/time/clocksource.c +0 -8
index 02441ead3c3b..cce484a2cc7c 100644
@@ -705,8 +705,6 @@ static inline void clocksource_update_max_deferment(struct clocksource *cs)
 						&cs->max_cycles);
 }
 
-#ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
-
 static struct clocksource *clocksource_find_best(bool oneshot, bool skipcur)
 {
 	struct clocksource *cs;
@@ -798,12 +796,6 @@ static void clocksource_select_fallback(void)
 	__clocksource_select(true);
 }
 
-#else /* !CONFIG_ARCH_USES_GETTIMEOFFSET */
-static inline void clocksource_select(void) { }
-static inline void clocksource_select_fallback(void) { }
-
-#endif
-
 /*
  * clocksource_done_booting - Called near the end of core bootup
  *
kernel/time/timekeeping.c +1 -24
index 4c47f388a83f..cf99a9a00716 100644
@@ -352,13 +352,6 @@ static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
 
 /* Timekeeper helper functions. */
 
-#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
-static u32 default_arch_gettimeoffset(void) { return 0; }
-u32 (*arch_gettimeoffset)(void) = default_arch_gettimeoffset;
-#else
-static inline u32 arch_gettimeoffset(void) { return 0; }
-#endif
-
 static inline u64 timekeeping_delta_to_ns(const struct tk_read_base *tkr, u64 delta)
 {
 	u64 nsec;
@@ -366,8 +359,7 @@ static inline u64 timekeeping_delta_to_ns(const struct tk_read_base *tkr, u64 de
 	nsec = delta * tkr->mult + tkr->xtime_nsec;
 	nsec >>= tkr->shift;
 
-	/* If arch requires, add in get_arch_timeoffset() */
-	return nsec + arch_gettimeoffset();
+	return nsec;
 }
 
 static inline u64 timekeeping_get_ns(const struct tk_read_base *tkr)
@@ -707,16 +699,8 @@ static void timekeeping_forward_now(struct timekeeper *tk)
 	tk->tkr_raw.cycle_last  = cycle_now;
 
 	tk->tkr_mono.xtime_nsec += delta * tk->tkr_mono.mult;
-
-	/* If arch requires, add in get_arch_timeoffset() */
-	tk->tkr_mono.xtime_nsec += (u64)arch_gettimeoffset() << tk->tkr_mono.shift;
-
-
 	tk->tkr_raw.xtime_nsec += delta * tk->tkr_raw.mult;
 
-	/* If arch requires, add in get_arch_timeoffset() */
-	tk->tkr_raw.xtime_nsec += (u64)arch_gettimeoffset() << tk->tkr_raw.shift;
-
 	tk_normalize_xtime(tk);
 }
 
@@ -2062,19 +2046,12 @@ static void timekeeping_advance(enum timekeeping_adv_mode mode)
 	if (unlikely(timekeeping_suspended))
 		goto out;
 
-#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
-	offset = real_tk->cycle_interval;
-
-	if (mode != TK_ADV_TICK)
-		goto out;
-#else
 	offset = clocksource_delta(tk_clock_read(&tk->tkr_mono),
 				   tk->tkr_mono.cycle_last, tk->tkr_mono.mask);
 
 	/* Check if there's really nothing to do */
 	if (offset < real_tk->cycle_interval && mode == TK_ADV_TICK)
 		goto out;
-#endif
 
 	/* Do some additional sanity checking */
 	timekeeping_check_update(tk, offset);
kernel/trace/Kconfig +0 -2
index a4020c0b4508..b74099f990bf 100644
@@ -253,7 +253,6 @@ config IRQSOFF_TRACER
 	bool "Interrupts-off Latency Tracer"
 	default n
 	depends on TRACE_IRQFLAGS_SUPPORT
-	depends on !ARCH_USES_GETTIMEOFFSET
 	select TRACE_IRQFLAGS
 	select GENERIC_TRACER
 	select TRACER_MAX_TRACE
@@ -277,7 +276,6 @@ config IRQSOFF_TRACER
 config PREEMPT_TRACER
 	bool "Preemption-off Latency Tracer"
 	default n
-	depends on !ARCH_USES_GETTIMEOFFSET
 	depends on PREEMPTION
 	select GENERIC_TRACER
 	select TRACER_MAX_TRACE
Signature · 1 line
2.27.0
Acked-by on v1 3/3
#5 lore raw

Re: [PATCH 3/3] timekeeping: remove arch_gettimeoffset

Quoted 2 lines · Arnd Bergmann

With Arm EBSA110 gone, nothing uses it any more, so the corresponding code and the Kconfig option can be removed.

Yay! It only took 11+ years to get rid of that.

Feel free to route it through your tree.

Reviewed-by on v1 3/3
#6 lore raw

Re: [PATCH 3/3] timekeeping: remove arch_gettimeoffset

In reply to Arnd Bergmann
Quoted 4 lines · Arnd Bergmann

With Arm EBSA110 gone, nothing uses it any more, so the corresponding code and the Kconfig option can be removed.

Very nice cleanup.

At some point we should do a retrospect about how hard it really is for us to get rid of some really annoying core legacy codepaths and the best strategy for doing so, even though this took 11+ years as Thomas says it still looks like a solid path to move over to a generic framework, only it requires enough gritty people (like you) to hang around and do the work piece by piece.

Yours,
Linus Walleij

#7 lore raw

Re: [PATCH 3/3] timekeeping: remove arch_gettimeoffset

Quoted 8 lines · Linus Walleij
Quoted 4 lines · Arnd Bergmann

With Arm EBSA110 gone, nothing uses it any more, so the corresponding code and the Kconfig option can be removed.

Very nice cleanup.

Quoted 8 lines

At some point we should do a retrospect about how hard it really is for us to get rid of some really annoying core legacy codepaths and the best strategy for doing so, even though this took 11+ years as Thomas says it still looks like a solid path to move over to a generic framework, only it requires enough gritty people (like you) to hang around and do the work piece by piece.

Don't be misled. It was not a matter of "enough gritty people", it was a matter that EBSA110 was blocking it.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
#8 lore raw

Re: [PATCH 3/3] timekeeping: remove arch_gettimeoffset

Quoted 2 lines · Russell King - ARM Linux admin

Don't be misled. It was not a matter of "enough gritty people", it was a matter that EBSA110 was blocking it.

I remember that EBSA110 was quite different in that it had this especially limited PIT timer, true that. At one point I even read up on the details of it and then forgot them :/

Yours,
Linus Walleij

#9 lore raw

Re: [PATCH 3/3] timekeeping: remove arch_gettimeoffset

Quoted 9 lines · Linus Walleij
Quoted 2 lines · Russell King - ARM Linux admin

Don't be misled. It was not a matter of "enough gritty people", it was a matter that EBSA110 was blocking it.

I remember that EBSA110 was quite different in that it had this especially limited PIT timer, true that. At one point I even read up on the details of it and then forgot them :/

Yes, it was so basic that it required software to reprogram it on every interrupt - it had no sensible periodic mode. The side effect of which was that unless done carefully, your timekeeping varied all over the place (so much that ntpd was not happy.) The final implementation made ntpd really quite happy on the machine despite the timer's weirdness, up until Linux stopped allowing interrupts to be nested. At that point, it was back to utterly crap timekeeping.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
maintainer Acked-by Russell King on the v1 series
#10 lore raw
In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

The ebsa110 platform is the last thing that uses CONFIG_ARCH_USES_GETTIMEOFFSET, and Russell has previously said that he thinks the platform can be retired now.

Removing it allows us clean up the timer code by throwing out all of the references to arch_gettimeoffset().

The am79c961a network driver can presumably also go, as no other platform references it.

As far as I know, that is correct; it's rather specific to the platform.

Quoted 2 lines

I don't expect these to make it into the coming merge window, posting here as an RFC, and as a reference for the mildly related timer tick series.

For the ebsa110 and am79c961a patches:

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!