Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/io: Remove PPC_INDIRECT_MMIO

The Cell blade support was the last user of PPC_INDIRECT_MMIO, so it can
now be removed.

PPC_INDIRECT_PIO is still used by Power8 powernv, so it needs to remain.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20241218105523.416573-10-mpe@ellerman.id.au

authored by

Michael Ellerman and committed by
Madhavan Srinivasan
6584845b 478e1709

+6 -57
+5 -53
arch/powerpc/include/asm/io.h
··· 65 65 extern bool isa_io_special; 66 66 67 67 #ifdef CONFIG_PPC32 68 - #if defined(CONFIG_PPC_INDIRECT_PIO) || defined(CONFIG_PPC_INDIRECT_MMIO) 69 - #error CONFIG_PPC_INDIRECT_{PIO,MMIO} are not yet supported on 32 bits 68 + #ifdef CONFIG_PPC_INDIRECT_PIO 69 + #error CONFIG_PPC_INDIRECT_PIO is not yet supported on 32 bits 70 70 #endif 71 71 #endif 72 72 ··· 261 261 * for PowerPC is as close as possible to the x86 version of these, and thus 262 262 * provides fairly heavy weight barriers for the non-raw versions 263 263 * 264 - * In addition, they support a hook mechanism when CONFIG_PPC_INDIRECT_MMIO 265 - * or CONFIG_PPC_INDIRECT_PIO are set allowing the platform to provide its 266 - * own implementation of some or all of the accessors. 264 + * In addition, they support a hook mechanism when CONFIG_PPC_INDIRECT_PIO 265 + * is set allowing the platform to provide its own implementation of some 266 + * of the accessors. 267 267 */ 268 268 269 269 /* ··· 277 277 /* Shortcut to the MMIO argument pointer */ 278 278 #define PCI_IO_ADDR volatile void __iomem * 279 279 280 - /* Indirect IO address tokens: 281 - * 282 - * When CONFIG_PPC_INDIRECT_MMIO is set, the platform can provide hooks 283 - * on all MMIOs. (Note that this is all 64 bits only for now) 284 - * 285 - * To help platforms who may need to differentiate MMIO addresses in 286 - * their hooks, a bitfield is reserved for use by the platform near the 287 - * top of MMIO addresses (not PIO, those have to cope the hard way). 288 - * 289 - * The highest address in the kernel virtual space are: 290 - * 291 - * d0003fffffffffff # with Hash MMU 292 - * c00fffffffffffff # with Radix MMU 293 - * 294 - * The top 4 bits are reserved as the region ID on hash, leaving us 8 bits 295 - * that can be used for the field. 296 - * 297 - * The direct IO mapping operations will then mask off those bits 298 - * before doing the actual access, though that only happen when 299 - * CONFIG_PPC_INDIRECT_MMIO is set, thus be careful when you use that 300 - * mechanism 301 - * 302 - * For PIO, there is a separate CONFIG_PPC_INDIRECT_PIO which makes 303 - * all PIO functions call through a hook. 304 - */ 305 - 306 - #ifdef CONFIG_PPC_INDIRECT_MMIO 307 - #define PCI_IO_IND_TOKEN_SHIFT 52 308 - #define PCI_IO_IND_TOKEN_MASK (0xfful << PCI_IO_IND_TOKEN_SHIFT) 309 - #define PCI_FIX_ADDR(addr) \ 310 - ((PCI_IO_ADDR)(((unsigned long)(addr)) & ~PCI_IO_IND_TOKEN_MASK)) 311 - #define PCI_GET_ADDR_TOKEN(addr) \ 312 - (((unsigned long)(addr) & PCI_IO_IND_TOKEN_MASK) >> \ 313 - PCI_IO_IND_TOKEN_SHIFT) 314 - #define PCI_SET_ADDR_TOKEN(addr, token) \ 315 - do { \ 316 - unsigned long __a = (unsigned long)(addr); \ 317 - __a &= ~PCI_IO_IND_TOKEN_MASK; \ 318 - __a |= ((unsigned long)(token)) << PCI_IO_IND_TOKEN_SHIFT; \ 319 - (addr) = (void __iomem *)__a; \ 320 - } while(0) 321 - #else 322 280 #define PCI_FIX_ADDR(addr) (addr) 323 - #endif 324 - 325 281 326 282 /* 327 283 * Non ordered and non-swapping "raw" accessors ··· 588 632 #define DEF_PCI_HOOK_pio(x) NULL 589 633 #endif 590 634 591 - #ifdef CONFIG_PPC_INDIRECT_MMIO 592 - #define DEF_PCI_HOOK_mem(x) x 593 - #else 594 635 #define DEF_PCI_HOOK_mem(x) NULL 595 - #endif 596 636 597 637 /* Structure containing all the hooks */ 598 638 extern struct ppc_pci_io {
+1 -1
arch/powerpc/kernel/setup_64.c
··· 892 892 } 893 893 #endif 894 894 895 - #if defined(CONFIG_PPC_INDIRECT_PIO) || defined(CONFIG_PPC_INDIRECT_MMIO) 895 + #ifdef CONFIG_PPC_INDIRECT_PIO 896 896 struct ppc_pci_io ppc_pci_io; 897 897 EXPORT_SYMBOL(ppc_pci_io); 898 898 #endif
-3
arch/powerpc/platforms/Kconfig
··· 186 186 bool 187 187 select GENERIC_IOMAP 188 188 189 - config PPC_INDIRECT_MMIO 190 - bool 191 - 192 189 source "drivers/cpufreq/Kconfig" 193 190 194 191 menu "CPUIdle driver"