Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irqchip/gic-phytium-2500: Remove sync_access callback and make distri… #12

Closed
wants to merge 35 commits into from

Conversation

opsiff
Copy link
Member

@opsiff opsiff commented Nov 13, 2024

…butor priorities variables

Fix compile error during the two upstream commits: commit:
a6156e7: irqchip/gic-v3: Make distributor priorities variables e95c64a: irqchip/gic-common: Remove sync_access callback

Log:
drivers/irqchip/irq-gic-phytium-2500.c: In function ‘gic_dist_init’: drivers/irqchip/irq-gic-phytium-2500.c:948:40: error: ‘GICD_INT_DEF_PRI_X4’ undeclared (first use in this function); did you mean ‘GICD_INT_DEF_PRI’?
948 | writel_relaxed(GICD_INT_DEF_PRI_X4, base + GICD_IPRIORITYRnE + i);
| ^~~~~~~~~~~~~~~~~~~
| GICD_INT_DEF_PRI
drivers/irqchip/irq-gic-phytium-2500.c:948:40: note: each undeclared identifier is reported only once for each function it appears in
In file included from ./include/uapi/linux/posix_types.h:5,
from ./include/uapi/linux/types.h:14,
from ./include/linux/types.h:6,
from ./include/linux/kasan-checks.h:5,
from ./include/asm-generic/rwonce.h:26,
from ./arch/arm64/include/asm/rwonce.h:71,
from ./include/linux/compiler.h:317,
from ./include/linux/build_bug.h:5,
from ./include/linux/bits.h:22,
from ./include/linux/ioport.h:13,
from ./include/linux/acpi.h:12,
from drivers/irqchip/irq-gic-phytium-2500.c:8:
./include/linux/stddef.h:8:14: error: passing argument 3 of ‘gic_dist_config’ makes integer from pointer without a cast [-Werror=int-conversion]
8 | #define NULL ((void *)0)
| ^~~~~~~~~~~
| |
| void *
drivers/irqchip/irq-gic-phytium-2500.c:951:52: note: in expansion of macro ‘NULL’
951 | gic_dist_config(base, GIC_LINE_NR, NULL);
| ^~~~
In file included from drivers/irqchip/irq-gic-phytium-2500.c:31:
drivers/irqchip/irq-gic-common.h:25:59: note: expected ‘u8’ {aka ‘unsigned char’} but argument is of type ‘void *’
25 | void gic_dist_config(void __iomem *base, int gic_irqs, u8 priority);
| ~~~^~~~~~~~
drivers/irqchip/irq-gic-phytium-2500.c: In function ‘gic_cpu_init’:
drivers/irqchip/irq-gic-phytium-2500.c:1298:9: error: too few arguments to function ‘gic_cpu_config’
1298 | gic_cpu_config(rbase, gic_data.ppi_nr + 16);
| ^~~~~~~~~~~~~~
drivers/irqchip/irq-gic-common.h:26:6: note: declared here
26 | void gic_cpu_config(void __iomem *base, int nr, u8 priority);
| ^~~~~~~~~~~~~~
./include/linux/stddef.h:8:14: error: passing argument 3 of ‘gic_cpu_config’ makes integer from pointer without a cast [-Werror=int-conversion]
8 | #define NULL ((void *)0)
| ^~~~~~~~~~~
| |
| void *
drivers/irqchip/irq-gic-phytium-2500.c:1310:69: note: in expansion of macro ‘NULL’
1310 | gic_cpu_config(rbase, gic_data.ppi_nr + 16, NULL);
| ^~~~
drivers/irqchip/irq-gic-common.h:26:52: note: expected ‘u8’ {aka ‘unsigned char’} but argument is of type ‘void *’
26 | void gic_cpu_config(void __iomem *base, int nr, u8 priority);
| ~~~^~~~~~~~
cc1: all warnings being treated as errors
make[7]: *** [scripts/Makefile.build:229:drivers/irqchip/irq-gic-phytium-2500.o] 错误 1
make[6]: *** [scripts/Makefile.build:478:drivers/irqchip] 错误 2
make[5]: *** [scripts/Makefile.build:478:drivers] 错误 2

