linux/drivers/net/ethernet
Baoquan He 0b1f77e74b asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros
Patch series "mm: ioremap: Convert architectures to take GENERIC_IOREMAP
way", v8.

Motivation and implementation:
==============================
Currently, many architecutres have't taken the standard GENERIC_IOREMAP
way to implement ioremap_prot(), iounmap(), and ioremap_xx(), but make
these functions specifically under each arch's folder.  Those cause many
duplicated code of ioremap() and iounmap().

In this patchset, firstly introduce generic_ioremap_prot() and
generic_iounmap() to extract the generic code for GENERIC_IOREMAP.  By
taking GENERIC_IOREMAP method, the generic generic_ioremap_prot(),
generic_iounmap(), and their generic wrapper ioremap_prot(), ioremap() and
iounmap() are all visible and available to arch.  Arch needs to provide
wrapper functions to override the generic version if there's arch specific
handling in its corresponding ioremap_prot(), ioremap() or iounmap(). 
With these changes, duplicated ioremap/iounmap() code uder ARCH-es are
removed, and the equivalent functioality is kept as before.

Background info:
================

1) The converting more architectures to take GENERIC_IOREMAP way is
   suggested by Christoph in below discussion:
   https://lore.kernel.org/all/Yp7h0Jv6vpgt6xdZ@infradead.org/T/#u

2) In the previous v1 to v3, it's basically further action after arm64
   has converted to GENERIC_IOREMAP way in below patchset.  It's done by
   adding hook ioremap_allowed() and iounmap_allowed() in ARCH to add ARCH
   specific handling the middle of ioremap_prot() and iounmap().

[PATCH v5 0/6] arm64: Cleanup ioremap() and support ioremap_prot()
https://lore.kernel.org/all/20220607125027.44946-1-wangkefeng.wang@huawei.com/T/#u

Later, during v3 reviewing, Christophe Leroy suggested to introduce
generic_ioremap_prot() and generic_iounmap() to generic codes, and ARCH
can provide wrapper function ioremap_prot(), ioremap() or iounmap() if
needed.  Christophe made a RFC patchset as below to specially demonstrate
his idea.  This is what v4 and now v5 is doing.

[RFC PATCH 0/8] mm: ioremap: Convert architectures to take GENERIC_IOREMAP way
https://lore.kernel.org/all/cover.1665568707.git.christophe.leroy@csgroup.eu/T/#u

Testing:
========
In v8, I only applied this patchset onto the latest linus's tree to build
and run on arm64 and s390.


This patch (of 19):

Let's use '#define ioremap_xx' and "#ifdef ioremap_xx" instead.

To remove defined ARCH_HAS_IOREMAP_xx macros in <asm/io.h> of each ARCH,
the ARCH's own ioremap_wc|wt|np definition need be above "#include
<asm-generic/iomap.h>.  Otherwise the redefinition error would be seen
during compiling.  So the relevant adjustments are made to avoid compiling
error:

  loongarch:
  - doesn't include <asm-generic/iomap.h>, defining ARCH_HAS_IOREMAP_WC
    is redundant, so simply remove it.

  m68k:
  - selected GENERIC_IOMAP, <asm-generic/iomap.h> has been added in
    <asm-generic/io.h>, and <asm/kmap.h> is included above
    <asm-generic/iomap.h>, so simply remove ARCH_HAS_IOREMAP_WT defining.

  mips:
  - move "#include <asm-generic/iomap.h>" below ioremap_wc definition
    in <asm/io.h>

  powerpc:
  - remove "#include <asm-generic/iomap.h>" in <asm/io.h> because it's
    duplicated with the one in <asm-generic/io.h>, let's rely on the
    latter.

  x86:
  - selected GENERIC_IOMAP, remove #include <asm-generic/iomap.h> in
    the middle of <asm/io.h>. Let's rely on <asm-generic/io.h>.

