Pull m68k updates from Geert Uytterhoeven: - pagetable layout rewrite, to facilitate global READ_ONCE() rework - Zorro (Amiga) and DIO (HP 9000/300) bus cleanups - defconfig updates - minor cleanups and fixes * tag 'm68k-for-v5.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (23 commits) m68k: defconfig: Update defconfigs for v5.6-rc4 zorro: Replace zero-length array with flexible-array member m68k: Switch to asm-generic/hardirq.h fbdev: c2p: Use BUILD_BUG() instead of custom solution dio: Remove unused dio_dev_driver() dio: Fix dio_bus_match() kerneldoc dio: Make dio_match_device() static zorro: Move zorro_bus_type to bus-private header file zorro: Remove unused zorro_dev_driver() zorro: Use zorro_match_device() helper in zorro_bus_match() zorro: Fix zorro_bus_match() kerneldoc zorro: Make zorro_match_device() static m68k: Fix Kconfig indentation m68k: mm: Change ColdFire pgtable_t m68k: mm: Fully initialize the page-table allocator m68k: mm: Extend table allocator for multiple sizes m68k: mm: Use table allocator for pgtables m68k: mm: Improve kernel_page_table() m68k: mm: Restructure Motorola MMU page-table layout m68k: mm: Move the pointer table allocator to motorola.c ...
Unified · Split
| @@ -66,6 +66,6 @@ endif · 65 unmodified lines | ||
| 66 | 66 | if !MMU |
| 67 | 67 | |
| 68 | 68 | config ISA_DMA_API |
| 69 | − def_bool !M5272 | |
| 69 | + def_bool !M5272 | |
| 70 | 70 | |
| 71 | 71 | endif |
| @@ -12,16 +12,16 @@ config EARLY_PRINTK · 11 unmodified lines | ||
| 12 | 12 | bool "Early printk" |
| 13 | 13 | depends on !(SUN3 || M68000 || COLDFIRE) |
| 14 | 14 | help |
| 15 | − Write kernel log output directly to a serial port. | |
| 16 | − Where implemented, output goes to the framebuffer as well. | |
| 17 | − PROM console functionality on Sun 3x is not affected by this option. | |
| 15 | + Write kernel log output directly to a serial port. | |
| 16 | + Where implemented, output goes to the framebuffer as well. | |
| 17 | + PROM console functionality on Sun 3x is not affected by this option. | |
| 18 | 18 | |
| 19 | − Pass "earlyprintk" on the kernel command line to get a | |
| 20 | − boot console. | |
| 19 | + Pass "earlyprintk" on the kernel command line to get a | |
| 20 | + boot console. | |
| 21 | 21 | |
| 22 | − This is useful for kernel debugging when your machine crashes very | |
| 23 | − early, i.e. before the normal console driver is loaded. | |
| 24 | − You should normally say N here, unless you want to debug such a crash. | |
| 22 | + This is useful for kernel debugging when your machine crashes very | |
| 23 | + early, i.e. before the normal console driver is loaded. | |
| 24 | + You should normally say N here, unless you want to debug such a crash. | |
| 25 | 25 | |
| 26 | 26 | if !MMU |
| 27 | 27 | |
| @@ -269,10 +269,10 @@ config AMCORE · 268 unmodified lines | ||
| 269 | 269 | Support for the Sysam AMCORE open-hardware generic board. |
| 270 | 270 | |
| 271 | 271 | config STMARK2 |
| 272 | − bool "Sysam stmark2 board support" | |
| 273 | − depends on M5441x | |
| 274 | − help | |
| 275 | − Support for the Sysam stmark2 open-hardware generic board. | |
| 272 | + bool "Sysam stmark2 board support" | |
| 273 | + depends on M5441x | |
| 274 | + help | |
| 275 | + Support for the Sysam stmark2 open-hardware generic board. | |
| 276 | 276 | |
| 277 | 277 | config FIREBEE |
| 278 | 278 | bool "FireBee board support" |
| @@ -173,7 +173,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 172 unmodified lines | ||
| 173 | 173 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 174 | 174 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 175 | 175 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 176 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 177 | 176 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 178 | 177 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 179 | 178 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -369,6 +368,7 @@ CONFIG_TCM_FILEIO=m · 189 unmodified lines | ||
| 369 | 368 | CONFIG_TCM_PSCSI=m |
| 370 | 369 | CONFIG_NETDEVICES=y |
| 371 | 370 | CONFIG_DUMMY=m |
| 371 | +CONFIG_WIREGUARD=m | |
| 372 | 372 | CONFIG_EQUALIZER=m |
| 373 | 373 | CONFIG_NET_TEAM=m |
| 374 | 374 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -613,9 +613,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 238 unmodified lines | ||
| 613 | 613 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 614 | 614 | CONFIG_CRYPTO_USER_API_RNG=m |
| 615 | 615 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 616 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 617 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 618 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 619 | 616 | # CONFIG_CRYPTO_HW is not set |
| 620 | 617 | CONFIG_CRC32_SELFTEST=m |
| 621 | 618 | CONFIG_CRC64=m |
| @@ -169,7 +169,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 168 unmodified lines | ||
| 169 | 169 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 170 | 170 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 171 | 171 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 172 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 173 | 172 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 174 | 173 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 175 | 174 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -348,6 +347,7 @@ CONFIG_TCM_FILEIO=m · 172 unmodified lines | ||
| 348 | 347 | CONFIG_TCM_PSCSI=m |
| 349 | 348 | CONFIG_NETDEVICES=y |
| 350 | 349 | CONFIG_DUMMY=m |
| 350 | +CONFIG_WIREGUARD=m | |
| 351 | 351 | CONFIG_EQUALIZER=m |
| 352 | 352 | CONFIG_NET_TEAM=m |
| 353 | 353 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -569,9 +569,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 215 unmodified lines | ||
| 569 | 569 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 570 | 570 | CONFIG_CRYPTO_USER_API_RNG=m |
| 571 | 571 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 572 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 573 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 574 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 575 | 572 | # CONFIG_CRYPTO_HW is not set |
| 576 | 573 | CONFIG_CRC32_SELFTEST=m |
| 577 | 574 | CONFIG_CRC64=m |
| @@ -176,7 +176,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 175 unmodified lines | ||
| 176 | 176 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 177 | 177 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 178 | 178 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 179 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 180 | 179 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 181 | 180 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 182 | 181 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -364,6 +363,7 @@ CONFIG_TCM_FILEIO=m · 181 unmodified lines | ||
| 364 | 363 | CONFIG_TCM_PSCSI=m |
| 365 | 364 | CONFIG_NETDEVICES=y |
| 366 | 365 | CONFIG_DUMMY=m |
| 366 | +CONFIG_WIREGUARD=m | |
| 367 | 367 | CONFIG_EQUALIZER=m |
| 368 | 368 | CONFIG_NET_TEAM=m |
| 369 | 369 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -591,9 +591,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 221 unmodified lines | ||
| 591 | 591 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 592 | 592 | CONFIG_CRYPTO_USER_API_RNG=m |
| 593 | 593 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 594 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 595 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 596 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 597 | 594 | # CONFIG_CRYPTO_HW is not set |
| 598 | 595 | CONFIG_CRC32_SELFTEST=m |
| 599 | 596 | CONFIG_CRC64=m |
| @@ -166,7 +166,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 165 unmodified lines | ||
| 166 | 166 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 167 | 167 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 168 | 168 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 169 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 170 | 169 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 171 | 170 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 172 | 171 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -346,6 +345,7 @@ CONFIG_TCM_FILEIO=m · 173 unmodified lines | ||
| 346 | 345 | CONFIG_TCM_PSCSI=m |
| 347 | 346 | CONFIG_NETDEVICES=y |
| 348 | 347 | CONFIG_DUMMY=m |
| 348 | +CONFIG_WIREGUARD=m | |
| 349 | 349 | CONFIG_EQUALIZER=m |
| 350 | 350 | CONFIG_NET_TEAM=m |
| 351 | 351 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -562,9 +562,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 210 unmodified lines | ||
| 562 | 562 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 563 | 563 | CONFIG_CRYPTO_USER_API_RNG=m |
| 564 | 564 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 565 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 566 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 567 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 568 | 565 | # CONFIG_CRYPTO_HW is not set |
| 569 | 566 | CONFIG_CRC32_SELFTEST=m |
| 570 | 567 | CONFIG_CRC64=m |
| @@ -168,7 +168,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 167 unmodified lines | ||
| 168 | 168 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 169 | 169 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 170 | 170 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 171 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 172 | 171 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 173 | 172 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 174 | 173 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -347,6 +346,7 @@ CONFIG_TCM_FILEIO=m · 172 unmodified lines | ||
| 347 | 346 | CONFIG_TCM_PSCSI=m |
| 348 | 347 | CONFIG_NETDEVICES=y |
| 349 | 348 | CONFIG_DUMMY=m |
| 349 | +CONFIG_WIREGUARD=m | |
| 350 | 350 | CONFIG_EQUALIZER=m |
| 351 | 351 | CONFIG_NET_TEAM=m |
| 352 | 352 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -571,9 +571,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 218 unmodified lines | ||
| 571 | 571 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 572 | 572 | CONFIG_CRYPTO_USER_API_RNG=m |
| 573 | 573 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 574 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 575 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 576 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 577 | 574 | # CONFIG_CRYPTO_HW is not set |
| 578 | 575 | CONFIG_CRC32_SELFTEST=m |
| 579 | 576 | CONFIG_CRC64=m |
| @@ -167,7 +167,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 166 unmodified lines | ||
| 167 | 167 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 168 | 168 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 169 | 169 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 170 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 171 | 170 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 172 | 171 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 173 | 172 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -363,6 +362,7 @@ CONFIG_INPUT_ADBHID=y · 189 unmodified lines | ||
| 363 | 362 | CONFIG_MAC_EMUMOUSEBTN=y |
| 364 | 363 | CONFIG_NETDEVICES=y |
| 365 | 364 | CONFIG_DUMMY=m |
| 365 | +CONFIG_WIREGUARD=m | |
| 366 | 366 | CONFIG_EQUALIZER=m |
| 367 | 367 | CONFIG_NET_TEAM=m |
| 368 | 368 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -593,9 +593,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 224 unmodified lines | ||
| 593 | 593 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 594 | 594 | CONFIG_CRYPTO_USER_API_RNG=m |
| 595 | 595 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 596 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 597 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 598 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 599 | 596 | # CONFIG_CRYPTO_HW is not set |
| 600 | 597 | CONFIG_CRC32_SELFTEST=m |
| 601 | 598 | CONFIG_CRC64=m |
| @@ -187,7 +187,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 186 unmodified lines | ||
| 187 | 187 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 188 | 188 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 189 | 189 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 190 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 191 | 190 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 192 | 191 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 193 | 192 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -407,6 +406,7 @@ CONFIG_INPUT_ADBHID=y · 213 unmodified lines | ||
| 407 | 406 | CONFIG_MAC_EMUMOUSEBTN=y |
| 408 | 407 | CONFIG_NETDEVICES=y |
| 409 | 408 | CONFIG_DUMMY=m |
| 409 | +CONFIG_WIREGUARD=m | |
| 410 | 410 | CONFIG_EQUALIZER=m |
| 411 | 411 | CONFIG_NET_TEAM=m |
| 412 | 412 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -679,9 +679,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 266 unmodified lines | ||
| 679 | 679 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 680 | 680 | CONFIG_CRYPTO_USER_API_RNG=m |
| 681 | 681 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 682 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 683 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 684 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 685 | 682 | # CONFIG_CRYPTO_HW is not set |
| 686 | 683 | CONFIG_CRC32_SELFTEST=m |
| 687 | 684 | CONFIG_CRC64=m |
| @@ -165,7 +165,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 164 unmodified lines | ||
| 165 | 165 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 166 | 166 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 167 | 167 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 168 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 169 | 168 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 170 | 169 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 171 | 170 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -345,6 +344,7 @@ CONFIG_TCM_FILEIO=m · 173 unmodified lines | ||
| 345 | 344 | CONFIG_TCM_PSCSI=m |
| 346 | 345 | CONFIG_NETDEVICES=y |
| 347 | 346 | CONFIG_DUMMY=m |
| 347 | +CONFIG_WIREGUARD=m | |
| 348 | 348 | CONFIG_EQUALIZER=m |
| 349 | 349 | CONFIG_NET_TEAM=m |
| 350 | 350 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -561,9 +561,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 210 unmodified lines | ||
| 561 | 561 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 562 | 562 | CONFIG_CRYPTO_USER_API_RNG=m |
| 563 | 563 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 564 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 565 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 566 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 567 | 564 | # CONFIG_CRYPTO_HW is not set |
| 568 | 565 | CONFIG_CRC32_SELFTEST=m |
| 569 | 566 | CONFIG_CRC64=m |
| @@ -166,7 +166,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 165 unmodified lines | ||
| 166 | 166 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 167 | 167 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 168 | 168 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 169 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 170 | 169 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 171 | 170 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 172 | 171 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -346,6 +345,7 @@ CONFIG_TCM_FILEIO=m · 173 unmodified lines | ||
| 346 | 345 | CONFIG_TCM_PSCSI=m |
| 347 | 346 | CONFIG_NETDEVICES=y |
| 348 | 347 | CONFIG_DUMMY=m |
| 348 | +CONFIG_WIREGUARD=m | |
| 349 | 349 | CONFIG_EQUALIZER=m |
| 350 | 350 | CONFIG_NET_TEAM=m |
| 351 | 351 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -562,9 +562,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 210 unmodified lines | ||
| 562 | 562 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 563 | 563 | CONFIG_CRYPTO_USER_API_RNG=m |
| 564 | 564 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 565 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 566 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 567 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 568 | 565 | # CONFIG_CRYPTO_HW is not set |
| 569 | 566 | CONFIG_CRC32_SELFTEST=m |
| 570 | 567 | CONFIG_CRC64=m |
| @@ -167,7 +167,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 166 unmodified lines | ||
| 167 | 167 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 168 | 168 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 169 | 169 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 170 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 171 | 170 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 172 | 171 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 173 | 172 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -353,6 +352,7 @@ CONFIG_TCM_FILEIO=m · 179 unmodified lines | ||
| 353 | 352 | CONFIG_TCM_PSCSI=m |
| 354 | 353 | CONFIG_NETDEVICES=y |
| 355 | 354 | CONFIG_DUMMY=m |
| 355 | +CONFIG_WIREGUARD=m | |
| 356 | 356 | CONFIG_EQUALIZER=m |
| 357 | 357 | CONFIG_NET_TEAM=m |
| 358 | 358 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -580,9 +580,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 221 unmodified lines | ||
| 580 | 580 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 581 | 581 | CONFIG_CRYPTO_USER_API_RNG=m |
| 582 | 582 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 583 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 584 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 585 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 586 | 583 | # CONFIG_CRYPTO_HW is not set |
| 587 | 584 | CONFIG_CRC32_SELFTEST=m |
| 588 | 585 | CONFIG_CRC64=m |
| @@ -163,7 +163,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 162 unmodified lines | ||
| 163 | 163 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 164 | 164 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 165 | 165 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 166 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 167 | 166 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 168 | 167 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 169 | 168 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -343,6 +342,7 @@ CONFIG_TCM_FILEIO=m · 173 unmodified lines | ||
| 343 | 342 | CONFIG_TCM_PSCSI=m |
| 344 | 343 | CONFIG_NETDEVICES=y |
| 345 | 344 | CONFIG_DUMMY=m |
| 345 | +CONFIG_WIREGUARD=m | |
| 346 | 346 | CONFIG_EQUALIZER=m |
| 347 | 347 | CONFIG_NET_TEAM=m |
| 348 | 348 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -564,9 +564,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 215 unmodified lines | ||
| 564 | 564 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 565 | 565 | CONFIG_CRYPTO_USER_API_RNG=m |
| 566 | 566 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 567 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 568 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 569 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 570 | 567 | # CONFIG_CRYPTO_HW is not set |
| 571 | 568 | CONFIG_CRC32_SELFTEST=m |
| 572 | 569 | CONFIG_CRC64=m |
| @@ -163,7 +163,6 @@ CONFIG_NETFILTER_XT_MATCH_NFACCT=m · 162 unmodified lines | ||
| 163 | 163 | CONFIG_NETFILTER_XT_MATCH_OSF=m |
| 164 | 164 | CONFIG_NETFILTER_XT_MATCH_OWNER=m |
| 165 | 165 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
| 166 | −CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | |
| 167 | 166 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
| 168 | 167 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m |
| 169 | 168 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m |
| @@ -343,6 +342,7 @@ CONFIG_TCM_FILEIO=m · 173 unmodified lines | ||
| 343 | 342 | CONFIG_TCM_PSCSI=m |
| 344 | 343 | CONFIG_NETDEVICES=y |
| 345 | 344 | CONFIG_DUMMY=m |
| 345 | +CONFIG_WIREGUARD=m | |
| 346 | 346 | CONFIG_EQUALIZER=m |
| 347 | 347 | CONFIG_NET_TEAM=m |
| 348 | 348 | CONFIG_NET_TEAM_MODE_BROADCAST=m |
| @@ -563,9 +563,6 @@ CONFIG_CRYPTO_USER_API_HASH=m · 214 unmodified lines | ||
| 563 | 563 | CONFIG_CRYPTO_USER_API_SKCIPHER=m |
| 564 | 564 | CONFIG_CRYPTO_USER_API_RNG=m |
| 565 | 565 | CONFIG_CRYPTO_USER_API_AEAD=m |
| 566 | −CONFIG_CRYPTO_LIB_BLAKE2S=m | |
| 567 | −CONFIG_CRYPTO_LIB_CURVE25519=m | |
| 568 | −CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m | |
| 569 | 566 | # CONFIG_CRYPTO_HW is not set |
| 570 | 567 | CONFIG_CRC32_SELFTEST=m |
| 571 | 568 | CONFIG_CRC64=m |
| @@ -8,6 +8,7 @@ generic-y += emergency-restart.h · 7 unmodified lines | ||
| 8 | 8 | generic-y += exec.h |
| 9 | 9 | generic-y += extable.h |
| 10 | 10 | generic-y += futex.h |
| 11 | +generic-y += hardirq.h | |
| 11 | 12 | generic-y += hw_irq.h |
| 12 | 13 | generic-y += irq_regs.h |
| 13 | 14 | generic-y += irq_work.h |
| @@ -1,29 +0,0 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 2 | −#ifndef __M68K_HARDIRQ_H | |
| 3 | −#define __M68K_HARDIRQ_H | |
| 4 | − | |
| 5 | −#include <linux/threads.h> | |
| 6 | −#include <linux/cache.h> | |
| 7 | −#include <asm/irq.h> | |
| 8 | − | |
| 9 | −#ifdef CONFIG_MMU | |
| 10 | − | |
| 11 | −static inline void ack_bad_irq(unsigned int irq) | |
| 12 | −{ | |
| 13 | − pr_crit("unexpected IRQ trap at vector %02x\n", irq); | |
| 14 | −} | |
| 15 | − | |
| 16 | −/* entry.S is sensitive to the offsets of these fields */ | |
| 17 | −typedef struct { | |
| 18 | − unsigned int __softirq_pending; | |
| 19 | −} ____cacheline_aligned irq_cpustat_t; | |
| 20 | − | |
| 21 | −#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | |
| 22 | − | |
| 23 | −#else | |
| 24 | − | |
| 25 | −#include <asm-generic/hardirq.h> | |
| 26 | − | |
| 27 | −#endif /* !CONFIG_MMU */ | |
| 28 | − | |
| 29 | −#endif | |
| @@ -28,21 +28,22 @@ extern inline pmd_t *pmd_alloc_kernel(pgd_t *pgd, unsigned long address) · 27 unmodified lines | ||
| 28 | 28 | return (pmd_t *) pgd; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | −#define pmd_populate(mm, pmd, page) (pmd_val(*pmd) = \ | |
| 32 | − (unsigned long)(page_address(page))) | |
| 31 | +#define pmd_populate(mm, pmd, pte) (pmd_val(*pmd) = (unsigned long)(pte)) | |
| 33 | 32 | |
| 34 | −#define pmd_populate_kernel(mm, pmd, pte) (pmd_val(*pmd) = (unsigned long)(pte)) | |
| 33 | +#define pmd_populate_kernel pmd_populate | |
| 35 | 34 | |
| 36 | −#define pmd_pgtable(pmd) pmd_page(pmd) | |
| 35 | +#define pmd_pgtable(pmd) pfn_to_virt(pmd_val(pmd) >> PAGE_SHIFT) | |
| 37 | 36 | |
| 38 | −static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page, | |
| 37 | +static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pgtable, | |
| 39 | 38 | unsigned long address) |
| 40 | 39 | { |
| 40 | + struct page *page = virt_to_page(pgtable); | |
| 41 | + | |
| 41 | 42 | pgtable_pte_page_dtor(page); |
| 42 | 43 | __free_page(page); |
| 43 | 44 | } |
| 44 | 45 | |
| 45 | −static inline struct page *pte_alloc_one(struct mm_struct *mm) | |
| 46 | +static inline pgtable_t pte_alloc_one(struct mm_struct *mm) | |
| 46 | 47 | { |
| 47 | 48 | struct page *page = alloc_pages(GFP_DMA, 0); |
| 48 | 49 | pte_t *pte; |
| @@ -54,20 +55,16 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm) · 5 unmodified lines | ||
| 54 | 55 | return NULL; |
| 55 | 56 | } |
| 56 | 57 | |
| 57 | − pte = kmap(page); | |
| 58 | − if (pte) { | |
| 59 | − clear_page(pte); | |
| 60 | − __flush_page_to_ram(pte); | |
| 61 | − flush_tlb_kernel_page(pte); | |
| 62 | − nocache_page(pte); | |
| 63 | − } | |
| 64 | − kunmap(page); | |
| 58 | + pte = page_address(page); | |
| 59 | + clear_page(pte); | |
| 65 | 60 | |
| 66 | − return page; | |
| 61 | + return pte; | |
| 67 | 62 | } |
| 68 | 63 | |
| 69 | −static inline void pte_free(struct mm_struct *mm, struct page *page) | |
| 64 | +static inline void pte_free(struct mm_struct *mm, pgtable_t pgtable) | |
| 70 | 65 | { |
| 66 | + struct page *page = virt_to_page(pgtable); | |
| 67 | + | |
| 71 | 68 | pgtable_pte_page_dtor(page); |
| 72 | 69 | __free_page(page); |
| 73 | 70 | } |
| @@ -90,7 +87,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) · 16 unmodified lines | ||
| 90 | 87 | new_pgd = (pgd_t *)__get_free_page(GFP_DMA | __GFP_NOWARN); |
| 91 | 88 | if (!new_pgd) |
| 92 | 89 | return NULL; |
| 93 | − memcpy(new_pgd, swapper_pg_dir, PAGE_SIZE); | |
| 90 | + memcpy(new_pgd, swapper_pg_dir, PTRS_PER_PGD * sizeof(pgd_t)); | |
| 94 | 91 | memset(new_pgd, 0, PAGE_OFFSET >> PGDIR_SHIFT); |
| 95 | 92 | return new_pgd; |
| 96 | 93 | } |
| @@ -5,93 +5,71 @@ · 4 unmodified lines | ||
| 5 | 5 | #include <asm/tlb.h> |
| 6 | 6 | #include <asm/tlbflush.h> |
| 7 | 7 | |
| 8 | −extern pmd_t *get_pointer_table(void); | |
| 9 | −extern int free_pointer_table(pmd_t *); | |
| 8 | +extern void mmu_page_ctor(void *page); | |
| 9 | +extern void mmu_page_dtor(void *page); | |
| 10 | 10 | |
| 11 | −static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm) | |
| 12 | −{ | |
| 13 | − pte_t *pte; | |
| 11 | +enum m68k_table_types { | |
| 12 | + TABLE_PGD = 0, | |
| 13 | + TABLE_PMD = 0, /* same size as PGD */ | |
| 14 | + TABLE_PTE = 1, | |
| 15 | +}; | |
| 14 | 16 | |
| 15 | − pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO); | |
| 16 | − if (pte) { | |
| 17 | − __flush_page_to_ram(pte); | |
| 18 | − flush_tlb_kernel_page(pte); | |
| 19 | − nocache_page(pte); | |
| 20 | − } | |
| 17 | +extern void init_pointer_table(void *table, int type); | |
| 18 | +extern void *get_pointer_table(int type); | |
| 19 | +extern int free_pointer_table(void *table, int type); | |
| 21 | 20 | |
| 22 | − return pte; | |
| 21 | +static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm) | |
| 22 | +{ | |
| 23 | + return get_pointer_table(TABLE_PTE); | |
| 23 | 24 | } |
| 24 | 25 | |
| 25 | 26 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) |
| 26 | 27 | { |
| 27 | − cache_page(pte); | |
| 28 | − free_page((unsigned long) pte); | |
| 28 | + free_pointer_table(pte, TABLE_PTE); | |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm) |
| 32 | 32 | { |
| 33 | − struct page *page; | |
| 34 | − pte_t *pte; | |
| 35 | − | |
| 36 | − page = alloc_pages(GFP_KERNEL|__GFP_ZERO, 0); | |
| 37 | − if(!page) | |
| 38 | − return NULL; | |
| 39 | − if (!pgtable_pte_page_ctor(page)) { | |
| 40 | − __free_page(page); | |
| 41 | − return NULL; | |
| 42 | − } | |
| 43 | − | |
| 44 | − pte = kmap(page); | |
| 45 | − __flush_page_to_ram(pte); | |
| 46 | − flush_tlb_kernel_page(pte); | |
| 47 | − nocache_page(pte); | |
| 48 | − kunmap(page); | |
| 49 | − return page; | |
| 33 | + return get_pointer_table(TABLE_PTE); | |
| 50 | 34 | } |
| 51 | 35 | |
| 52 | −static inline void pte_free(struct mm_struct *mm, pgtable_t page) | |
| 36 | +static inline void pte_free(struct mm_struct *mm, pgtable_t pgtable) | |
| 53 | 37 | { |
| 54 | − pgtable_pte_page_dtor(page); | |
| 55 | − cache_page(kmap(page)); | |
| 56 | − kunmap(page); | |
| 57 | − __free_page(page); | |
| 38 | + free_pointer_table(pgtable, TABLE_PTE); | |
| 58 | 39 | } |
| 59 | 40 | |
| 60 | −static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t page, | |
| 41 | +static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pgtable, | |
| 61 | 42 | unsigned long address) |
| 62 | 43 | { |
| 63 | − pgtable_pte_page_dtor(page); | |
| 64 | − cache_page(kmap(page)); | |
| 65 | − kunmap(page); | |
| 66 | − __free_page(page); | |
| 44 | + free_pointer_table(pgtable, TABLE_PTE); | |
| 67 | 45 | } |
| 68 | 46 | |
| 69 | 47 | |
| 70 | 48 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) |
| 71 | 49 | { |
| 72 | − return get_pointer_table(); | |
| 50 | + return get_pointer_table(TABLE_PMD); | |
| 73 | 51 | } |
| 74 | 52 | |
| 75 | 53 | static inline int pmd_free(struct mm_struct *mm, pmd_t *pmd) |
| 76 | 54 | { |
| 77 | − return free_pointer_table(pmd); | |
| 55 | + return free_pointer_table(pmd, TABLE_PMD); | |
| 78 | 56 | } |
| 79 | 57 | |
| 80 | 58 | static inline int __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd, |
| 81 | 59 | unsigned long address) |
| 82 | 60 | { |
| 83 | − return free_pointer_table(pmd); | |
| 61 | + return free_pointer_table(pmd, TABLE_PMD); | |
| 84 | 62 | } |
| 85 | 63 | |
| 86 | 64 | |
| 87 | 65 | static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) |
| 88 | 66 | { |
| 89 | − pmd_free(mm, (pmd_t *)pgd); | |
| 67 | + free_pointer_table(pgd, TABLE_PGD); | |
| 90 | 68 | } |
| 91 | 69 | |
| 92 | 70 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) |
| 93 | 71 | { |
| 94 | − return (pgd_t *)get_pointer_table(); | |
| 72 | + return get_pointer_table(TABLE_PGD); | |
| 95 | 73 | } |
| 96 | 74 | |
| 97 | 75 | |
| @@ -102,9 +80,9 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t * · 4 unmodified lines | ||
| 102 | 80 | |
| 103 | 81 | static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page) |
| 104 | 82 | { |
| 105 | − pmd_set(pmd, page_address(page)); | |
| 83 | + pmd_set(pmd, page); | |
| 106 | 84 | } |
| 107 | −#define pmd_pgtable(pmd) pmd_page(pmd) | |
| 85 | +#define pmd_pgtable(pmd) ((pgtable_t)__pmd_page(pmd)) | |
| 108 | 86 | |
| 109 | 87 | static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) |
| 110 | 88 | { |
| @@ -23,7 +23,18 @@ · 22 unmodified lines | ||
| 23 | 23 | #define _DESCTYPE_MASK 0x003 |
| 24 | 24 | |
| 25 | 25 | #define _CACHEMASK040 (~0x060) |
| 26 | −#define _TABLE_MASK (0xfffffe00) | |
| 26 | + | |
| 27 | +/* | |
| 28 | + * Currently set to the minimum alignment of table pointers (256 bytes). | |
| 29 | + * The hardware only uses the low 4 bits for state: | |
| 30 | + * | |
| 31 | + * 3 - Used | |
| 32 | + * 2 - Write Protected | |
| 33 | + * 0,1 - Descriptor Type | |
| 34 | + * | |
| 35 | + * and has the rest of the bits reserved. | |
| 36 | + */ | |
| 37 | +#define _TABLE_MASK (0xffffff00) | |
| 27 | 38 | |
| 28 | 39 | #define _PAGE_TABLE (_PAGE_SHORT) |
| 29 | 40 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_NOCACHE) |
| @@ -108,13 +119,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) · 78 unmodified lines | ||
| 108 | 119 | |
| 109 | 120 | static inline void pmd_set(pmd_t *pmdp, pte_t *ptep) |
| 110 | 121 | { |
| 111 | − unsigned long ptbl = virt_to_phys(ptep) | _PAGE_TABLE | _PAGE_ACCESSED; | |
| 112 | − unsigned long *ptr = pmdp->pmd; | |
| 113 | − short i = 16; | |
| 114 | − while (--i >= 0) { | |
| 115 | − *ptr++ = ptbl; | |
| 116 | − ptbl += (sizeof(pte_t)*PTRS_PER_PTE/16); | |
| 117 | − } | |
| 122 | + pmd_val(*pmdp) = virt_to_phys(ptep) | _PAGE_TABLE | _PAGE_ACCESSED; | |
| 118 | 123 | } |
| 119 | 124 | |
| 120 | 125 | static inline void pud_set(pud_t *pudp, pmd_t *pmdp) |
| @@ -138,13 +143,14 @@ static inline void pud_set(pud_t *pudp, pmd_t *pmdp) · 17 unmodified lines | ||
| 138 | 143 | #define pmd_none(pmd) (!pmd_val(pmd)) |
| 139 | 144 | #define pmd_bad(pmd) ((pmd_val(pmd) & _DESCTYPE_MASK) != _PAGE_TABLE) |
| 140 | 145 | #define pmd_present(pmd) (pmd_val(pmd) & _PAGE_TABLE) |
| 141 | −#define pmd_clear(pmdp) ({ \ | |
| 142 | − unsigned long *__ptr = pmdp->pmd; \ | |
| 143 | − short __i = 16; \ | |
| 144 | − while (--__i >= 0) \ | |
| 145 | − *__ptr++ = 0; \ | |
| 146 | −}) | |
| 147 | −#define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd))) | |
| 146 | +#define pmd_clear(pmdp) ({ pmd_val(*pmdp) = 0; }) | |
| 147 | + | |
| 148 | +/* | |
| 149 | + * m68k does not have huge pages (020/030 actually could), but generic code | |
| 150 | + * expects pmd_page() to exists, only to then DCE it all. Provide a dummy to | |
| 151 | + * make the compiler happy. | |
| 152 | + */ | |
| 153 | +#define pmd_page(pmd) NULL | |
| 148 | 154 | |
| 149 | 155 | |
| 150 | 156 | #define pud_none(pud) (!pud_val(pud)) |
| @@ -22,15 +22,25 @@ · 21 unmodified lines | ||
| 22 | 22 | * These are used to make use of C type-checking.. |
| 23 | 23 | */ |
| 24 | 24 | #if !defined(CONFIG_MMU) || CONFIG_PGTABLE_LEVELS == 3 |
| 25 | −typedef struct { unsigned long pmd[16]; } pmd_t; | |
| 26 | −#define pmd_val(x) ((&x)->pmd[0]) | |
| 27 | −#define __pmd(x) ((pmd_t) { { (x) }, }) | |
| 25 | +typedef struct { unsigned long pmd; } pmd_t; | |
| 26 | +#define pmd_val(x) ((&x)->pmd) | |
| 27 | +#define __pmd(x) ((pmd_t) { (x) } ) | |
| 28 | 28 | #endif |
| 29 | 29 | |
| 30 | 30 | typedef struct { unsigned long pte; } pte_t; |
| 31 | 31 | typedef struct { unsigned long pgd; } pgd_t; |
| 32 | 32 | typedef struct { unsigned long pgprot; } pgprot_t; |
| 33 | + | |
| 34 | +#if defined(CONFIG_SUN3) | |
| 35 | +/* | |
| 36 | + * Sun3 still uses the asm-generic/pgalloc.h code and thus needs this | |
| 37 | + * definition. It would be possible to unify Sun3 and ColdFire pgalloc and have | |
| 38 | + * all of m68k use the same type. | |
| 39 | + */ | |
| 33 | 40 | typedef struct page *pgtable_t; |
| 41 | +#else | |
| 42 | +typedef pte_t *pgtable_t; | |
| 43 | +#endif | |
| 34 | 44 | |
| 35 | 45 | #define pte_val(x) ((x).pte) |
| 36 | 46 | #define pgd_val(x) ((x).pgd) |
| @@ -36,7 +36,7 @@ · 35 unmodified lines | ||
| 36 | 36 | |
| 37 | 37 | /* PMD_SHIFT determines the size of the area a second-level page table can map */ |
| 38 | 38 | #if CONFIG_PGTABLE_LEVELS == 3 |
| 39 | −#define PMD_SHIFT 22 | |
| 39 | +#define PMD_SHIFT 18 | |
| 40 | 40 | #endif |
| 41 | 41 | #define PMD_SIZE (1UL << PMD_SHIFT) |
| 42 | 42 | #define PMD_MASK (~(PMD_SIZE-1)) |
| @@ -67,8 +67,8 @@ · 24 unmodified lines | ||
| 67 | 67 | #define PTRS_PER_PMD 1 |
| 68 | 68 | #define PTRS_PER_PGD 1024 |
| 69 | 69 | #else |
| 70 | −#define PTRS_PER_PTE 1024 | |
| 71 | −#define PTRS_PER_PMD 8 | |
| 70 | +#define PTRS_PER_PTE 64 | |
| 71 | +#define PTRS_PER_PMD 128 | |
| 72 | 72 | #define PTRS_PER_PGD 128 |
| 73 | 73 | #endif |
| 74 | 74 | #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) |
| @@ -76,8 +76,8 @@ · 1 unmodified line | ||
| 76 | 76 | |
| 77 | 77 | /* Virtual address region for use by kernel_map() */ |
| 78 | 78 | #ifdef CONFIG_SUN3 |
| 79 | −#define KMAP_START 0x0DC00000 | |
| 80 | −#define KMAP_END 0x0E000000 | |
| 79 | +#define KMAP_START 0x0dc00000 | |
| 80 | +#define KMAP_END 0x0e000000 | |
| 81 | 81 | #elif defined(CONFIG_COLDFIRE) |
| 82 | 82 | #define KMAP_START 0xe0000000 |
| 83 | 83 | #define KMAP_END 0xf0000000 |
| @@ -40,11 +40,6 @@ · 39 unmodified lines | ||
| 40 | 40 | void *empty_zero_page; |
| 41 | 41 | EXPORT_SYMBOL(empty_zero_page); |
| 42 | 42 | |
| 43 | −#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE) | |
| 44 | −extern void init_pointer_table(unsigned long ptable); | |
| 45 | −extern pmd_t *zero_pgtable; | |
| 46 | −#endif | |
| 47 | − | |
| 48 | 43 | #ifdef CONFIG_MMU |
| 49 | 44 | |
| 50 | 45 | pg_data_t pg_data_map[MAX_NUMNODES]; |
| @@ -125,20 +120,31 @@ void free_initmem(void) · 74 unmodified lines | ||
| 125 | 120 | static inline void init_pointer_tables(void) |
| 126 | 121 | { |
| 127 | 122 | #if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE) |
| 128 | − int i; | |
| 123 | + int i, j; | |
| 129 | 124 | |
| 130 | 125 | /* insert pointer tables allocated so far into the tablelist */ |
| 131 | − init_pointer_table((unsigned long)kernel_pg_dir); | |
| 126 | + init_pointer_table(kernel_pg_dir, TABLE_PGD); | |
| 132 | 127 | for (i = 0; i < PTRS_PER_PGD; i++) { |
| 133 | − pud_t *pud = (pud_t *)(&kernel_pg_dir[i]); | |
| 128 | + pud_t *pud = (pud_t *)&kernel_pg_dir[i]; | |
| 129 | + pmd_t *pmd_dir; | |
| 134 | 130 | |
| 135 | − if (pud_present(*pud)) | |
| 136 | − init_pointer_table(pgd_page_vaddr(kernel_pg_dir[i])); | |
| 137 | − } | |
| 131 | + if (!pud_present(*pud)) | |
| 132 | + continue; | |
| 133 | + | |
| 134 | + pmd_dir = (pmd_t *)pgd_page_vaddr(kernel_pg_dir[i]); | |
| 135 | + init_pointer_table(pmd_dir, TABLE_PMD); | |
| 138 | 136 | |
| 139 | − /* insert also pointer table that we used to unmap the zero page */ | |
| 140 | − if (zero_pgtable) | |
| 141 | − init_pointer_table((unsigned long)zero_pgtable); | |
| 137 | + for (j = 0; j < PTRS_PER_PMD; j++) { | |
| 138 | + pmd_t *pmd = &pmd_dir[j]; | |
| 139 | + pte_t *pte_dir; | |
| 140 | + | |
| 141 | + if (!pmd_present(*pmd)) | |
| 142 | + continue; | |
| 143 | + | |
| 144 | + pte_dir = (pte_t *)__pmd_page(*pmd); | |
| 145 | + init_pointer_table(pte_dir, TABLE_PTE); | |
| 146 | + } | |
| 147 | + } | |
| 142 | 148 | #endif |
| 143 | 149 | } |
| 144 | 150 | |
| @@ -24,8 +24,6 @@ · 23 unmodified lines | ||
| 24 | 24 | |
| 25 | 25 | #undef DEBUG |
| 26 | 26 | |
| 27 | −#define PTRTREESIZE (256*1024) | |
| 28 | − | |
| 29 | 27 | /* |
| 30 | 28 | * For 040/060 we can use the virtual memory area like other architectures, |
| 31 | 29 | * but for 020/030 we want to use early termination page descriptors and we |
| @@ -50,7 +48,7 @@ static inline void free_io_area(void *addr) · 18 unmodified lines | ||
| 50 | 48 | |
| 51 | 49 | #else |
| 52 | 50 | |
| 53 | −#define IO_SIZE (256*1024) | |
| 51 | +#define IO_SIZE PMD_SIZE | |
| 54 | 52 | |
| 55 | 53 | static struct vm_struct *iolist; |
| 56 | 54 | |
| @@ -81,14 +79,13 @@ static void __free_io_area(void *addr, unsigned long size) · 24 unmodified lines | ||
| 81 | 79 | |
| 82 | 80 | #if CONFIG_PGTABLE_LEVELS == 3 |
| 83 | 81 | if (CPU_IS_020_OR_030) { |
| 84 | − int pmd_off = (virtaddr/PTRTREESIZE) & 15; | |
| 85 | − int pmd_type = pmd_dir->pmd[pmd_off] & _DESCTYPE_MASK; | |
| 82 | + int pmd_type = pmd_val(*pmd_dir) & _DESCTYPE_MASK; | |
| 86 | 83 | |
| 87 | 84 | if (pmd_type == _PAGE_PRESENT) { |
| 88 | − pmd_dir->pmd[pmd_off] = 0; | |
| 89 | − virtaddr += PTRTREESIZE; | |
| 90 | − size -= PTRTREESIZE; | |
| 91 | − continue; | |
| 85 | + pmd_clear(pmd_dir); | |
| 86 | + virtaddr += PMD_SIZE; | |
| 87 | + size -= PMD_SIZE; | |
| 88 | + | |
| 92 | 89 | } else if (pmd_type == 0) |
| 93 | 90 | continue; |
| 94 | 91 | } |
| @@ -249,7 +246,7 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla · 154 unmodified lines | ||
| 249 | 246 | |
| 250 | 247 | while ((long)size > 0) { |
| 251 | 248 | #ifdef DEBUG |
| 252 | − if (!(virtaddr & (PTRTREESIZE-1))) | |
| 249 | + if (!(virtaddr & (PMD_SIZE-1))) | |
| 253 | 250 | printk ("\npa=%#lx va=%#lx ", physaddr, virtaddr); |
| 254 | 251 | #endif |
| 255 | 252 | pgd_dir = pgd_offset_k(virtaddr); |
| @@ -263,10 +260,10 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla · 7 unmodified lines | ||
| 263 | 260 | |
| 264 | 261 | #if CONFIG_PGTABLE_LEVELS == 3 |
| 265 | 262 | if (CPU_IS_020_OR_030) { |
| 266 | − pmd_dir->pmd[(virtaddr/PTRTREESIZE) & 15] = physaddr; | |
| 267 | − physaddr += PTRTREESIZE; | |
| 268 | − virtaddr += PTRTREESIZE; | |
| 269 | − size -= PTRTREESIZE; | |
| 263 | + pmd_val(*pmd_dir) = physaddr; | |
| 264 | + physaddr += PMD_SIZE; | |
| 265 | + virtaddr += PMD_SIZE; | |
| 266 | + size -= PMD_SIZE; | |
| 270 | 267 | } else |
| 271 | 268 | #endif |
| 272 | 269 | { |
| @@ -367,13 +364,12 @@ void kernel_set_cachemode(void *addr, unsigned long size, int cmode) · 94 unmodified lines | ||
| 367 | 364 | |
| 368 | 365 | #if CONFIG_PGTABLE_LEVELS == 3 |
| 369 | 366 | if (CPU_IS_020_OR_030) { |
| 370 | − int pmd_off = (virtaddr/PTRTREESIZE) & 15; | |
| 367 | + unsigned long pmd = pmd_val(*pmd_dir); | |
| 371 | 368 | |
| 372 | − if ((pmd_dir->pmd[pmd_off] & _DESCTYPE_MASK) == _PAGE_PRESENT) { | |
| 373 | − pmd_dir->pmd[pmd_off] = (pmd_dir->pmd[pmd_off] & | |
| 374 | − _CACHEMASK040) | cmode; | |
| 375 | − virtaddr += PTRTREESIZE; | |
| 376 | − size -= PTRTREESIZE; | |
| 369 | + if ((pmd & _DESCTYPE_MASK) == _PAGE_PRESENT) { | |
| 370 | + *pmd_dir = __pmd((pmd & _CACHEMASK040) | cmode); | |
| 371 | + virtaddr += PMD_SIZE; | |
| 372 | + size -= PMD_SIZE; | |
| 377 | 373 | continue; |
| 378 | 374 | } |
| 379 | 375 | } |
| @@ -22,109 +22,6 @@ · 21 unmodified lines | ||
| 22 | 22 | #include <asm/machdep.h> |
| 23 | 23 | |
| 24 | 24 | |
| 25 | −/* ++andreas: {get,free}_pointer_table rewritten to use unused fields from | |
| 26 | − struct page instead of separately kmalloced struct. Stolen from | |
| 27 | − arch/sparc/mm/srmmu.c ... */ | |
| 28 | − | |
| 29 | −typedef struct list_head ptable_desc; | |
| 30 | −static LIST_HEAD(ptable_list); | |
| 31 | − | |
| 32 | −#define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(page)->lru)) | |
| 33 | −#define PD_PAGE(ptable) (list_entry(ptable, struct page, lru)) | |
| 34 | −#define PD_MARKBITS(dp) (*(unsigned char *)&PD_PAGE(dp)->index) | |
| 35 | − | |
| 36 | −#define PTABLE_SIZE (PTRS_PER_PMD * sizeof(pmd_t)) | |
| 37 | − | |
| 38 | −void __init init_pointer_table(unsigned long ptable) | |
| 39 | −{ | |
| 40 | − ptable_desc *dp; | |
| 41 | − unsigned long page = ptable & PAGE_MASK; | |
| 42 | − unsigned char mask = 1 << ((ptable - page)/PTABLE_SIZE); | |
| 43 | − | |
| 44 | − dp = PD_PTABLE(page); | |
| 45 | − if (!(PD_MARKBITS(dp) & mask)) { | |
| 46 | − PD_MARKBITS(dp) = 0xff; | |
| 47 | − list_add(dp, &ptable_list); | |
| 48 | − } | |
| 49 | − | |
| 50 | − PD_MARKBITS(dp) &= ~mask; | |
| 51 | − pr_debug("init_pointer_table: %lx, %x\n", ptable, PD_MARKBITS(dp)); | |
| 52 | − | |
| 53 | − /* unreserve the page so it's possible to free that page */ | |
| 54 | − __ClearPageReserved(PD_PAGE(dp)); | |
| 55 | − init_page_count(PD_PAGE(dp)); | |
| 56 | − | |
| 57 | − return; | |
| 58 | −} | |
| 59 | − | |
| 60 | −pmd_t *get_pointer_table (void) | |
| 61 | −{ | |
| 62 | − ptable_desc *dp = ptable_list.next; | |
| 63 | − unsigned char mask = PD_MARKBITS (dp); | |
| 64 | − unsigned char tmp; | |
| 65 | − unsigned int off; | |
| 66 | − | |
| 67 | − /* | |
| 68 | − * For a pointer table for a user process address space, a | |
| 69 | − * table is taken from a page allocated for the purpose. Each | |
| 70 | − * page can hold 8 pointer tables. The page is remapped in | |
| 71 | − * virtual address space to be noncacheable. | |
| 72 | − */ | |
| 73 | − if (mask == 0) { | |
| 74 | − void *page; | |
| 75 | − ptable_desc *new; | |
| 76 | − | |
| 77 | − if (!(page = (void *)get_zeroed_page(GFP_KERNEL))) | |
| 78 | − return NULL; | |
| 79 | − | |
| 80 | − flush_tlb_kernel_page(page); | |
| 81 | − nocache_page(page); | |
| 82 | − | |
| 83 | − new = PD_PTABLE(page); | |
| 84 | − PD_MARKBITS(new) = 0xfe; | |
| 85 | − list_add_tail(new, dp); | |
| 86 | − | |
| 87 | − return (pmd_t *)page; | |
| 88 | − } | |
| 89 | − | |
| 90 | − for (tmp = 1, off = 0; (mask & tmp) == 0; tmp <<= 1, off += PTABLE_SIZE) | |
| 91 | − ; | |
| 92 | − PD_MARKBITS(dp) = mask & ~tmp; | |
| 93 | − if (!PD_MARKBITS(dp)) { | |
| 94 | − /* move to end of list */ | |
| 95 | − list_move_tail(dp, &ptable_list); | |
| 96 | − } | |
| 97 | − return (pmd_t *) (page_address(PD_PAGE(dp)) + off); | |
| 98 | −} | |
| 99 | − | |
| 100 | −int free_pointer_table (pmd_t *ptable) | |
| 101 | −{ | |
| 102 | − ptable_desc *dp; | |
| 103 | − unsigned long page = (unsigned long)ptable & PAGE_MASK; | |
| 104 | − unsigned char mask = 1 << (((unsigned long)ptable - page)/PTABLE_SIZE); | |
| 105 | − | |
| 106 | − dp = PD_PTABLE(page); | |
| 107 | − if (PD_MARKBITS (dp) & mask) | |
| 108 | − panic ("table already free!"); | |
| 109 | − | |
| 110 | − PD_MARKBITS (dp) |= mask; | |
| 111 | − | |
| 112 | − if (PD_MARKBITS(dp) == 0xff) { | |
| 113 | − /* all tables in page are free, free page */ | |
| 114 | − list_del(dp); | |
| 115 | − cache_page((void *)page); | |
| 116 | − free_page (page); | |
| 117 | − return 1; | |
| 118 | − } else if (ptable_list.next != dp) { | |
| 119 | − /* | |
| 120 | − * move this descriptor to the front of the list, since | |
| 121 | − * it has one or more free tables. | |
| 122 | − */ | |
| 123 | − list_move(dp, &ptable_list); | |
| 124 | − } | |
| 125 | − return 0; | |
| 126 | −} | |
| 127 | − | |
| 128 | 25 | /* invalidate page in both caches */ |
| 129 | 26 | static inline void clear040(unsigned long paddr) |
| 130 | 27 | { |
| @@ -45,34 +45,185 @@ unsigned long mm_cachebits; · 44 unmodified lines | ||
| 45 | 45 | EXPORT_SYMBOL(mm_cachebits); |
| 46 | 46 | #endif |
| 47 | 47 | |
| 48 | + | |
| 49 | +/* | |
| 50 | + * Motorola 680x0 user's manual recommends using uncached memory for address | |
| 51 | + * translation tables. | |
| 52 | + * | |
| 53 | + * Seeing how the MMU can be external on (some of) these chips, that seems like | |
| 54 | + * a very important recommendation to follow. Provide some helpers to combat | |
| 55 | + * 'variation' amongst the users of this. | |
| 56 | + */ | |
| 57 | + | |
| 58 | +void mmu_page_ctor(void *page) | |
| 59 | +{ | |
| 60 | + __flush_page_to_ram(page); | |
| 61 | + flush_tlb_kernel_page(page); | |
| 62 | + nocache_page(page); | |
| 63 | +} | |
| 64 | + | |
| 65 | +void mmu_page_dtor(void *page) | |
| 66 | +{ | |
| 67 | + cache_page(page); | |
| 68 | +} | |
| 69 | + | |
| 70 | +/* ++andreas: {get,free}_pointer_table rewritten to use unused fields from | |
| 71 | + struct page instead of separately kmalloced struct. Stolen from | |
| 72 | + arch/sparc/mm/srmmu.c ... */ | |
| 73 | + | |
| 74 | +typedef struct list_head ptable_desc; | |
| 75 | + | |
| 76 | +static struct list_head ptable_list[2] = { | |
| 77 | + LIST_HEAD_INIT(ptable_list[0]), | |
| 78 | + LIST_HEAD_INIT(ptable_list[1]), | |
| 79 | +}; | |
| 80 | + | |
| 81 | +#define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(page)->lru)) | |
| 82 | +#define PD_PAGE(ptable) (list_entry(ptable, struct page, lru)) | |
| 83 | +#define PD_MARKBITS(dp) (*(unsigned int *)&PD_PAGE(dp)->index) | |
| 84 | + | |
| 85 | +static const int ptable_shift[2] = { | |
| 86 | + 7+2, /* PGD, PMD */ | |
| 87 | + 6+2, /* PTE */ | |
| 88 | +}; | |
| 89 | + | |
| 90 | +#define ptable_size(type) (1U << ptable_shift[type]) | |
| 91 | +#define ptable_mask(type) ((1U << (PAGE_SIZE / ptable_size(type))) - 1) | |
| 92 | + | |
| 93 | +void __init init_pointer_table(void *table, int type) | |
| 94 | +{ | |
| 95 | + ptable_desc *dp; | |
| 96 | + unsigned long ptable = (unsigned long)table; | |
| 97 | + unsigned long page = ptable & PAGE_MASK; | |
| 98 | + unsigned int mask = 1U << ((ptable - page)/ptable_size(type)); | |
| 99 | + | |
| 100 | + dp = PD_PTABLE(page); | |
| 101 | + if (!(PD_MARKBITS(dp) & mask)) { | |
| 102 | + PD_MARKBITS(dp) = ptable_mask(type); | |
| 103 | + list_add(dp, &ptable_list[type]); | |
| 104 | + } | |
| 105 | + | |
| 106 | + PD_MARKBITS(dp) &= ~mask; | |
| 107 | + pr_debug("init_pointer_table: %lx, %x\n", ptable, PD_MARKBITS(dp)); | |
| 108 | + | |
| 109 | + /* unreserve the page so it's possible to free that page */ | |
| 110 | + __ClearPageReserved(PD_PAGE(dp)); | |
| 111 | + init_page_count(PD_PAGE(dp)); | |
| 112 | + | |
| 113 | + return; | |
| 114 | +} | |
| 115 | + | |
| 116 | +void *get_pointer_table(int type) | |
| 117 | +{ | |
| 118 | + ptable_desc *dp = ptable_list[type].next; | |
| 119 | + unsigned int mask = list_empty(&ptable_list[type]) ? 0 : PD_MARKBITS(dp); | |
| 120 | + unsigned int tmp, off; | |
| 121 | + | |
| 122 | + /* | |
| 123 | + * For a pointer table for a user process address space, a | |
| 124 | + * table is taken from a page allocated for the purpose. Each | |
| 125 | + * page can hold 8 pointer tables. The page is remapped in | |
| 126 | + * virtual address space to be noncacheable. | |
| 127 | + */ | |
| 128 | + if (mask == 0) { | |
| 129 | + void *page; | |
| 130 | + ptable_desc *new; | |
| 131 | + | |
| 132 | + if (!(page = (void *)get_zeroed_page(GFP_KERNEL))) | |
| 133 | + return NULL; | |
| 134 | + | |
| 135 | + if (type == TABLE_PTE) { | |
| 136 | + /* | |
| 137 | + * m68k doesn't have SPLIT_PTE_PTLOCKS for not having | |
| 138 | + * SMP. | |
| 139 | + */ | |
| 140 | + pgtable_pte_page_ctor(virt_to_page(page)); | |
| 141 | + } | |
| 142 | + | |
| 143 | + mmu_page_ctor(page); | |
| 144 | + | |
| 145 | + new = PD_PTABLE(page); | |
| 146 | + PD_MARKBITS(new) = ptable_mask(type) - 1; | |
| 147 | + list_add_tail(new, dp); | |
| 148 | + | |
| 149 | + return (pmd_t *)page; | |
| 150 | + } | |
| 151 | + | |
| 152 | + for (tmp = 1, off = 0; (mask & tmp) == 0; tmp <<= 1, off += ptable_size(type)) | |
| 153 | + ; | |
| 154 | + PD_MARKBITS(dp) = mask & ~tmp; | |
| 155 | + if (!PD_MARKBITS(dp)) { | |
| 156 | + /* move to end of list */ | |
| 157 | + list_move_tail(dp, &ptable_list[type]); | |
| 158 | + } | |
| 159 | + return page_address(PD_PAGE(dp)) + off; | |
| 160 | +} | |
| 161 | + | |
| 162 | +int free_pointer_table(void *table, int type) | |
| 163 | +{ | |
| 164 | + ptable_desc *dp; | |
| 165 | + unsigned long ptable = (unsigned long)table; | |
| 166 | + unsigned long page = ptable & PAGE_MASK; | |
| 167 | + unsigned int mask = 1U << ((ptable - page)/ptable_size(type)); | |
| 168 | + | |
| 169 | + dp = PD_PTABLE(page); | |
| 170 | + if (PD_MARKBITS (dp) & mask) | |
| 171 | + panic ("table already free!"); | |
| 172 | + | |
| 173 | + PD_MARKBITS (dp) |= mask; | |
| 174 | + | |
| 175 | + if (PD_MARKBITS(dp) == ptable_mask(type)) { | |
| 176 | + /* all tables in page are free, free page */ | |
| 177 | + list_del(dp); | |
| 178 | + mmu_page_dtor((void *)page); | |
| 179 | + if (type == TABLE_PTE) | |
| 180 | + pgtable_pte_page_dtor(virt_to_page(page)); | |
| 181 | + free_page (page); | |
| 182 | + return 1; | |
| 183 | + } else if (ptable_list[type].next != dp) { | |
| 184 | + /* | |
| 185 | + * move this descriptor to the front of the list, since | |
| 186 | + * it has one or more free tables. | |
| 187 | + */ | |
| 188 | + list_move(dp, &ptable_list[type]); | |
| 189 | + } | |
| 190 | + return 0; | |
| 191 | +} | |
| 192 | + | |
| 48 | 193 | /* size of memory already mapped in head.S */ |
| 49 | 194 | extern __initdata unsigned long m68k_init_mapped_size; |
| 50 | 195 | |
| 51 | 196 | extern unsigned long availmem; |
| 52 | 197 | |
| 198 | +static pte_t *last_pte_table __initdata = NULL; | |
| 199 | + | |
| 53 | 200 | static pte_t * __init kernel_page_table(void) |
| 54 | 201 | { |
| 55 | − pte_t *ptablep; | |
| 202 | + pte_t *pte_table = last_pte_table; | |
| 56 | 203 | |
| 57 | − ptablep = (pte_t *)memblock_alloc_low(PAGE_SIZE, PAGE_SIZE); | |
| 58 | − if (!ptablep) | |
| 59 | − panic("%s: Failed to allocate %lu bytes align=%lx\n", | |
| 60 | − __func__, PAGE_SIZE, PAGE_SIZE); | |
| 204 | + if (((unsigned long)last_pte_table & ~PAGE_MASK) == 0) { | |
| 205 | + pte_table = (pte_t *)memblock_alloc_low(PAGE_SIZE, PAGE_SIZE); | |
| 206 | + if (!pte_table) { | |
| 207 | + panic("%s: Failed to allocate %lu bytes align=%lx\n", | |
| 208 | + __func__, PAGE_SIZE, PAGE_SIZE); | |
| 209 | + } | |
| 61 | 210 | |
| 62 | − clear_page(ptablep); | |
| 63 | − __flush_page_to_ram(ptablep); | |
| 64 | − flush_tlb_kernel_page(ptablep); | |
| 65 | − nocache_page(ptablep); | |
| 211 | + clear_page(pte_table); | |
| 212 | + mmu_page_ctor(pte_table); | |
| 66 | 213 | |
| 67 | − return ptablep; | |
| 214 | + last_pte_table = pte_table; | |
| 215 | + } | |
| 216 | + | |
| 217 | + last_pte_table += PTRS_PER_PTE; | |
| 218 | + | |
| 219 | + return pte_table; | |
| 68 | 220 | } |
| 69 | 221 | |
| 70 | −static pmd_t *last_pgtable __initdata = NULL; | |
| 71 | −pmd_t *zero_pgtable __initdata = NULL; | |
| 222 | +static pmd_t *last_pmd_table __initdata = NULL; | |
| 72 | 223 | |
| 73 | 224 | static pmd_t * __init kernel_ptr_table(void) |
| 74 | 225 | { |
| 75 | − if (!last_pgtable) { | |
| 226 | + if (!last_pmd_table) { | |
| 76 | 227 | unsigned long pmd, last; |
| 77 | 228 | int i; |
| 78 | 229 | |
| @@ -91,33 +242,29 @@ static pmd_t * __init kernel_ptr_table(void) · 12 unmodified lines | ||
| 91 | 242 | last = pmd; |
| 92 | 243 | } |
| 93 | 244 | |
| 94 | − last_pgtable = (pmd_t *)last; | |
| 245 | + last_pmd_table = (pmd_t *)last; | |
| 95 | 246 | #ifdef DEBUG |
| 96 | − printk("kernel_ptr_init: %p\n", last_pgtable); | |
| 247 | + printk("kernel_ptr_init: %p\n", last_pmd_table); | |
| 97 | 248 | #endif |
| 98 | 249 | } |
| 99 | 250 | |
| 100 | − last_pgtable += PTRS_PER_PMD; | |
| 101 | − if (((unsigned long)last_pgtable & ~PAGE_MASK) == 0) { | |
| 102 | − last_pgtable = (pmd_t *)memblock_alloc_low(PAGE_SIZE, | |
| 251 | + last_pmd_table += PTRS_PER_PMD; | |
| 252 | + if (((unsigned long)last_pmd_table & ~PAGE_MASK) == 0) { | |
| 253 | + last_pmd_table = (pmd_t *)memblock_alloc_low(PAGE_SIZE, | |
| 103 | 254 | PAGE_SIZE); |
| 104 | − if (!last_pgtable) | |
| 255 | + if (!last_pmd_table) | |
| 105 | 256 | panic("%s: Failed to allocate %lu bytes align=%lx\n", |
| 106 | 257 | __func__, PAGE_SIZE, PAGE_SIZE); |
| 107 | 258 | |
| 108 | − clear_page(last_pgtable); | |
| 109 | − __flush_page_to_ram(last_pgtable); | |
| 110 | − flush_tlb_kernel_page(last_pgtable); | |
| 111 | − nocache_page(last_pgtable); | |
| 259 | + clear_page(last_pmd_table); | |
| 260 | + mmu_page_ctor(last_pmd_table); | |
| 112 | 261 | } |
| 113 | 262 | |
| 114 | − return last_pgtable; | |
| 263 | + return last_pmd_table; | |
| 115 | 264 | } |
| 116 | 265 | |
| 117 | 266 | static void __init map_node(int node) |
| 118 | 267 | { |
| 119 | −#define PTRTREESIZE (256*1024) | |
| 120 | −#define ROOTTREESIZE (32*1024*1024) | |
| 121 | 268 | unsigned long physaddr, virtaddr, size; |
| 122 | 269 | pgd_t *pgd_dir; |
| 123 | 270 | p4d_t *p4d_dir; |
| @@ -135,21 +282,21 @@ static void __init map_node(int node) · 11 unmodified lines | ||
| 135 | 282 | |
| 136 | 283 | while (size > 0) { |
| 137 | 284 | #ifdef DEBUG |
| 138 | − if (!(virtaddr & (PTRTREESIZE-1))) | |
| 285 | + if (!(virtaddr & (PMD_SIZE-1))) | |
| 139 | 286 | printk ("\npa=%#lx va=%#lx ", physaddr & PAGE_MASK, |
| 140 | 287 | virtaddr); |
| 141 | 288 | #endif |
| 142 | 289 | pgd_dir = pgd_offset_k(virtaddr); |
| 143 | 290 | if (virtaddr && CPU_IS_020_OR_030) { |
| 144 | − if (!(virtaddr & (ROOTTREESIZE-1)) && | |
| 145 | − size >= ROOTTREESIZE) { | |
| 291 | + if (!(virtaddr & (PGDIR_SIZE-1)) && | |
| 292 | + size >= PGDIR_SIZE) { | |
| 146 | 293 | #ifdef DEBUG |
| 147 | 294 | printk ("[very early term]"); |
| 148 | 295 | #endif |
| 149 | 296 | pgd_val(*pgd_dir) = physaddr; |
| 150 | − size -= ROOTTREESIZE; | |
| 151 | − virtaddr += ROOTTREESIZE; | |
| 152 | − physaddr += ROOTTREESIZE; | |
| 297 | + size -= PGDIR_SIZE; | |
| 298 | + virtaddr += PGDIR_SIZE; | |
| 299 | + physaddr += PGDIR_SIZE; | |
| 153 | 300 | continue; |
| 154 | 301 | } |
| 155 | 302 | } |
| @@ -169,24 +316,23 @@ static void __init map_node(int node) · 13 unmodified lines | ||
| 169 | 316 | #ifdef DEBUG |
| 170 | 317 | printk ("[early term]"); |
| 171 | 318 | #endif |
| 172 | − pmd_dir->pmd[(virtaddr/PTRTREESIZE) & 15] = physaddr; | |
| 173 | − physaddr += PTRTREESIZE; | |
| 319 | + pmd_val(*pmd_dir) = physaddr; | |
| 320 | + physaddr += PMD_SIZE; | |
| 174 | 321 | } else { |
| 175 | 322 | int i; |
| 176 | 323 | #ifdef DEBUG |
| 177 | 324 | printk ("[zero map]"); |
| 178 | 325 | #endif |
| 179 | − zero_pgtable = kernel_ptr_table(); | |
| 180 | − pte_dir = (pte_t *)zero_pgtable; | |
| 181 | − pmd_dir->pmd[0] = virt_to_phys(pte_dir) | | |
| 182 | − _PAGE_TABLE | _PAGE_ACCESSED; | |
| 326 | + pte_dir = kernel_page_table(); | |
| 327 | + pmd_set(pmd_dir, pte_dir); | |
| 328 | + | |
| 183 | 329 | pte_val(*pte_dir++) = 0; |
| 184 | 330 | physaddr += PAGE_SIZE; |
| 185 | − for (i = 1; i < 64; physaddr += PAGE_SIZE, i++) | |
| 331 | + for (i = 1; i < PTRS_PER_PTE; physaddr += PAGE_SIZE, i++) | |
| 186 | 332 | pte_val(*pte_dir++) = physaddr; |
| 187 | 333 | } |
| 188 | − size -= PTRTREESIZE; | |
| 189 | − virtaddr += PTRTREESIZE; | |
| 334 | + size -= PMD_SIZE; | |
| 335 | + virtaddr += PMD_SIZE; | |
| 190 | 336 | } else { |
| 191 | 337 | if (!pmd_present(*pmd_dir)) { |
| 192 | 338 | #ifdef DEBUG |
| @@ -25,7 +25,7 @@ · 24 unmodified lines | ||
| 25 | 25 | * dio_device_id structure or %NULL if there is no match. |
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | −const struct dio_device_id * | |
| 28 | +static const struct dio_device_id * | |
| 29 | 29 | dio_match_device(const struct dio_device_id *ids, |
| 30 | 30 | const struct dio_dev *d) |
| 31 | 31 | { |
| @@ -105,9 +105,9 @@ void dio_unregister_driver(struct dio_driver *drv) · 73 unmodified lines | ||
| 105 | 105 | * @dev: the DIO device structure to match against |
| 106 | 106 | * @drv: the &device_driver that points to the array of DIO device id structures to search |
| 107 | 107 | * |
| 108 | − * Used by a driver to check whether a DIO device present in the | |
| 109 | − * system is in its list of supported devices. Returns the matching | |
| 110 | − * dio_device_id structure or %NULL if there is no match. | |
| 108 | + * Used by the driver core to check whether a DIO device present in the | |
| 109 | + * system is in a driver's list of supported devices. Returns 1 if supported, | |
| 110 | + * and 0 if there is no match. | |
| 111 | 111 | */ |
| 112 | 112 | |
| 113 | 113 | static int dio_bus_match(struct device *dev, struct device_driver *drv) |
| @@ -137,7 +137,6 @@ static int __init dio_driver_init(void) · 23 unmodified lines | ||
| 137 | 137 | |
| 138 | 138 | postcore_initcall(dio_driver_init); |
| 139 | 139 | |
| 140 | −EXPORT_SYMBOL(dio_match_device); | |
| 141 | 140 | EXPORT_SYMBOL(dio_register_driver); |
| 142 | 141 | EXPORT_SYMBOL(dio_unregister_driver); |
| 143 | 142 | EXPORT_SYMBOL(dio_bus_type); |
| @@ -12,6 +12,8 @@ · 11 unmodified lines | ||
| 12 | 12 | * for more details. |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | +#include <linux/build_bug.h> | |
| 16 | + | |
| 15 | 17 | |
| 16 | 18 | /* |
| 17 | 19 | * Basic transpose step |
| @@ -27,8 +29,6 @@ static inline void _transp(u32 d[], unsigned int i1, unsigned int i2, · 9 unmodified lines | ||
| 27 | 29 | } |
| 28 | 30 | |
| 29 | 31 | |
| 30 | −extern void c2p_unsupported(void); | |
| 31 | − | |
| 32 | 32 | static __always_inline u32 get_mask(unsigned int n) |
| 33 | 33 | { |
| 34 | 34 | switch (n) { |
| @@ -48,7 +48,7 @@ static __always_inline u32 get_mask(unsigned int n) · 13 unmodified lines | ||
| 48 | 48 | return 0x0000ffff; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | − c2p_unsupported(); | |
| 51 | + BUILD_BUG(); | |
| 52 | 52 | return 0; |
| 53 | 53 | } |
| 54 | 54 | |
| @@ -91,7 +91,7 @@ static __always_inline void transp8(u32 d[], unsigned int n, unsigned int m) · 36 unmodified lines | ||
| 91 | 91 | return; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | − c2p_unsupported(); | |
| 94 | + BUILD_BUG(); | |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | |
| @@ -118,7 +118,7 @@ static __always_inline void transp4(u32 d[], unsigned int n, unsigned int m) · 20 unmodified lines | ||
| 118 | 118 | return; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | − c2p_unsupported(); | |
| 121 | + BUILD_BUG(); | |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | |
| @@ -138,7 +138,7 @@ static __always_inline void transp4x(u32 d[], unsigned int n, unsigned int m) · 13 unmodified lines | ||
| 138 | 138 | return; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | − c2p_unsupported(); | |
| 141 | + BUILD_BUG(); | |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | |
| @@ -28,7 +28,7 @@ · 27 unmodified lines | ||
| 28 | 28 | * zorro_device_id structure or %NULL if there is no match. |
| 29 | 29 | */ |
| 30 | 30 | |
| 31 | −const struct zorro_device_id * | |
| 31 | +static const struct zorro_device_id * | |
| 32 | 32 | zorro_match_device(const struct zorro_device_id *ids, |
| 33 | 33 | const struct zorro_dev *z) |
| 34 | 34 | { |
| @@ -39,7 +39,6 @@ zorro_match_device(const struct zorro_device_id *ids, · 4 unmodified lines | ||
| 39 | 39 | } |
| 40 | 40 | return NULL; |
| 41 | 41 | } |
| 42 | −EXPORT_SYMBOL(zorro_match_device); | |
| 43 | 42 | |
| 44 | 43 | |
| 45 | 44 | static int zorro_device_probe(struct device *dev) |
| @@ -120,9 +119,9 @@ EXPORT_SYMBOL(zorro_unregister_driver); · 74 unmodified lines | ||
| 120 | 119 | * @ids: array of Zorro device id structures to search in |
| 121 | 120 | * @dev: the Zorro device structure to match against |
| 122 | 121 | * |
| 123 | − * Used by a driver to check whether a Zorro device present in the | |
| 124 | − * system is in its list of supported devices.Returns the matching | |
| 125 | − * zorro_device_id structure or %NULL if there is no match. | |
| 122 | + * Used by the driver core to check whether a Zorro device present in the | |
| 123 | + * system is in a driver's list of supported devices. Returns 1 if | |
| 124 | + * supported, and 0 if there is no match. | |
| 126 | 125 | */ |
| 127 | 126 | |
| 128 | 127 | static int zorro_bus_match(struct device *dev, struct device_driver *drv) |
| @@ -134,12 +133,7 @@ static int zorro_bus_match(struct device *dev, struct device_driver *drv) · 5 unmodified lines | ||
| 134 | 133 | if (!ids) |
| 135 | 134 | return 0; |
| 136 | 135 | |
| 137 | − while (ids->id) { | |
| 138 | − if (ids->id == ZORRO_WILDCARD || ids->id == z->id) | |
| 139 | − return 1; | |
| 140 | − ids++; | |
| 141 | − } | |
| 142 | − return 0; | |
| 136 | + return !!zorro_match_device(ids, z); | |
| 143 | 137 | } |
| 144 | 138 | |
| 145 | 139 | static int zorro_uevent(struct device *dev, struct kobj_uevent_env *env) |
| @@ -41,7 +41,7 @@ struct zorro_dev *zorro_autocon; · 40 unmodified lines | ||
| 41 | 41 | |
| 42 | 42 | struct zorro_bus { |
| 43 | 43 | struct device dev; |
| 44 | − struct zorro_dev devices[0]; | |
| 44 | + struct zorro_dev devices[]; | |
| 45 | 45 | }; |
| 46 | 46 | |
| 47 | 47 | |
| @@ -1,5 +1,12 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | 2 | |
| 3 | + /* | |
| 4 | + * Zorro bus | |
| 5 | + */ | |
| 6 | + | |
| 7 | +extern struct bus_type zorro_bus_type; | |
| 8 | + | |
| 9 | + | |
| 3 | 10 | #ifdef CONFIG_ZORRO_NAMES |
| 4 | 11 | extern void zorro_name_device(struct zorro_dev *z); |
| 5 | 12 | #else |
| @@ -247,11 +247,6 @@ extern int dio_create_sysfs_dev_files(struct dio_dev *); · 246 unmodified lines | ||
| 247 | 247 | /* New-style probing */ |
| 248 | 248 | extern int dio_register_driver(struct dio_driver *); |
| 249 | 249 | extern void dio_unregister_driver(struct dio_driver *); |
| 250 | −extern const struct dio_device_id *dio_match_device(const struct dio_device_id *ids, const struct dio_dev *z); | |
| 251 | −static inline struct dio_driver *dio_dev_driver(const struct dio_dev *d) | |
| 252 | −{ | |
| 253 | − return d->driver; | |
| 254 | −} | |
| 255 | 250 | |
| 256 | 251 | #define dio_resource_start(d) ((d)->resource.start) |
| 257 | 252 | #define dio_resource_end(d) ((d)->resource.end) |
| @@ -40,13 +40,6 @@ struct zorro_dev { · 39 unmodified lines | ||
| 40 | 40 | #define to_zorro_dev(n) container_of(n, struct zorro_dev, dev) |
| 41 | 41 | |
| 42 | 42 | |
| 43 | − /* | |
| 44 | − * Zorro bus | |
| 45 | − */ | |
| 46 | − | |
| 47 | −extern struct bus_type zorro_bus_type; | |
| 48 | − | |
| 49 | − | |
| 50 | 43 | /* |
| 51 | 44 | * Zorro device drivers |
| 52 | 45 | */ |
| @@ -70,11 +63,6 @@ struct zorro_driver { · 17 unmodified lines | ||
| 70 | 63 | /* New-style probing */ |
| 71 | 64 | extern int zorro_register_driver(struct zorro_driver *); |
| 72 | 65 | extern void zorro_unregister_driver(struct zorro_driver *); |
| 73 | −extern const struct zorro_device_id *zorro_match_device(const struct zorro_device_id *ids, const struct zorro_dev *z); | |
| 74 | −static inline struct zorro_driver *zorro_dev_driver(const struct zorro_dev *z) | |
| 75 | −{ | |
| 76 | − return z->driver; | |
| 77 | −} | |
| 78 | 66 | |
| 79 | 67 | |
| 80 | 68 | extern unsigned int zorro_num_autocon; /* # of autoconfig devices found */ |