Avenger-285714 and others added 30 commits November 12, 2024 19:49
This driver comes from Guangruntong Cooperation, which provides
support for Guangruntong ethernet card.

Signed-off-by: Shunkui Hu <[email protected]>
Signed-off-by: WangYuli <[email protected]>
When exec "make clean" after "make distclean", here is follow errors:

drivers/net/ethernet/guangruntong/Makefile:30: *** Cannot find common.mk build rules. Stopped.

Signed-off-by: WangYuli <[email protected]>
…eries Network Card

This NIC driver supports the following features:
 *Supports IP/TCP/UDP/SCTP checksum offload.
  Support TSO, LRO segments and segments.
  Support RSS, support to modify the number of queues,
Ring Buffer and Hash Key of RSS. Support packet Hash to multi-queue.
  Support VLAN offloading, stripping, and filtering.
  Support VXLAN, GENEVE, NVGRE tunnel offloading.
  Support virtualization, SRIOV virtualization for 64 VF.
  Support link awareness, CPU offloading, RSS, QoS for VF.
  Supports Port VLAN, VLAN sub interfaces, and QinQ for VF.
  VXLAN, GENEVE, and NVGRE offloading support for VF.
  Support VF to deploy VM in KVM (VEB, Private, VEPA, Direct).
  Support network isolation and address reuse for VF.
  Supports Openstack and Kubernetes cloud environments.

Link: https://portrait.gitee.com/openeuler/kernel/pulls/5752
Link: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel/pulls/139
Signed-off-by: Hui Li <[email protected]>
Signed-off-by: Hongyi Du <[email protected]>
Signed-off-by: Xiaojun Zhao <[email protected]>
Signed-off-by: WangYuli <[email protected]>
…/N6 Network Card drivers

Enable bzwx for x86.

Signed-off-by: Hui Li <[email protected]>
Signed-off-by: Hongyi Du <[email protected]>
Signed-off-by: Xiaojun Zhao <[email protected]>
Signed-off-by: WangYuli <[email protected]>
…N5/N6 Network Card drivers

Enable bzwx for arm64.

Signed-off-by: Hui Li <[email protected]>
Signed-off-by: Hongyi Du <[email protected]>
Signed-off-by: Xiaojun Zhao <[email protected]>
Signed-off-by: WangYuli <[email protected]>
…Xin N5/N6 Network Card drivers

Enable bzwx for Loongarch64.

Signed-off-by: Hui Li <[email protected]>
Signed-off-by: Hongyi Du <[email protected]>
Signed-off-by: Xiaojun Zhao <[email protected]>
Signed-off-by: WangYuli <[email protected]>
support 3SNIC 910/920/930 including following features:

 *1. single-root I/O virtualization (SR-IOV)
  2. virtual machine multi queue (VMMQ)
  3. receive side scaling (RSS)
  4. physical function (PF) passthrough VMs
  5. the PF promiscuous mode,unicast or multicast MAC filtering, and all multicast mode
  6. IPv4/IPv6, checksum offload,TCP Segmentation Offload (TSO), and Large Receive Offload (LRO)
  7. in-band one-click logs collection
  8. loopback tests
  9. port location indicators

product specs:

  Model   Port Config           PCIe
  3S910	  2 x 25GE SFP28	Gen3 x8
  3S920	  4 x 25GE SFP28	Gen4 x16
  3S930	  2 x 100GE QSFP28	Gen4 x16

Link: https://ramaxel.com/
Link: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel/pulls/141
Link: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel/pulls/159
Signed-off-by: weiwei1 <[email protected]>
Signed-off-by: WangYuli <[email protected]>
Enable 3snic for x86.

Signed-off-by: weiwei1 <[email protected]>
Signed-off-by: WangYuli <[email protected]>
Enable 3snic for Loongarch.

Signed-off-by: weiwei1 <[email protected]>
Signed-off-by: WangYuli <[email protected]>
Enable 3snic for arm64.

Signed-off-by: weiwei1 <[email protected]>
Signed-off-by: WangYuli <[email protected]>
pinctrl_gpio_direction_{in,out}put() was revised post-6.6 to include a second
parameter, with the first being the chip and second being the offset as
received by the pinctrl I/O.