Link: https://lkml.kernel.org/r/20230706154520.11257-2-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Helge Deller <deller@gmx.de>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Niklas Schnelle <schnelle@linux.ibm.com>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Brian Cain <bcain@quicinc.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Rich Felker <dalias@libc.org>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-18 10:12:32 -07:00
..
3com 3c589_cs: Fix an error handling path in tc589_probe() 2023-05-22 19:17:58 -07:00
8390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-05-18 14:39:34 -07:00
actions
adaptec
adi
aeroflex
agere
alacritech
allwinner
alteon net: alteon: remove unused len variable 2023-04-02 13:43:43 +01:00
altera net: altera_tse: explicitly disable autoscan on the regmap-mdio bus 2023-06-07 13:30:12 -07:00
amazon net: ena: fix shift-out-of-bounds in exponential backoff 2023-07-12 15:57:57 -07:00
amd pds_core: use vmalloc_array and vcalloc 2023-06-27 09:30:23 -07:00
apm
apple
aquantia net: introduce and use skb_frag_fill_page_desc() 2023-05-13 19:47:56 +01:00
arc net: arc: Make arc_emac_remove() return void 2023-05-19 13:33:28 +01:00
asix
atheros ethernet: atheros: fix return value check in atl1e_tso_csum() 2023-07-24 15:43:02 -07:00
broadcom net: bgmac: postpone turning IRQs off to avoid SoC hangs 2023-07-08 10:02:15 +01:00
brocade bna: Remove error checking for debugfs_create_dir() 2023-07-14 09:09:12 +01:00
cadence net: macb: update PCS driver to use neg_mode 2023-06-22 19:41:02 -07:00
calxeda
cavium Networking changes for 6.5. 2023-06-28 16:43:10 -07:00
chelsio sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
cirrus net: isa: include net/Space.h 2023-05-17 21:27:30 -07:00
cisco
cortina
davicom spi: Updates for v6.4 2023-04-27 11:02:26 -07:00
dec
dlink
emulex benet: fix return value check in be_lancer_xmit_workarounds() 2023-07-27 10:31:38 +02:00
engleder net/sched: taprio: replace tc_taprio_qopt_offload :: enable with a "cmd" enum 2023-05-31 10:00:30 +01:00
ezchip
faraday
freescale net: fec: tx processing does not call XDP APIs if budget is 0 2023-07-26 21:12:12 -07:00
fujitsu
fungible net: tls: make the offload check helper take skb not socket 2023-06-15 09:01:05 +01:00
google gve: unify driver name usage 2023-07-10 08:29:55 +01:00
hisilicon net: hns3: fix wrong bw weight of disabled tc issue 2023-07-24 09:36:23 +01:00
huawei
i825xx net: ethernet: i825xx: sun3_8256: Add SPDX license identifier 2023-05-16 15:38:07 +02:00
ibm ibmvnic: Do not reset dql stats on NON_FATAL err 2023-06-29 11:12:19 -07:00
intel igc: Fix Kernel Panic during ndo_tx_timeout callback 2023-07-26 09:54:40 +01:00
litex net: ethernet: litex: add support for 64 bit stats 2023-06-15 22:56:46 -07:00
marvell octeontx2-af: Fix hash extraction enable configuration 2023-07-25 10:12:26 +02:00
mediatek net: ethernet: mtk_eth_soc: always mtk_get_ib1_pkt_type 2023-07-19 21:15:04 -07:00
mellanox mlx5-fixes-2023-07-05 2023-07-06 19:11:21 -07:00
micrel ksz884x: Remove unused functions 2023-04-12 09:38:19 +01:00
microchip net: lan743x: select FIXED_PHY 2023-07-09 11:23:47 +01:00
microsoft v6.5 merge window RDMA pull request 2023-06-29 21:01:17 -07:00
moxa
mscc drivers:net: fix return value check in ocelot_fdma_receive_skb 2023-07-19 12:27:09 +01:00
myricom net: move gso declarations and functions to their own files 2023-06-10 00:11:41 -07:00
natsemi net/sonic: use dma_mapping_error() for error check 2023-03-21 21:29:34 -07:00
neterion
netronome nfp: clean mc addresses in application firmware when closing port 2023-07-05 10:59:12 -07:00
ni
nvidia forcedeth: Fix an error handling path in nv_probe() 2023-05-22 19:17:28 -07:00
nxp
oki-semi net: pch_gbe: Allow build on MIPS_GENERIC kernel 2023-06-08 19:18:32 -07:00
packetengines
pasemi net: pasemi: Fix return type of pasemi_mac_start_tx() 2023-03-21 13:48:35 +01:00
pensando ionic: remove dead device fail path 2023-07-07 09:14:45 +01:00
qlogic qed/qede: Fix scheduling while atomic 2023-06-06 13:56:18 +02:00
qualcomm drivers: net: fix return value check in emac_tso_csum() 2023-07-19 12:27:09 +01:00
rdc
realtek Revert "r8169: disable ASPM during NAPI poll" 2023-07-19 21:09:11 -07:00
renesas Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-15 22:19:41 -07:00
rocker
samsung net: samsung: sxgbe: Make sxgbe_drv_remove() return void 2023-05-12 08:49:49 +01:00
seeq
sfc asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros 2023-08-18 10:12:32 -07:00
sgi
silan
sis
smsc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-03-30 14:43:03 -07:00
socionext
stmicro net: stmmac: Apply redundant write work around on 4.xx too 2023-07-25 11:03:55 +02:00
sun sunvnet: fix sparc64 build error after gso code split 2023-06-15 22:47:13 -07:00
sunplus ethernet: remove superfluous clearing of phydev 2023-03-22 20:47:27 -07:00
synopsys
tehuti
ti net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field() 2023-07-14 08:36:43 +01:00
toshiba net/ps3_gelic_net: Use dma_mapping_error 2023-03-20 10:20:40 +00:00
tundra
vertexcom
via
wangxun net: ethernet: Remove repeating expression 2023-07-14 09:11:10 +01:00
wiznet
xilinx Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-27 09:45:22 -07:00
xircom
xscale
Kconfig
Makefile
dnet.c
dnet.h
ec_bhf.c ethernet: ec_bhf: Remove redundant pci_clear_master 2023-03-24 09:09:28 +00:00
ethoc.c
fealnx.c
jme.c
jme.h
korina.c
lantiq_etop.c
lantiq_xrx200.c