Signed-off-by: Mingcong Bai <[email protected]>
The following commit removed structs such as circ_buf and uart_circ_empty.

    commit 1788cf6
    Author: Jiri Slaby (SUSE) <[email protected]>
    Date:   Fri Apr 5 08:08:23 2024 +0200

        tty: serial: switch from circ_buf to kfifo

Adapt module code in accordance with this commit to fix build.

Signed-off-by: Mingcong Bai <[email protected]>
The following commit removed structs such as circ_buf and uart_circ_empty.

    commit 1788cf6
    Author: Jiri Slaby (SUSE) <[email protected]>
    Date:   Fri Apr 5 08:08:23 2024 +0200

        tty: serial: switch from circ_buf to kfifo

Adapt module code in accordance with this commit to fix build.

Signed-off-by: Mingcong Bai <[email protected]>
With 0fcb708, the kernel tree enabled -Werror
for missing function prototypes. Revise source to satisfy this new flag.

Signed-off-by: Mingcong Bai <[email protected]>
With 0fcb708, the kernel tree enabled -Werror
for missing function prototypes. Revise source to satisfy this new flag.

Signed-off-by: Mingcong Bai <[email protected]>
These drivers are so poorly maintained I don't even know how they passed code
review in the first place. I can make them build but I have no device to test.

Disable them for now until I find the time to properly clean them up.

Signed-off-by: Mingcong Bai <[email protected]>
Adapt edac_device_alloc_ctl_info() to changes in:

commit 48bc886
Author: Jiri Slaby (SUSE) <[email protected]>
Date:   Tue Feb 13 12:20:48 2024 +0100

    EDAC: Remove dynamic attributes from edac_device_alloc_ctl_info()

    Dynamic attributes are not passed from any caller of
    edac_device_alloc_ctl_info(). Drop this unused/untested functionality
    completely.

    Signed-off-by: Jiri Slaby (SUSE) <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>

Signed-off-by: Mingcong Bai <[email protected]>
Add missing include for <linux/platform_device.h>.

Signed-off-by: Mingcong Bai <[email protected]>
zhaoxin inclusion
category: feature

-------------------

Add Zhaoxin feature bits on Zhaoxin CPUs.

Signed-off-by: leoliu-oc <[email protected]>
This patch adds support for Phytium GMAC controller which derived from
Synopsys Designware MAC 10/100/1000 Universal. As required by SBBR,
ACPI DSDT is supported as well as device tree.

Signed-off-by: Li Wencheng <[email protected]>
Signed-off-by: Wang Yinfeng <[email protected]>
Signed-off-by: Chen Baozi <[email protected]>
Change-Id: Id72b75c7a398c98b94df07ae92d7aa72bdc4d8ad

Link: https://gitee.com/phytium_embedded/phytium-linux-kernel/commit/bf64fd4ae38b9dee89dfe8b17b79a50eec56961e
[Kexy: Resolved minor conflicts in MAINTAINERS and
 drivers/net/ethernet/stmicro/stmmac/Makefile]
Signed-off-by: Kexy Biscuit <[email protected]>
1. spi: Rename SPI_MASTER_GPIO_SS to SPI_CONTROLLER_GPIO_SS 82238
2. net: stmmac: clarify difference between "interface" and "phy_interface"  a014c35
3. net: stmmac: convert plat->phylink_node to fwnode   e80af2a
4. net: stmmac: Make stmmac_pltfr_remove() return void 3246627
5. Remove IOMMU_CAP_INTR_REMAP, instead rely on the interrupt subsystem 143c7bc
6. i2c: Switch .probe() to not take an id parameter 03c835f
7. drivers: gpio: add #include <linux/seq_file.h>

Signed-off-by: zuoqian <[email protected]>

Link: https://gitee.com/phytium_embedded/phytium-linux-kernel/commit/52a27ae1196d3714b22e430fb43ab9ac2e55e914
[Kexy: Dropped nonexistent files]
Signed-off-by: Kexy Biscuit <[email protected]>
Modify stmmmac driver to support phytium DWMAC controler.

Signed-off-by: Li Wencheng <[email protected]>
Signed-off-by: Chen Baozi <[email protected]>
Signed-off-by: Wang Yinfeng <[email protected]>
Change-Id: I878377c5fb88935dcbc7b83f368ae5408938f890

Link: https://gitee.com/phytium_embedded/phytium-linux-kernel/commit/f18feb0bef4216b257a29d176e7366c7025f3115
[Kexy: Resolved minor conflict in MAINTAINERS]
Signed-off-by: Kexy Biscuit <[email protected]>
Test S3 with net device open will got this cut log.
...
   NETDEV WATCHDOG: eth0 (phytium-dwmac): transmit queue 0 timed out 8532ms
   WARNING: CPU: 2 PID: 0 at net/sched/sch_generic.c:525 dev_watchdog+0x234/0x23c
...

Miss pm function in phytium_dwmac_driver.
So add it.

Signed-off-by: liutianyu1250 <[email protected]>

Link: https://gitee.com/phytium_embedded/phytium-linux-kernel/commit/e4084ab6219ff1e5b2ad5cc68b58be491b3f448f
Signed-off-by: Kexy Biscuit <[email protected]>
Declare phytium_dwmac_remove() as a static function to resolve a missing
prototype warning.

Signed-off-by: Mingcong Bai <[email protected]>

Link: deepin-community@ebb9439
Signed-off-by: Kexy Biscuit <[email protected]>
As Phytium ACPI Description Specification document v1.2 p13
Device HID said for old v1.0 Spec,add FTGM0001 for such as
some FT2000 device compat.

Signed-off-by: Wentao Guan <[email protected]>

Link: deepin-community@f30d845
Signed-off-by: Kexy Biscuit <[email protected]>
Fixes: 731b13ef92e8 ("BACKPORT: PHYTIUM: net/stmmac: Add phytium DWMAC driver support v2")
Fixes: 0edb555 ("platform: Make platform_driver::remove() return void")
Signed-off-by: Kexy Biscuit <[email protected]>
Compat with some quirk platform FT2000/4 as id "FTGM0001",
use rgmii-rxid instead of rgmii (wrong ACPI DSDT),
and set dma_ops and host_dma_width (fix code style).

origin code in k4.19 is following:
acpi_dma_configure(priv->device,DEV_DMA_COHERENT);
static u64 my_mask=0xffffffff;
priv->device->dma_mask = &my_mask;
priv->device->coherent_dma_mask = (u32)~0;
port to k5.10 add:
pdev->dev.dma_ops = NULL;

Signed-off-by: Caicai <[email protected]>
Signed-off-by: hmy <[email protected]>
Signed-off-by: wenlunpeng <[email protected]>
Signed-off-by: Wentao Guan <[email protected]>
Change <asm/unaligned.h> => <linux/unaligned.h> per upstream changes.

Signed-off-by: Mingcong Bai <[email protected]>
Use the new X86_MATCH_VFM macro to match processor models.

This was introduced with commit 13ad484 ("x86/cpu/vfm: Delete
X86_MATCH_INTEL_FAM6_MODEL[_STEPPING]() macros").

Signed-off-by: Mingcong Bai <[email protected]>
MingcongBai and others added 5 commits November 13, 2024 10:58
With commit 74a5b94 ("ARM: Convert to platform remove callback
returning void"), the .remove() callback for platform drivers was
refactored into void (previously int), with the callback renamed as
.remove_new().

Follow the commit and refactor this driver.

Signed-off-by: Mingcong Bai <[email protected]>
With commit 74a5b94 ("ARM: Convert to platform remove callback
returning void"), the .remove() callback for platform drivers was
refactored into void (previously int), with the callback renamed as
.remove_new().

Follow the commit and refactor this driver.

Signed-off-by: Mingcong Bai <[email protected]>
…changes

Follow commit 3c44d31 ("crypto: simd - Do not call crypto_alloc_tfm
during registration") to revise parameters for function
simd_skcipher_create_compat().

Signed-off-by: Mingcong Bai <[email protected]>
This function was not used anywhere.

Signed-off-by: Mingcong Bai <[email protected]>
…butor priorities variables

Fix compile error during the two upstream commits:
commit:
a6156e7: irqchip/gic-v3: Make distributor priorities variables
e95c64a: irqchip/gic-common: Remove sync_access callback

Log:
drivers/irqchip/irq-gic-phytium-2500.c: In function ‘gic_dist_init’:
drivers/irqchip/irq-gic-phytium-2500.c:948:40: error: ‘GICD_INT_DEF_PRI_X4’ undeclared (first use in this function); did you mean ‘GICD_INT_DEF_PRI’?
  948 |                         writel_relaxed(GICD_INT_DEF_PRI_X4, base + GICD_IPRIORITYRnE + i);
      |                                        ^~~~~~~~~~~~~~~~~~~
      |                                        GICD_INT_DEF_PRI
drivers/irqchip/irq-gic-phytium-2500.c:948:40: note: each undeclared identifier is reported only once for each function it appears in
In file included from ./include/uapi/linux/posix_types.h:5,
                 from ./include/uapi/linux/types.h:14,
                 from ./include/linux/types.h:6,
                 from ./include/linux/kasan-checks.h:5,
                 from ./include/asm-generic/rwonce.h:26,
                 from ./arch/arm64/include/asm/rwonce.h:71,
                 from ./include/linux/compiler.h:317,
                 from ./include/linux/build_bug.h:5,
                 from ./include/linux/bits.h:22,
                 from ./include/linux/ioport.h:13,
                 from ./include/linux/acpi.h:12,
                 from drivers/irqchip/irq-gic-phytium-2500.c:8:
./include/linux/stddef.h:8:14: error: passing argument 3 of ‘gic_dist_config’ makes integer from pointer without a cast [-Werror=int-conversion]
    8 | #define NULL ((void *)0)
      |              ^~~~~~~~~~~
      |              |
      |              void *
drivers/irqchip/irq-gic-phytium-2500.c:951:52: note: in expansion of macro ‘NULL’
  951 |                 gic_dist_config(base, GIC_LINE_NR, NULL);
      |                                                    ^~~~
In file included from drivers/irqchip/irq-gic-phytium-2500.c:31:
drivers/irqchip/irq-gic-common.h:25:59: note: expected ‘u8’ {aka ‘unsigned char’} but argument is of type ‘void *’
   25 | void gic_dist_config(void __iomem *base, int gic_irqs, u8 priority);
      |                                                        ~~~^~~~~~~~
drivers/irqchip/irq-gic-phytium-2500.c: In function ‘gic_cpu_init’:
drivers/irqchip/irq-gic-phytium-2500.c:1298:9: error: too few arguments to function ‘gic_cpu_config’
 1298 |         gic_cpu_config(rbase, gic_data.ppi_nr + 16);
      |         ^~~~~~~~~~~~~~
drivers/irqchip/irq-gic-common.h:26:6: note: declared here
   26 | void gic_cpu_config(void __iomem *base, int nr, u8 priority);
      |      ^~~~~~~~~~~~~~
./include/linux/stddef.h:8:14: error: passing argument 3 of ‘gic_cpu_config’ makes integer from pointer without a cast [-Werror=int-conversion]
    8 | #define NULL ((void *)0)
      |              ^~~~~~~~~~~
      |              |
      |              void *
drivers/irqchip/irq-gic-phytium-2500.c:1310:69: note: in expansion of macro ‘NULL’
 1310 |                         gic_cpu_config(rbase, gic_data.ppi_nr + 16, NULL);
      |                                                                     ^~~~
drivers/irqchip/irq-gic-common.h:26:52: note: expected ‘u8’ {aka ‘unsigned char’} but argument is of type ‘void *’
   26 | void gic_cpu_config(void __iomem *base, int nr, u8 priority);
      |                                                 ~~~^~~~~~~~
cc1: all warnings being treated as errors
make[7]: *** [scripts/Makefile.build:229:drivers/irqchip/irq-gic-phytium-2500.o] 错误 1
make[6]: *** [scripts/Makefile.build:478:drivers/irqchip] 错误 2
make[5]: *** [scripts/Makefile.build:478:drivers] 错误 2
@MingcongBai MingcongBai force-pushed the deepin/v6.12-rc7 branch 2 times, most recently from 120f284 to 8ca0093 Compare November 18, 2024 07:14
@MingcongBai
Copy link

Merged as b0bb40f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants