* Re: [RFC net-next] dt-bindings: net: xilinx: document xilinx emaclite driver binding
From: Rob Herring @ 2022-05-18 0:32 UTC (permalink / raw)
To: Radhey Shyam Pandey
Cc: davem, edumazet, kuba, pabeni, krzysztof.kozlowski+dt,
harini.katakam, netdev, devicetree, linux-kernel, git
In-Reply-To: <1652373596-5994-1-git-send-email-radhey.shyam.pandey@xilinx.com>
On Thu, May 12, 2022 at 10:09:56PM +0530, Radhey Shyam Pandey wrote:
> Add basic description for the xilinx emaclite driver DT bindings.
>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> ---
> .../bindings/net/xlnx,emaclite.yaml | 60 +++++++++++++++++++
> 1 file changed, 60 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/xlnx,emaclite.yaml
>
> diff --git a/Documentation/devicetree/bindings/net/xlnx,emaclite.yaml b/Documentation/devicetree/bindings/net/xlnx,emaclite.yaml
> new file mode 100644
> index 000000000000..a3e2a0e89b24
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/xlnx,emaclite.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/xlnx,emaclite.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Xilinx Emaclite Ethernet controller
> +
> +maintainers:
> + - Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
> + - Harini Katakam <harini.katakam@xilinx.com>
> +
> +properties:
> + compatible:
> + enum:
> + - xlnx,opb-ethernetlite-1.01.a
> + - xlnx,opb-ethernetlite-1.01.b
> + - xlnx,xps-ethernetlite-1.00.a
> + - xlnx,xps-ethernetlite-2.00.a
> + - xlnx,xps-ethernetlite-2.01.a
> + - xlnx,xps-ethernetlite-3.00.a
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + phy-handle: true
> +
> + local-mac-address: true
> +
> + xlnx,tx-ping-pong:
> + type: boolean
> + description: hardware supports tx ping pong buffer.
> +
> + xlnx,rx-ping-pong:
> + type: boolean
> + description: hardware supports rx ping pong buffer.
Are these based on IP version or configuration of IP?
Rob
^ permalink raw reply
* Re: [PATCHv2 net] Documentation: add description for net.core.gro_normal_batch
From: Jakub Kicinski @ 2022-05-18 0:21 UTC (permalink / raw)
To: Xin Long; +Cc: network dev, davem, Edward Cree
In-Reply-To: <21572bb1e0cc55596965148b8fdf31120606480f.1652454155.git.lucien.xin@gmail.com>
On Fri, 13 May 2022 11:02:35 -0400 Xin Long wrote:
> Describe it in admin-guide/sysctl/net.rst like other Network core options.
> Users need to know gro_normal_batch for performance tuning.
>
> v1->v2:
> - Improved the description according to the suggestion from Edward and
> Jakub.
>
> Fixes: 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs")
> Reported-by: Prijesh Patel <prpatel@redhat.com>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
> ---
> Documentation/admin-guide/sysctl/net.rst | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/Documentation/admin-guide/sysctl/net.rst b/Documentation/admin-guide/sysctl/net.rst
> index f86b5e1623c6..5cb99403bf03 100644
> --- a/Documentation/admin-guide/sysctl/net.rst
> +++ b/Documentation/admin-guide/sysctl/net.rst
> @@ -374,6 +374,17 @@ option is set to SOCK_TXREHASH_DEFAULT (i. e. not overridden by setsockopt).
> If set to 1 (default), hash rethink is performed on listening socket.
> If set to 0, hash rethink is not performed.
>
> +gro_normal_batch
> +----------------
> +
> +Maximum number of the segments to batch up for GRO list-RX.
How about s/for GRO list-RX/on output of GRO/ ?
> When a packet exits
> +GRO, either as a coalesced superframe or as an original packet which GRO has
> +decided not to coalesce, it is placed on a per-NAPI list. This list is then
> +passed to the stack when the segments in this list count towards the
> +gro_normal_batch limit.
... when the number of segments reaches the gro_normal_batch limit.
> +
> +Default : 8
Also, should we drop the default? It's easy to grep for, chances are if
anyone updates the value they will forget to change the doc.
Sorry for the late review, I wasn't expecting v3 will be needed.
> 2. /proc/sys/net/unix - Parameters for Unix domain sockets
> ----------------------------------------------------------
>
^ permalink raw reply
* Re: [PATCH net v2 2/2] amt: do not skip remaining handling of advertisement message
From: Taehee Yoo @ 2022-05-18 0:21 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, pabeni, edumazet, netdev
In-Reply-To: <20220517152409.5545f6e8@kernel.org>
On 5/18/22 07:24, Jakub Kicinski wrote:
Hi Jakub,
Thank s a lot for your review!
> On Tue, 17 May 2022 07:05:27 +0000 Taehee Yoo wrote:
>> When a gateway receives an advertisement message, it extracts relay
>> information and then it should be deleted.
>> But the advertisement handler doesn't do that.
>> So, after amt_advertisement_handler(), that message should not be
skipped
>> remaining handling.
>>
>> Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface")
>> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
>
>> diff --git a/drivers/net/amt.c b/drivers/net/amt.c
>> index 2b4ce3869f08..6ce2ecd07640 100644
>> --- a/drivers/net/amt.c
>> +++ b/drivers/net/amt.c
>> @@ -2698,9 +2698,10 @@ static int amt_rcv(struct sock *sk, struct
sk_buff *skb)
>> err = true;
>> goto drop;
>> }
>> - if (amt_advertisement_handler(amt, skb))
>> + err = amt_advertisement_handler(amt, skb);
>> + if (err)
>> amt->dev->stats.rx_dropped++;
>> - goto out;
>> + break;
>> case AMT_MSG_MULTICAST_DATA:
>> if (iph->saddr != amt->remote_ip) {
>> netdev_dbg(amt->dev, "Invalid Relay IP\n");
>
> I guess I'll have to spell it out for you more cause either you didn't
> understand me or I don't understand your reply on v1. Here's the full
> function:
>
> 2669 static int amt_rcv(struct sock *sk, struct sk_buff *skb)
> 2670 {
> 2671 struct amt_dev *amt;
> 2672 struct iphdr *iph;
> 2673 int type;
> 2674 bool err;
> 2675
> 2676 rcu_read_lock_bh();
> 2677 amt = rcu_dereference_sk_user_data(sk);
> 2678 if (!amt) {
> 2679 err = true;
> 2680 goto out;
> 2681 }
> 2682
> 2683 skb->dev = amt->dev;
> 2684 iph = ip_hdr(skb);
> 2685 type = amt_parse_type(skb);
> 2686 if (type == -1) {
> 2687 err = true;
> 2688 goto drop;
> 2689 }
> 2690
> 2691 if (amt->mode == AMT_MODE_GATEWAY) {
> 2692 switch (type) {
> 2693 case AMT_MSG_ADVERTISEMENT:
> 2694 if (iph->saddr != amt->discovery_ip) {
> 2695 netdev_dbg(amt->dev, "Invalid Relay IP\n");
> 2696 err = true;
> 2697 goto drop;
> 2698 }
> 2699 if (amt_advertisement_handler(amt, skb))
> 2700 amt->dev->stats.rx_dropped++;
> 2701 goto out;
> 2702 case AMT_MSG_MULTICAST_DATA:
> 2703 if (iph->saddr != amt->remote_ip) {
> 2704 netdev_dbg(amt->dev, "Invalid Relay IP\n");
> 2705 err = true;
> 2706 goto drop;
> 2707 }
> 2708 err = amt_multicast_data_handler(amt, skb);
> 2709 if (err)
> 2710 goto drop;
> 2711 else
> 2712 goto out;
> 2713 case AMT_MSG_MEMBERSHIP_QUERY:
> 2714 if (iph->saddr != amt->remote_ip) {
> 2715 netdev_dbg(amt->dev, "Invalid Relay IP\n");
> 2716 err = true;
> 2717 goto drop;
> 2718 }
> 2719 err = amt_membership_query_handler(amt, skb);
> 2720 if (err)
> 2721 goto drop;
> 2722 else
> 2723 goto out;
> 2724 default:
> 2725 err = true;
> 2726 netdev_dbg(amt->dev, "Invalid type of Gateway\n");
> 2727 break;
> 2728 }
> 2729 } else {
> 2730 switch (type) {
> 2731 case AMT_MSG_DISCOVERY:
> 2732 err = amt_discovery_handler(amt, skb);
> 2733 break;
> 2734 case AMT_MSG_REQUEST:
> 2735 err = amt_request_handler(amt, skb);
> 2736 break;
> 2737 case AMT_MSG_MEMBERSHIP_UPDATE:
> 2738 err = amt_update_handler(amt, skb);
> 2739 if (err)
> 2740 goto drop;
> 2741 else
> 2742 goto out;
> 2743 default:
> 2744 err = true;
> 2745 netdev_dbg(amt->dev, "Invalid type of relay\n");
> 2746 break;
> 2747 }
> 2748 }
> 2749 drop:
> 2750 if (err) {
> 2751 amt->dev->stats.rx_dropped++;
> 2752 kfree_skb(skb);
> 2753 } else {
> 2754 consume_skb(skb);
> 2755 }
> 2756 out:
> 2757 rcu_read_unlock_bh();
> 2758 return 0;
> 2759 }
>
> You're changing line 2699, we used to bump the rx_dropped on line 2700
> and then the goto on line 2701 takes us to line 2756 - unlock, return.
>
> Now since you have replaced the goto on line 2701 with a "break" the
> code will go from line 2701 to line 2749/2750. If err is set we'll
> increase rx_dropped again on line 2751.
>
> In other words rx_dropped will be increased both on line 2700 and
> line 2751.
>
> What am I missing?
>
> Also I don't quite understand your commit message. The only thing we
> used to skip is the freeing of the skb. Or do you mean we need to
> return an error from amt_rcv() ?
I'm so sorry that I fully misunderstood your review and I found my
mistakes...
The rx_dropped was disappeared in my sight even though you pointed.
I think I tried to check only skb, not rx_dropped.
Now I fully understand your review and my mistake.
^ permalink raw reply
* Re: [PATCH net-next] net: PIM register decapsulation and Forwarding.
From: Jakub Kicinski @ 2022-05-18 0:10 UTC (permalink / raw)
To: dsahern, Ido Schimmel
Cc: Saranya Panjarathina, netdev, Saranya_Panjarathina, davem,
yoshfuji, edumazet, pabeni, linux-kernel, g_balaji1,
Nikolay Aleksandrov
In-Reply-To: <20220516112906.2095-1-plsaranya@gmail.com>
On Mon, 16 May 2022 04:29:06 -0700 Saranya Panjarathina wrote:
> PIM register packet is decapsulated but not forwarded in RP
>
> __pim_rcv decapsulates the PIM register packet and reinjects for forwarding
> after replacing the skb->dev to reg_dev (vif with VIFF_Register)
>
> Ideally the incoming device should be same as skb->dev where the
> original PIM register packet is received. mcache would not have
> reg_vif as IIF. Decapsulated packet forwarding is failing
> because of IIF mismatch. In RP for this S,G RPF interface would be
> skb->dev vif only, so that would be IIF for the cache entry.
>
> Signed-off-by: Saranya Panjarathina <plsaranya@gmail.com>
Not sure if this can cause any trouble. And why it had become
a problem now, seems like the code has been this way forever.
David? Ido?
> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
> index 13e6329784fb..7b9586335fb7 100644
> --- a/net/ipv4/ipmr.c
> +++ b/net/ipv4/ipmr.c
> @@ -598,7 +598,7 @@ static int __pim_rcv(struct mr_table *mrt, struct sk_buff *skb,
> skb->protocol = htons(ETH_P_IP);
> skb->ip_summed = CHECKSUM_NONE;
>
> - skb_tunnel_rx(skb, reg_dev, dev_net(reg_dev));
> + skb_tunnel_rx(skb, skb->dev, dev_net(skb->dev));
>
> netif_rx(skb);
>
> diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
> index 4e74bc61a3db..147e29a818ca 100644
> --- a/net/ipv6/ip6mr.c
> +++ b/net/ipv6/ip6mr.c
> @@ -566,7 +566,7 @@ static int pim6_rcv(struct sk_buff *skb)
> skb->protocol = htons(ETH_P_IPV6);
> skb->ip_summed = CHECKSUM_NONE;
>
> - skb_tunnel_rx(skb, reg_dev, dev_net(reg_dev));
> + skb_tunnel_rx(skb, skb->dev, net);
>
> netif_rx(skb);
>
^ permalink raw reply
* Re: [PATCH 05/12] net: mana: Set the DMA device max page size
From: Jason Gunthorpe @ 2022-05-18 0:03 UTC (permalink / raw)
To: Long Li
Cc: Ajay Sharma, KY Srinivasan, Haiyang Zhang, Stephen Hemminger,
Wei Liu, Dexuan Cui, David S. Miller, Jakub Kicinski, Paolo Abeni,
Leon Romanovsky, linux-hyperv@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rdma@vger.kernel.org
In-Reply-To: <PH7PR21MB3263C44368F02B8AF8521C4ACECE9@PH7PR21MB3263.namprd21.prod.outlook.com>
On Tue, May 17, 2022 at 08:04:58PM +0000, Long Li wrote:
> > Subject: Re: [PATCH 05/12] net: mana: Set the DMA device max page size
> >
> > On Tue, May 17, 2022 at 07:32:51PM +0000, Long Li wrote:
> > > > Subject: Re: [PATCH 05/12] net: mana: Set the DMA device max page
> > > > size
> > > >
> > > > On Tue, May 17, 2022 at 02:04:29AM -0700, longli@linuxonhyperv.com
> > wrote:
> > > > > From: Long Li <longli@microsoft.com>
> > > > >
> > > > > The system chooses default 64K page size if the device does not
> > > > > specify the max page size the device can handle for DMA. This do
> > > > > not work well when device is registering large chunk of memory in
> > > > > that a large page size is more efficient.
> > > > >
> > > > > Set it to the maximum hardware supported page size.
> > > >
> > > > For RDMA devices this should be set to the largest segment size an
> > > > ib_sge can take in when posting work. It should not be the page size
> > > > of MR. 2M is a weird number for that, are you sure it is right?
> > >
> > > Yes, this is the maximum page size used in hardware page tables.
> >
> > As I said, it should be the size of the sge in the WQE, not the "hardware page
> > tables"
>
> This driver uses the following code to figure out the largest page
> size for memory registration with hardware:
>
> page_sz = ib_umem_find_best_pgsz(mr->umem, PAGE_SZ_BM, iova);
>
> In this function, mr->umem is created with ib_dma_max_seg_size() as
> its max segment size when creating its sgtable.
>
> The purpose of setting DMA page size to 2M is to make sure this
> function returns the largest possible MR size that the hardware can
> take. Otherwise, this function will return 64k: the default DMA
> size.
As I've already said, you are supposed to set the value that limits to
ib_sge and *NOT* the value that is related to
ib_umem_find_best_pgsz. It is usually 2G because the ib_sge's
typically work on a 32 bit length.
Jason
^ permalink raw reply
* Re: [RFC net-next] bonding: netlink error message support for options
From: Jakub Kicinski @ 2022-05-17 23:54 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Jonathan Toppins, netdev, Jay Vosburgh, Veaceslav Falico,
Andy Gospodarek, David S. Miller, Eric Dumazet, Paolo Abeni,
linux-kernel
In-Reply-To: <20220517154419.44a1cb6a@hermes.local>
On Tue, 17 May 2022 15:44:19 -0700 Stephen Hemminger wrote:
> On Tue, 17 May 2022 16:31:19 -0400
> Jonathan Toppins <jtoppins@redhat.com> wrote:
>
> > This is an RFC because the current NL_SET_ERR_MSG() macros do not support
> > printf like semantics so I rolled my own buffer setting in __bond_opt_set().
> > The issue is I could not quite figure out the life-cycle of the buffer, if
> > rtnl lock is held until after the text buffer is copied into the packet
> > then we are ok, otherwise, some other type of buffer management scheme will
> > be needed as this could result in corrupted error messages when modifying
> > multiple bonds.
>
> Might be better for others in long term if NL_SET_ERR_MSG() had printf like
> semantics. Surely this isn't going to be first or last case.
>
> Then internally, it could print right to the netlink message.
Dunno. I think pointing at the bad attr + exposing per-attr netlink
parsing policy + a string for a human worked pretty well so far.
IMHO printf() is just a knee jerk reaction, especially when converting
from netdev_err().
Augmenting structured information is much, much better long term.
To me the never ending stream of efforts to improve printk() is a
proof that once we let people printf() at will, efforts to contain
it will be futile.
^ permalink raw reply
* Re: [PATCH 12/12] RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter
From: kernel test robot @ 2022-05-17 23:40 UTC (permalink / raw)
To: longli, K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger,
Wei Liu, Dexuan Cui, David S. Miller, Jakub Kicinski, Paolo Abeni,
Jason Gunthorpe, Leon Romanovsky
Cc: kbuild-all, netdev, linux-hyperv, linux-kernel, linux-rdma,
Long Li
In-Reply-To: <1652778276-2986-13-git-send-email-longli@linuxonhyperv.com>
Hi,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.18-rc7 next-20220517]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/longli-linuxonhyperv-com/Introduce-Microsoft-Azure-Network-Adapter-MANA-RDMA-driver/20220517-170632
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 42226c989789d8da4af1de0c31070c96726d990c
config: x86_64-randconfig-a011-20220516 (https://download.01.org/0day-ci/archive/20220518/202205180712.8ZVP06bH-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/f082dc68ab65c498c978d574e62413d50286b4f9
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review longli-linuxonhyperv-com/Introduce-Microsoft-Azure-Network-Adapter-MANA-RDMA-driver/20220517-170632
git checkout f082dc68ab65c498c978d574e62413d50286b4f9
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from <command-line>:
>> ./usr/include/rdma/mana-abi.h:12:10: fatal error: linux/mana/mana.h: No such file or directory
12 | #include <linux/mana/mana.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply
* RE: [PATCH 03/12] net: mana: Handle vport sharing between devices
From: Long Li @ 2022-05-17 23:39 UTC (permalink / raw)
To: Stephen Hemminger, longli@linuxonhyperv.com
Cc: KY Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
Dexuan Cui, David S. Miller, Jakub Kicinski, Paolo Abeni,
Jason Gunthorpe, Leon Romanovsky, linux-hyperv@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rdma@vger.kernel.org
In-Reply-To: <20220517081918.655fe626@hermes.local>
> Subject: Re: [PATCH 03/12] net: mana: Handle vport sharing between devices
>
> On Tue, 17 May 2022 02:04:27 -0700
> longli@linuxonhyperv.com wrote:
>
> > diff --git a/drivers/net/ethernet/microsoft/mana/mana.h
> b/drivers/net/ethernet/microsoft/mana/mana.h
> > index 51bff91b63ee..26f14fcb6a61 100644
> > --- a/drivers/net/ethernet/microsoft/mana/mana.h
> > +++ b/drivers/net/ethernet/microsoft/mana/mana.h
> > @@ -375,6 +375,7 @@ struct mana_port_context {
> > unsigned int num_queues;
> >
> > mana_handle_t port_handle;
> > + atomic_t port_use_count;
>
> Could this be a refcount_t instead?
> The refcount_t has protections against under/overflow.
Thanks for pointing this out. I will use refcount_t for v2.
Long
^ permalink raw reply
* [linux-next:master] BUILD REGRESSION 47c1c54d1bcd0a69a56b49473bc20f17b70e5242
From: kernel test robot @ 2022-05-17 23:06 UTC (permalink / raw)
To: Andrew Morton
Cc: netdev, linux-rockchip, linux-omap, linux-nvme, linux-mm,
linux-fbdev, linux-arm-kernel, kvm, intel-gfx, dri-devel, bpf,
amd-gfx, Linux Memory Management List
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
branch HEAD: 47c1c54d1bcd0a69a56b49473bc20f17b70e5242 Add linux-next specific files for 20220517
Error/Warning reports:
https://lore.kernel.org/linux-mm/202204181931.klAC6fWo-lkp@intel.com
https://lore.kernel.org/linux-mm/202204291924.vTGZmerI-lkp@intel.com
https://lore.kernel.org/linux-mm/202205030636.LYGgeLHv-lkp@intel.com
https://lore.kernel.org/linux-mm/202205041248.WgCwPcEV-lkp@intel.com
https://lore.kernel.org/linux-mm/202205150051.3RzuooAG-lkp@intel.com
https://lore.kernel.org/linux-mm/202205150117.sd6HzBVm-lkp@intel.com
https://lore.kernel.org/linux-mm/202205172305.y8xOBeEG-lkp@intel.com
https://lore.kernel.org/linux-mm/202205172344.3GFeaum1-lkp@intel.com
https://lore.kernel.org/llvm/202205052057.2TyEsXsL-lkp@intel.com
https://lore.kernel.org/llvm/202205162125.ZhvoOFZf-lkp@intel.com
Error/Warning: (recently discovered and may have been fixed)
arch/arm/mach-versatile/versatile.c:56:14: warning: no previous prototype for function 'mmc_status' [-Wmissing-prototypes]
arch/riscv/include/asm/pgtable.h:695:9: error: call to undeclared function 'pud_leaf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
arch/x86/kvm/pmu.h:20:32: warning: 'vmx_icl_pebs_cpu' defined but not used [-Wunused-const-variable=]
csky-linux-ld: drivers/nvme/host/fc.c:1915: undefined reference to `blkcg_get_fc_appid'
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1364:5: warning: no previous prototype for 'amdgpu_discovery_get_mall_info' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/soc21.c:171:6: warning: no previous prototype for 'soc21_grbm_select' [-Wmissing-prototypes]
drivers/gpu/drm/solomon/ssd130x-spi.c:154:35: warning: 'ssd130x_spi_table' defined but not used [-Wunused-const-variable=]
drivers/nvme/host/fc.c:1914: undefined reference to `blkcg_get_fc_appid'
drivers/video/fbdev/omap/hwa742.c:492:5: warning: no previous prototype for 'hwa742_update_window_async' [-Wmissing-prototypes]
fs/buffer.c:2254:5: warning: stack frame size (2152) exceeds limit (1024) in 'block_read_full_folio' [-Wframe-larger-than]
fs/ntfs/aops.c:378:12: warning: stack frame size (2216) exceeds limit (1024) in 'ntfs_read_folio' [-Wframe-larger-than]
kernel/trace/fgraph.c:37:12: warning: no previous prototype for 'ftrace_enable_ftrace_graph_caller' [-Wmissing-prototypes]
kernel/trace/fgraph.c:37:12: warning: no previous prototype for function 'ftrace_enable_ftrace_graph_caller' [-Wmissing-prototypes]
kernel/trace/fgraph.c:46:12: warning: no previous prototype for 'ftrace_disable_ftrace_graph_caller' [-Wmissing-prototypes]
kernel/trace/fgraph.c:46:12: warning: no previous prototype for function 'ftrace_disable_ftrace_graph_caller' [-Wmissing-prototypes]
powerpc64-linux-ld: drivers/nfc/nxp-nci/firmware.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/nfc/nxp-nci/core.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/nfc/s3fwrn5/nci.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/nfc/s3fwrn5/firmware.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/nvme/target/discovery.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/nvme/target/fabrics-cmd.o:(.bss+0x0): first defined here
powerpc64-linux-ld: fs/ntfs/attrib.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; fs/ntfs/aops.o:(.bss+0x0): first defined here
powerpc64-linux-ld: net/mac80211/he.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; net/mac80211/aead_api.o:(.bss+0x0): first defined here
powerpc64-linux-ld: net/nfc/nci/ntf.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; net/nfc/nci/data.o:(.bss+0x0): first defined here
powerpc64-linux-ld: net/nfc/rawsock.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; net/nfc/af_nfc.o:(.bss+0x40): first defined here
powerpc64-linux-ld: net/wireless/sysfs.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; net/wireless/core.o:(.bss+0x1c0): first defined here
powerpc64-linux-ld: sound/pci/ac97/ac97_pcm.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; sound/pci/ac97/ac97_codec.o:(.bss+0x40): first defined here
Unverified Error/Warning (likely false positive, please contact us if interested):
Makefile:686: arch/h8300/Makefile: No such file or directory
arch/Kconfig:10: can't open file "arch/h8300/Kconfig"
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:5102:14: warning: variable 'allow_lttpr_non_transparent_mode' set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:5147:6: warning: no previous prototype for 'dp_parse_lttpr_mode' [-Wmissing-prototypes]
drivers/gpu/drm/bridge/adv7511/adv7511.h:229:17: warning: 'ADV7511_REG_CEC_RX_FRAME_HDR' defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/bridge/adv7511/adv7511.h:235:17: warning: 'ADV7511_REG_CEC_RX_FRAME_LEN' defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c:276:27: error: implicit declaration of function 'sysfs_gt_attribute_r_max_func' [-Werror=implicit-function-declaration]
drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c:327:16: error: implicit declaration of function 'sysfs_gt_attribute_w_func' [-Werror=implicit-function-declaration]
drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c:416:24: error: implicit declaration of function 'sysfs_gt_attribute_r_min_func' [-Werror=implicit-function-declaration]
drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c:47 sysfs_gt_attribute_w_func() error: uninitialized symbol 'ret'.
drivers/tty/hvc/hvc_dcc.c:98:6: warning: Value stored to 'cpu' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
fc.c:(.text+0xad3): undefined reference to `blkcg_get_fc_appid'
include/linux/userfaultfd_k.h:147 vma_can_userfault() warn: bitwise AND condition is false here
kernel/bpf/verifier.c:5354 process_kptr_func() warn: passing zero to 'PTR_ERR'
kismet: WARNING: unmet direct dependencies detected for RISCV_ALTERNATIVE when selected by ERRATA_THEAD
kismet: WARNING: unmet direct dependencies detected for RISCV_ALTERNATIVE when selected by RISCV_ISA_SVPBMT
ld.lld: error: undefined symbol: blkcg_get_fc_appid
make[1]: *** No rule to make target 'arch/h8300/Makefile'.
mm/shmem.c:1910 shmem_getpage_gfp() warn: should '(((1) << 12) / 512) << folio_order(folio)' be a 64 bit type?
powerpc64-linux-ld: drivers/char/ipmi/ipmi_si_hardcode.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/char/ipmi/ipmi_si_hotmod.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/char/tpm/tpmrm-dev.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/char/tpm/tpm-dev.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/crypto/hisilicon/sec/sec_drv.o:(.bss+0x80): multiple definition of `____cacheline_aligned'; drivers/crypto/hisilicon/sec/sec_algs.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/gpu/drm/bridge/adv7511/adv7533.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/gpu/drm/bridge/adv7511/adv7511_drv.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/gpu/drm/drm_fb_cma_helper.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/gpu/drm/drm_gem_cma_helper.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/gpu/drm/mxsfb/mxsfb_kms.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/gpu/drm/mxsfb/mxsfb_drv.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/gpu/drm/selftests/test-drm_framebuffer.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/gpu/drm/selftests/test-drm_plane_helper.o:(.bss+0x340): first defined here
powerpc64-linux-ld: drivers/gpu/drm/vgem/vgem_fence.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/gpu/drm/vgem/vgem_drv.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/gpu/drm/vkms/vkms_crtc.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/gpu/drm/vkms/vkms_plane.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/hid/hid-debug.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/hid/hid-quirks.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/hid/hid-picolcd_fb.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/hid/hid-picolcd_core.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/hid/hid-wiimote-modules.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/hid/hid-wiimote-core.o:(.bss+0x80): first defined here
powerpc64-linux-ld: drivers/i2c/busses/i2c-designware-master.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/i2c/busses/i2c-designware-common.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/input/input-compat.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/input/input.o:(.bss+0x80): first defined here
powerpc64-linux-ld: drivers/input/mouse/elan_i2c_i2c.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/input/mouse/elan_i2c_core.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/input/rmi4/rmi_driver.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/input/rmi4/rmi_bus.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/md/dm-bio-prison-v2.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/md/dm-bio-prison-v1.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/md/dm-cache-metadata.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/md/dm-cache-target.o:(.bss+0x100): first defined here
powerpc64-linux-ld: drivers/md/dm-thin-metadata.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/md/dm-thin.o:(.bss+0x180): first defined here
powerpc64-linux-ld: drivers/md/md-bitmap.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/md/md.o:(.bss+0x180): first defined here
powerpc64-linux-ld: drivers/md/persistent-data/dm-bitset.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/md/persistent-data/dm-array.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/md/raid5-cache.o:(.bss+0xc0): multiple definition of `____cacheline_aligned'; drivers/md/raid5.o:(.bss+0x100): first defined here
powerpc64-linux-ld: drivers/media/dvb-core/dvb_demux.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/media/dvb-core/dmxdev.o:(.bss+0x80): first defined here
powerpc64-linux-ld: drivers/media/rc/rc-ir-raw.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/media/rc/rc-main.o:(.bss+0x80): first defined here
powerpc64-linux-ld: drivers/media/tuners/tda18271-common.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/media/tuners/tda18271-maps.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/media/v4l2-core/v4l2-fh.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/media/v4l2-core/v4l2-dev.o:(.bss+0x900): first defined here
powerpc64-linux-ld: drivers/mfd/cs47l35-tables.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/mfd/madera-core.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/mfd/mt6397-irq.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/mfd/mt6397-core.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/mfd/pcf50633-irq.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/mfd/pcf50633-core.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/misc/altera-stapl/altera-jtag.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/misc/altera-stapl/altera-lpt.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/mmc/core/host.o:(.bss+0x80): multiple definition of `____cacheline_aligned'; drivers/mmc/core/bus.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/mtd/spi-nor/swp.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/mtd/spi-nor/sfdp.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/net/can/dev/length.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/net/can/dev/bittiming.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/net/can/flexcan/flexcan-ethtool.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/net/can/flexcan/flexcan-core.o:(.bss+0x0): first defined here
powerpc64-linux-ld: drivers/slimbus/messaging.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/slimbus/core.o:(.bss+0x80): first defined here
powerpc64-linux-ld: drivers/ssb/scan.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/ssb/main.o:(.bss+0x40): first defined here
powerpc64-linux-ld: drivers/staging/ks7010/ks_wlan_net.o:(.bss+0x80): multiple definition of `____cacheline_aligned'; drivers/staging/ks7010/ks_hostif.o:(.bss+0x80): first defined here
powerpc64-linux-ld: drivers/video/fbdev/omap2/omapfb/dss/dispc_coefs.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; drivers/video/fbdev/omap2/omapfb/dss/dispc.o:(.bss+0x1100): first defined here
powerpc64-linux-ld: drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.o:(.bss+0x0): first defined here
powerpc64-linux-ld: fs/autofs/symlink.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; fs/autofs/inode.o:(.bss+0x40): first defined here
powerpc64-linux-ld: fs/befs/btree.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; fs/befs/datastream.o:(.bss+0x0): first defined here
powerpc64-linux-ld: fs/fat/dir.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; fs/fat/cache.o:(.bss+0x40): first defined here
powerpc64-linux-ld: fs/fscache/io.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; fs/fscache/cache.o:(.bss+0x40): first defined here
powerpc64-linux-ld: fs/hfs/bfind.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; fs/hfs/bitmap.o:(.bss+0x0): first defined here
powerpc64-linux-ld: fs/minix/itree_v1.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; fs/minix/bitmap.o:(.bss+0x0): first defined here
powerpc64-linux-ld: fs/netfs/objects.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; fs/netfs/buffered_read.o:(.bss+0x0): first defined here
powerpc64-linux-ld: fs/overlayfs/namei.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; fs/overlayfs/super.o:(.bss+0x40): first defined here
powerpc64-linux-ld: lib/raid6/recov.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; lib/raid6/algos.o:(.bss+0x40): first defined here
powerpc64-linux-ld: net/atm/svc.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; net/atm/pvc.o:(.bss+0x0): first defined here
powerpc64-linux-ld: net/ax25/ax25_dev.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; net/ax25/ax25_addr.o:(.bss+0x0): first defined here
powerpc64-linux-ld: net/bridge/br_forward.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; net/bridge/br_fdb.o:(.bss+0x0): first defined here
powerpc64-linux-ld: net/ceph/messenger.o:(.bss+0x880): multiple definition of `____cacheline_aligned'; net/ceph/ceph_common.o:(.bss+0x40): first defined here
powerpc64-linux-ld: net/phonet/socket.o:(.bss+0x940): multiple definition of `____cacheline_aligned'; net/phonet/pn_dev.o:(.bss+0x40): first defined here
powerpc64-linux-ld: net/rds/cong.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; net/rds/bind.o:(.bss+0x180): first defined here
powerpc64-linux-ld: net/rds/tcp_connect.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; net/rds/tcp.o:(.bss+0x40): first defined here
powerpc64-linux-ld: net/x25/x25_out.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; net/x25/x25_in.o:(.bss+0x0): first defined here
powerpc64-linux-ld: security/keys/trusted-keys/trusted_tpm1.o:(.bss+0x40): multiple definition of `____cacheline_aligned'; security/keys/trusted-keys/trusted_core.o:(.bss+0x40): first defined here
{standard input}:1991: Error: unknown pseudo-op: `.lc'
Error/Warning ids grouped by kconfigs:
gcc_recent_errors
|-- alpha-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- arc-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- arm-allmodconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| |-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
| `-- drivers-video-fbdev-omap-hwa742.c:warning:no-previous-prototype-for-hwa742_update_window_async
|-- arm-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| |-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
| `-- drivers-video-fbdev-omap-hwa742.c:warning:no-previous-prototype-for-hwa742_update_window_async
|-- arm-randconfig-r031-20220516
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- arm64-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- csky-randconfig-r025-20220516
| `-- csky-linux-ld:drivers-nvme-host-fc.c:undefined-reference-to-blkcg_get_fc_appid
|-- h8300-allyesconfig
| |-- Makefile:arch-h8300-Makefile:No-such-file-or-directory
| |-- arch-Kconfig:can-t-open-file-arch-h8300-Kconfig
| `-- make:No-rule-to-make-target-arch-h8300-Makefile-.
|-- i386-allyesconfig
| |-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| |-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
| |-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_HDR-defined-but-not-used
| |-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_LEN-defined-but-not-used
| `-- drivers-gpu-drm-solomon-ssd13-spi.c:warning:ssd13_spi_table-defined-but-not-used
|-- i386-debian-10.3
| `-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
|-- i386-debian-10.3-kselftests
| `-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
|-- i386-randconfig-a011-20220516
| |-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_HDR-defined-but-not-used
| `-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_LEN-defined-but-not-used
|-- i386-randconfig-c021-20220516
| |-- drivers-gpu-drm-i915-gt-intel_gt_sysfs_pm.c:error:implicit-declaration-of-function-sysfs_gt_attribute_r_max_func
| |-- drivers-gpu-drm-i915-gt-intel_gt_sysfs_pm.c:error:implicit-declaration-of-function-sysfs_gt_attribute_r_min_func
| `-- drivers-gpu-drm-i915-gt-intel_gt_sysfs_pm.c:error:implicit-declaration-of-function-sysfs_gt_attribute_w_func
|-- i386-randconfig-m021
| |-- kernel-bpf-verifier.c-process_kptr_func()-warn:passing-zero-to-PTR_ERR
| `-- mm-shmem.c-shmem_getpage_gfp()-warn:should-((()-)-)-folio_order(folio)-be-a-bit-type
|-- i386-randconfig-r014-20220516
| `-- fc.c:(.text):undefined-reference-to-blkcg_get_fc_appid
|-- ia64-allmodconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- microblaze-randconfig-s031-20220516
| |-- drivers-nvme-host-fc.c:undefined-reference-to-blkcg_get_fc_appid
| |-- kernel-trace-fgraph.c:warning:no-previous-prototype-for-ftrace_disable_ftrace_graph_caller
| `-- kernel-trace-fgraph.c:warning:no-previous-prototype-for-ftrace_enable_ftrace_graph_caller
|-- mips-allmodconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- mips-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- openrisc-randconfig-m031-20220517
| |-- include-linux-userfaultfd_k.h-vma_can_userfault()-warn:bitwise-AND-condition-is-false-here
| `-- kernel-bpf-verifier.c-process_kptr_func()-warn:passing-zero-to-PTR_ERR
|-- parisc-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| |-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
| `-- drivers-gpu-drm-rockchip-rockchip_drm_vop2.c:Unneeded-semicolon
|-- powerpc-allmodconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- powerpc-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- powerpc64-randconfig-r015-20220516
| |-- multiple-definition-of-____cacheline_aligned-drivers-char-ipmi-ipmi_si_hotmod.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-char-tpm-tpm-dev.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-gpu-drm-bridge-adv7511-adv7511_drv.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-gpu-drm-drm_gem_cma_helper.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-gpu-drm-mxsfb-mxsfb_drv.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-gpu-drm-selftests-test-drm_plane_helper.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-gpu-drm-vgem-vgem_drv.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-gpu-drm-vkms-vkms_plane.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-input-input.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-input-mouse-elan_i2c_core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-md-dm-bio-prison-v1.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-md-dm-cache-target.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-md-dm-thin.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-md-md.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-md-persistent-data-dm-array.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-md-raid5.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-media-dvb-core-dmxdev.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-media-rc-rc-main.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-media-tuners-tda18271-maps.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-media-v4l2-core-v4l2-dev.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-mfd-mt6397-core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-mfd-pcf50633-core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-misc-altera-stapl-altera-lpt.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-mmc-core-bus.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-nvme-target-fabrics-cmd.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-staging-ks7010-ks_hostif.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-fs-autofs-inode.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-fs-befs-datastream.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-fs-fat-cache.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-fs-hfs-bitmap.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-fs-minix-bitmap.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-fs-ntfs-aops.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-fs-overlayfs-super.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-lib-raid6-algos.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-atm-pvc.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-ceph-ceph_common.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-mac80211-aead_api.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-phonet-pn_dev.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-rds-bind.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-rds-tcp.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-wireless-core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-x25-x25_in.o:(.bss):first-defined-here
| `-- multiple-definition-of-____cacheline_aligned-security-keys-trusted-keys-trusted_core.o:(.bss):first-defined-here
|-- powerpc64-randconfig-r016-20220516
| |-- multiple-definition-of-____cacheline_aligned-drivers-char-tpm-tpm-dev.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-crypto-hisilicon-sec-sec_algs.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-hid-hid-picolcd_core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-hid-hid-quirks.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-hid-hid-wiimote-core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-i2c-busses-i2c-designware-common.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-input-rmi4-rmi_bus.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-media-rc-rc-main.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-mfd-madera-core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-mfd-mt6397-core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-misc-altera-stapl-altera-lpt.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-mmc-core-bus.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-mtd-spi-nor-sfdp.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-net-can-dev-bittiming.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-net-can-flexcan-flexcan-core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-nfc-nxp-nci-core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-nfc-s3fwrn5-firmware.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-slimbus-core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-ssb-main.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-video-fbdev-omap2-omapfb-dss-dispc.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-drivers-video-fbdev-omap2-omapfb-omapfb-sysfs.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-fs-fscache-cache.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-fs-netfs-buffered_read.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-atm-pvc.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-ax25-ax25_addr.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-bridge-br_fdb.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-mac80211-aead_api.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-nfc-af_nfc.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-nfc-nci-data.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-net-wireless-core.o:(.bss):first-defined-here
| |-- multiple-definition-of-____cacheline_aligned-security-keys-trusted-keys-trusted_core.o:(.bss):first-defined-here
| `-- multiple-definition-of-____cacheline_aligned-sound-pci-ac97-ac97_codec.o:(.bss):first-defined-here
|-- riscv-allmodconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- riscv-allnoconfig
| |-- kismet:WARNING:unmet-direct-dependencies-detected-for-RISCV_ALTERNATIVE-when-selected-by-ERRATA_THEAD
| `-- kismet:WARNING:unmet-direct-dependencies-detected-for-RISCV_ALTERNATIVE-when-selected-by-RISCV_ISA_SVPBMT
|-- riscv-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- s390-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- sh-allmodconfig
| `-- standard-input:Error:unknown-pseudo-op:lc
|-- sparc-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- sparc-randconfig-r003-20220516
| |-- kernel-trace-fgraph.c:warning:no-previous-prototype-for-ftrace_disable_ftrace_graph_caller
| `-- kernel-trace-fgraph.c:warning:no-previous-prototype-for-ftrace_enable_ftrace_graph_caller
|-- sparc-randconfig-r036-20220516
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- um-allyesconfig
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| `-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
|-- x86_64-allyesconfig
| |-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
| |-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
| |-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
| |-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
| |-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_HDR-defined-but-not-used
| |-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_LEN-defined-but-not-used
| `-- drivers-gpu-drm-solomon-ssd13-spi.c:warning:ssd13_spi_table-defined-but-not-used
|-- x86_64-kexec
| `-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
|-- x86_64-randconfig-a012-20220516
| |-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_HDR-defined-but-not-used
| `-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_LEN-defined-but-not-used
|-- x86_64-randconfig-a014-20220516
| `-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
|-- x86_64-randconfig-c001-20220516
| |-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_HDR-defined-but-not-used
| `-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_LEN-defined-but-not-used
|-- x86_64-randconfig-m001-20220516
| |-- drivers-gpu-drm-i915-gt-intel_gt_sysfs_pm.c-sysfs_gt_attribute_w_func()-error:uninitialized-symbol-ret-.
| `-- kernel-bpf-verifier.c-process_kptr_func()-warn:passing-zero-to-PTR_ERR
|-- x86_64-randconfig-r024-20220516
| |-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_HDR-defined-but-not-used
| `-- drivers-gpu-drm-bridge-adv7511-adv7511.h:warning:ADV7511_REG_CEC_RX_FRAME_LEN-defined-but-not-used
|-- x86_64-rhel-8.3
| `-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
|-- x86_64-rhel-8.3-func
| `-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
|-- x86_64-rhel-8.3-kselftests
| `-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
|-- x86_64-rhel-8.3-kunit
| `-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
|-- x86_64-rhel-8.3-syz
| `-- arch-x86-kvm-pmu.h:warning:vmx_icl_pebs_cpu-defined-but-not-used
`-- xtensa-allyesconfig
|-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:no-previous-prototype-for-dp_parse_lttpr_mode
|-- drivers-gpu-drm-amd-amdgpu-..-display-dc-core-dc_link_dp.c:warning:variable-allow_lttpr_non_transparent_mode-set-but-not-used
|-- drivers-gpu-drm-amd-amdgpu-amdgpu_discovery.c:warning:no-previous-prototype-for-amdgpu_discovery_get_mall_info
`-- drivers-gpu-drm-amd-amdgpu-soc21.c:warning:no-previous-prototype-for-soc21_grbm_select
clang_recent_errors
|-- arm-randconfig-c002-20220516
| `-- drivers-tty-hvc-hvc_dcc.c:warning:Value-stored-to-cpu-during-its-initialization-is-never-read-clang-analyzer-deadcode.DeadStores
|-- arm-versatile_defconfig
| `-- arch-arm-mach-versatile-versatile.c:warning:no-previous-prototype-for-function-mmc_status
|-- hexagon-buildonly-randconfig-r005-20220516
| `-- ld.lld:error:undefined-symbol:blkcg_get_fc_appid
|-- hexagon-randconfig-r045-20220516
| |-- fs-buffer.c:warning:stack-frame-size-()-exceeds-limit-()-in-block_read_full_folio
| `-- fs-ntfs-aops.c:warning:stack-frame-size-()-exceeds-limit-()-in-ntfs_read_folio
|-- i386-randconfig-a006-20220516
| `-- ld.lld:error:undefined-symbol:blkcg_get_fc_appid
|-- riscv-randconfig-r001-20220516
| |-- kernel-trace-fgraph.c:warning:no-previous-prototype-for-function-ftrace_disable_ftrace_graph_caller
| `-- kernel-trace-fgraph.c:warning:no-previous-prototype-for-function-ftrace_enable_ftrace_graph_caller
`-- riscv-randconfig-r004-20220516
`-- arch-riscv-include-asm-pgtable.h:error:call-to-undeclared-function-pud_leaf-ISO-C99-and-later-do-not-support-implicit-function-declarations
elapsed time: 730m
configs tested: 114
configs skipped: 3
gcc tested configs:
arm allmodconfig
arm allyesconfig
arm defconfig
arm64 defconfig
arm64 allyesconfig
i386 randconfig-c001-20220516
arm integrator_defconfig
sh ecovec24-romimage_defconfig
sh titan_defconfig
powerpc redwood_defconfig
sh ul2_defconfig
xtensa virt_defconfig
powerpc currituck_defconfig
openrisc simple_smp_defconfig
arc axs101_defconfig
mips cobalt_defconfig
sh urquell_defconfig
sh se7722_defconfig
m68k sun3x_defconfig
sh se7780_defconfig
sh se7705_defconfig
powerpc sequoia_defconfig
arm randconfig-c002-20220516
x86_64 randconfig-c001-20220516
ia64 defconfig
ia64 allmodconfig
ia64 allyesconfig
m68k allyesconfig
m68k allmodconfig
m68k defconfig
alpha defconfig
csky defconfig
alpha allyesconfig
nios2 allyesconfig
arc defconfig
h8300 allyesconfig
sh allmodconfig
xtensa allyesconfig
parisc defconfig
s390 allmodconfig
parisc allyesconfig
s390 defconfig
parisc64 defconfig
s390 allyesconfig
i386 debian-10.3-kselftests
i386 debian-10.3
i386 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
nios2 defconfig
arc allyesconfig
mips allyesconfig
mips allmodconfig
powerpc allnoconfig
powerpc allmodconfig
powerpc allyesconfig
x86_64 randconfig-a012-20220516
x86_64 randconfig-a011-20220516
x86_64 randconfig-a013-20220516
x86_64 randconfig-a014-20220516
x86_64 randconfig-a016-20220516
x86_64 randconfig-a015-20220516
i386 randconfig-a014-20220516
i386 randconfig-a011-20220516
i386 randconfig-a013-20220516
i386 randconfig-a015-20220516
i386 randconfig-a012-20220516
i386 randconfig-a016-20220516
arc randconfig-r043-20220516
s390 randconfig-r044-20220516
riscv randconfig-r042-20220516
riscv allnoconfig
riscv allyesconfig
riscv allmodconfig
riscv nommu_k210_defconfig
riscv rv32_defconfig
riscv nommu_virt_defconfig
riscv defconfig
um i386_defconfig
um x86_64_defconfig
x86_64 defconfig
x86_64 allyesconfig
x86_64 rhel-8.3-kselftests
x86_64 kexec
x86_64 rhel-8.3-syz
x86_64 rhel-8.3-func
x86_64 rhel-8.3
x86_64 rhel-8.3-kunit
clang tested configs:
arm cns3420vb_defconfig
arm versatile_defconfig
arm collie_defconfig
powerpc kilauea_defconfig
mips malta_kvm_defconfig
arm mainstone_defconfig
arm colibri_pxa300_defconfig
mips e55_defconfig
powerpc microwatt_defconfig
powerpc akebono_defconfig
powerpc mvme5100_defconfig
x86_64 randconfig-a002-20220516
x86_64 randconfig-a001-20220516
x86_64 randconfig-a003-20220516
x86_64 randconfig-a005-20220516
x86_64 randconfig-a004-20220516
x86_64 randconfig-a006-20220516
i386 randconfig-a003-20220516
i386 randconfig-a001-20220516
i386 randconfig-a004-20220516
i386 randconfig-a006-20220516
i386 randconfig-a002-20220516
i386 randconfig-a005-20220516
hexagon randconfig-r045-20220516
hexagon randconfig-r041-20220516
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply
* Re: [PATCH net-next] ax25: merge repeat codes in ax25_dev_device_down()
From: Thomas Osterried @ 2022-05-17 22:38 UTC (permalink / raw)
To: Lu Wei
Cc: jreuter, ralf, davem, edumazet, kuba, pabeni, linux-hams, netdev,
linux-kernel
In-Reply-To: <20220516062804.254742-1-luwei32@huawei.com>
Hello,
three comments.
1. We need time for questions and discussions
In the past, we had several problems with patches that went upstream which
obviously not have been tested.
We have several requests by our community at linux-hams, that we need
to have a chance to read a patch proposal, and have time to test it,
before things become worse.
2. Due to some patches that went in the current torwalds-tree, ax25 became
unusable in a production environment (!).
I'll come to this in another mail, with description and proposal for a fix.
We are currently testing it and like to send it on linux-hams with request
to comment and test.
3. About this patch for ax25_dev_device_down() which reached netdev-next:
Looks good regarding the changes.
But when looking at it, it raises a question due to an older patch, that introduced
dev_put_track().
It's just a question of comprehension:
If the position of the device that has to be removed is
- at the head of the device list: do dev_put_track()
- in the the device list or at the end: dev_put_track()
- not in the device list: do _not_ dev_put_track().
Why? - Not obviously clear. I think, because an interface could exist,
but is set to down and thus is not part of the list (-> then you can't see
it as /proc/sys/net/ax25/<name>).
-> Personally, I'd consider
- this better readable:
int found = 0;
if (ax25_dev_list == ax25_dev) {
ax25_dev_list = s->next;
found = 1;
} else {
for (s = ax25_dev_list; s != NULL && s->next != NULL; s = s->next) {
if (s->next == ax25_dev) {
s->next = s->next->next;
found = 1;
break;
}
}
}
spin_unlock_bh(&ax25_dev_lock);
ax25_dev_put(ax25_dev);
dev->ax25_ptr = NULL;
if (found)
dev_put_track(dev, &ax25_dev->dev_tracker);
ax25_dev_put(ax25_dev);
- ..or with goto:
int found = 1;
if (ax25_dev_list == ax25_dev) {
ax25_dev_list = s->next;
goto out;
}
for (s = ax25_dev_list; s != NULL && s->next != NULL; s = s->next) {
if (s->next == ax25_dev) {
s->next = s->next->next;
goto out;
}
}
found = 0;
out:
spin_unlock_bh(&ax25_dev_lock);
ax25_dev_put(ax25_dev);
dev->ax25_ptr = NULL;
if (found)
dev_put_track(dev, &ax25_dev->dev_tracker);
ax25_dev_put(ax25_dev);
- ..than this:
if ((s = ax25_dev_list) == ax25_dev) {
ax25_dev_list = s->next;
goto unlock_put;
}
while (s != NULL && s->next != NULL) {
if (s->next == ax25_dev) {
s->next = ax25_dev->next;
goto unlock_put;
}
s = s->next;
}
spin_unlock_bh(&ax25_dev_lock);
dev->ax25_ptr = NULL;
ax25_dev_put(ax25_dev);
return;
unlock_put:
spin_unlock_bh(&ax25_dev_lock);
ax25_dev_put(ax25_dev);
dev->ax25_ptr = NULL;
dev_put_track(dev, &ax25_dev->dev_tracker);
ax25_dev_put(ax25_dev);
vy 73,
- Thomas dl9sau
On Mon, May 16, 2022 at 02:28:04PM +0800, Lu Wei wrote:
> Merge repeat codes to reduce the duplication.
>
> Signed-off-by: Lu Wei <luwei32@huawei.com>
> ---
> net/ax25/ax25_dev.c | 22 ++++++++++------------
> 1 file changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c
> index d2a244e1c260..b80fccbac62a 100644
> --- a/net/ax25/ax25_dev.c
> +++ b/net/ax25/ax25_dev.c
> @@ -115,23 +115,13 @@ void ax25_dev_device_down(struct net_device *dev)
>
> if ((s = ax25_dev_list) == ax25_dev) {
> ax25_dev_list = s->next;
> - spin_unlock_bh(&ax25_dev_lock);
> - ax25_dev_put(ax25_dev);
> - dev->ax25_ptr = NULL;
> - dev_put_track(dev, &ax25_dev->dev_tracker);
> - ax25_dev_put(ax25_dev);
> - return;
> + goto unlock_put;
> }
>
> while (s != NULL && s->next != NULL) {
> if (s->next == ax25_dev) {
> s->next = ax25_dev->next;
> - spin_unlock_bh(&ax25_dev_lock);
> - ax25_dev_put(ax25_dev);
> - dev->ax25_ptr = NULL;
> - dev_put_track(dev, &ax25_dev->dev_tracker);
> - ax25_dev_put(ax25_dev);
> - return;
> + goto unlock_put;
> }
>
> s = s->next;
> @@ -139,6 +129,14 @@ void ax25_dev_device_down(struct net_device *dev)
> spin_unlock_bh(&ax25_dev_lock);
> dev->ax25_ptr = NULL;
> ax25_dev_put(ax25_dev);
> + return;
> +
> +unlock_put:
> + spin_unlock_bh(&ax25_dev_lock);
> + ax25_dev_put(ax25_dev);
> + dev->ax25_ptr = NULL;
> + dev_put_track(dev, &ax25_dev->dev_tracker);
> + ax25_dev_put(ax25_dev);
> }
>
> int ax25_fwd_ioctl(unsigned int cmd, struct ax25_fwd_struct *fwd)
> --
> 2.17.1
>
>
^ permalink raw reply
* Re: [RFC net-next] bonding: netlink error message support for options
From: Stephen Hemminger @ 2022-05-17 22:44 UTC (permalink / raw)
To: Jonathan Toppins
Cc: netdev, Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-kernel
In-Reply-To: <5a6ba6f14b0fad6d4ba077a5230ee71cbf970934.1652819479.git.jtoppins@redhat.com>
On Tue, 17 May 2022 16:31:19 -0400
Jonathan Toppins <jtoppins@redhat.com> wrote:
> This is an RFC because the current NL_SET_ERR_MSG() macros do not support
> printf like semantics so I rolled my own buffer setting in __bond_opt_set().
> The issue is I could not quite figure out the life-cycle of the buffer, if
> rtnl lock is held until after the text buffer is copied into the packet
> then we are ok, otherwise, some other type of buffer management scheme will
> be needed as this could result in corrupted error messages when modifying
> multiple bonds.
Might be better for others in long term if NL_SET_ERR_MSG() had printf like
semantics. Surely this isn't going to be first or last case.
Then internally, it could print right to the netlink message.
^ permalink raw reply
* Re: [RFC net-next] bonding: netlink error message support for options
From: Jakub Kicinski @ 2022-05-17 22:33 UTC (permalink / raw)
To: Jay Vosburgh
Cc: Jonathan Toppins, netdev, Veaceslav Falico, Andy Gospodarek,
David S. Miller, Eric Dumazet, Paolo Abeni, linux-kernel
In-Reply-To: <2125.1652821874@famine>
On Tue, 17 May 2022 14:11:14 -0700 Jay Vosburgh wrote:
> If I'm reading the code correctly, rtnl isn't held that long.
> Once the ->doit() returns, rtnl is dropped, but the copy happens later:
>
> rtnetlink_rcv()
> netlink_rcv_skb(skb, &rtnetlink_rcv_msg)
> rtnetlink_rcv_msg() [ as cb(skb, nlh, &extack) ]
> rtnl_lock()
> link->doit() [ rtnl_setlink, rtnl_newlink, et al ]
> rtnl_unlock()
> netlink_ack()
>
> inside netlink_ack():
>
> if (nlk_has_extack && extack) {
> if (extack->_msg) {
> WARN_ON(nla_put_string(skb, NLMSGERR_ATTR_MSG,
> extack->_msg));
> }
Indeed.
> Even if the strings have to be constant (via NL_SET_ERR_MSG),
> adding extack messages is likely still an improvement.
At a quick glance it seems like the major use of the printf here is to
point at a particular option. If options are carried in individual
attributes pointing at the right attribute with NL_SET_ERR_MSG_ATTR()
should also be helpful. Maybe that's stating the obvious.
^ permalink raw reply
* Re: [RFC PATCH] net: fec: Avoid to allocate rx buffer using ATOMIC in ndo_open
From: Jakub Kicinski @ 2022-05-17 22:27 UTC (permalink / raw)
To: Michael Trimarchi
Cc: Joakim Zhang, Liam Girdwood, Eric Dumazet, Paolo Abeni, netdev,
linux-kernel
In-Reply-To: <20220517100544.2326499-1-michael@amarulasolutions.com>
On Tue, 17 May 2022 12:05:44 +0200 Michael Trimarchi wrote:
> Subject: [RFC PATCH] net: fec: Avoid to allocate rx buffer using ATOMIC in ndo_open
nit: "Avoid allocating"
We need a commit message, guessing your motivation something like this
would be enough IMHO:
Make ndo_open less sensitive to memory pressure.
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
> drivers/net/ethernet/freescale/fec_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 9f33ec838b52..09eb6ea9a584 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -3076,7 +3076,7 @@ fec_enet_alloc_rxq_buffers(struct net_device *ndev, unsigned int queue)
> rxq = fep->rx_queue[queue];
> bdp = rxq->bd.base;
> for (i = 0; i < rxq->bd.ring_size; i++) {
> - skb = netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE);
> + skb = __netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE, GFP_KERNEL);
> if (!skb)
> goto err_alloc;
>
The patch LGTM, feel free to repost as non-RFC.
^ permalink raw reply
* Re: [PATCH net v2 2/2] amt: do not skip remaining handling of advertisement message
From: Jakub Kicinski @ 2022-05-17 22:24 UTC (permalink / raw)
To: Taehee Yoo; +Cc: davem, pabeni, edumazet, netdev
In-Reply-To: <20220517070527.10591-3-ap420073@gmail.com>
On Tue, 17 May 2022 07:05:27 +0000 Taehee Yoo wrote:
> When a gateway receives an advertisement message, it extracts relay
> information and then it should be deleted.
> But the advertisement handler doesn't do that.
> So, after amt_advertisement_handler(), that message should not be skipped
> remaining handling.
>
> Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface")
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
> diff --git a/drivers/net/amt.c b/drivers/net/amt.c
> index 2b4ce3869f08..6ce2ecd07640 100644
> --- a/drivers/net/amt.c
> +++ b/drivers/net/amt.c
> @@ -2698,9 +2698,10 @@ static int amt_rcv(struct sock *sk, struct sk_buff *skb)
> err = true;
> goto drop;
> }
> - if (amt_advertisement_handler(amt, skb))
> + err = amt_advertisement_handler(amt, skb);
> + if (err)
> amt->dev->stats.rx_dropped++;
> - goto out;
> + break;
> case AMT_MSG_MULTICAST_DATA:
> if (iph->saddr != amt->remote_ip) {
> netdev_dbg(amt->dev, "Invalid Relay IP\n");
I guess I'll have to spell it out for you more cause either you didn't
understand me or I don't understand your reply on v1. Here's the full
function:
2669 static int amt_rcv(struct sock *sk, struct sk_buff *skb)
2670 {
2671 struct amt_dev *amt;
2672 struct iphdr *iph;
2673 int type;
2674 bool err;
2675
2676 rcu_read_lock_bh();
2677 amt = rcu_dereference_sk_user_data(sk);
2678 if (!amt) {
2679 err = true;
2680 goto out;
2681 }
2682
2683 skb->dev = amt->dev;
2684 iph = ip_hdr(skb);
2685 type = amt_parse_type(skb);
2686 if (type == -1) {
2687 err = true;
2688 goto drop;
2689 }
2690
2691 if (amt->mode == AMT_MODE_GATEWAY) {
2692 switch (type) {
2693 case AMT_MSG_ADVERTISEMENT:
2694 if (iph->saddr != amt->discovery_ip) {
2695 netdev_dbg(amt->dev, "Invalid Relay IP\n");
2696 err = true;
2697 goto drop;
2698 }
2699 if (amt_advertisement_handler(amt, skb))
2700 amt->dev->stats.rx_dropped++;
2701 goto out;
2702 case AMT_MSG_MULTICAST_DATA:
2703 if (iph->saddr != amt->remote_ip) {
2704 netdev_dbg(amt->dev, "Invalid Relay IP\n");
2705 err = true;
2706 goto drop;
2707 }
2708 err = amt_multicast_data_handler(amt, skb);
2709 if (err)
2710 goto drop;
2711 else
2712 goto out;
2713 case AMT_MSG_MEMBERSHIP_QUERY:
2714 if (iph->saddr != amt->remote_ip) {
2715 netdev_dbg(amt->dev, "Invalid Relay IP\n");
2716 err = true;
2717 goto drop;
2718 }
2719 err = amt_membership_query_handler(amt, skb);
2720 if (err)
2721 goto drop;
2722 else
2723 goto out;
2724 default:
2725 err = true;
2726 netdev_dbg(amt->dev, "Invalid type of Gateway\n");
2727 break;
2728 }
2729 } else {
2730 switch (type) {
2731 case AMT_MSG_DISCOVERY:
2732 err = amt_discovery_handler(amt, skb);
2733 break;
2734 case AMT_MSG_REQUEST:
2735 err = amt_request_handler(amt, skb);
2736 break;
2737 case AMT_MSG_MEMBERSHIP_UPDATE:
2738 err = amt_update_handler(amt, skb);
2739 if (err)
2740 goto drop;
2741 else
2742 goto out;
2743 default:
2744 err = true;
2745 netdev_dbg(amt->dev, "Invalid type of relay\n");
2746 break;
2747 }
2748 }
2749 drop:
2750 if (err) {
2751 amt->dev->stats.rx_dropped++;
2752 kfree_skb(skb);
2753 } else {
2754 consume_skb(skb);
2755 }
2756 out:
2757 rcu_read_unlock_bh();
2758 return 0;
2759 }
You're changing line 2699, we used to bump the rx_dropped on line 2700
and then the goto on line 2701 takes us to line 2756 - unlock, return.
Now since you have replaced the goto on line 2701 with a "break" the
code will go from line 2701 to line 2749/2750. If err is set we'll
increase rx_dropped again on line 2751.
In other words rx_dropped will be increased both on line 2700 and
line 2751.
What am I missing?
Also I don't quite understand your commit message. The only thing we
used to skip is the freeing of the skb. Or do you mean we need to
return an error from amt_rcv() ?
^ permalink raw reply
* Re: [PATCH] net: unexport csum_and_copy_{from,to}_user
From: Al Viro @ 2022-05-17 22:05 UTC (permalink / raw)
To: Christoph Hellwig
Cc: akpm, x86, linux-alpha, linux-m68k, linuxppc-dev, linux-kernel,
netdev
In-Reply-To: <20220421070440.1282704-1-hch@lst.de>
On Thu, Apr 21, 2022 at 09:04:40AM +0200, Christoph Hellwig wrote:
> csum_and_copy_from_user and csum_and_copy_to_user are exported by
> a few architectures, but not actually used in modular code. Drop
> the exports.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Not sure which tree should it go through - Arnd's, perhaps?
^ permalink raw reply
* Re: [PATCHv2 0/3] perf tools: Fix prologue generation
From: Andrii Nakryiko @ 2022-05-17 22:02 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Jiri Olsa, Jiri Olsa, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, linux-perf-use., Networking, bpf, Ingo Molnar,
Namhyung Kim, Alexander Shishkin, Peter Zijlstra,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
Ian Rogers
In-Reply-To: <Ynv+7iaaAbyM38B6@kernel.org>
On Wed, May 11, 2022 at 11:22 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Em Wed, May 11, 2022 at 09:35:34AM +0200, Jiri Olsa escreveu:
> > On Tue, May 10, 2022 at 04:48:55PM -0700, Andrii Nakryiko wrote:
> > > On Tue, May 10, 2022 at 12:47 AM Jiri Olsa <jolsa@kernel.org> wrote:
> > > >
> > > > hi,
> > > > sending change we discussed some time ago [1] to get rid of
> > > > some deprecated functions we use in perf prologue code.
> > > >
> > > > Despite the gloomy discussion I think the final code does
> > > > not look that bad ;-)
> > > >
> > > > This patchset removes following libbpf functions from perf:
> > > > bpf_program__set_prep
> > > > bpf_program__nth_fd
> > > > struct bpf_prog_prep_result
> > > >
> > > > v2 changes:
> > > > - use fallback section prog handler, so we don't need to
> > > > use section prefix [Andrii]
> > > > - realloc prog->insns array in bpf_program__set_insns [Andrii]
> > > > - squash patch 1 from previous version with
> > > > bpf_program__set_insns change [Daniel]
> > > > - patch 3 already merged [Arnaldo]
> > > > - added more comments
> > > >
> > > > meanwhile.. perf/core and bpf-next diverged, so:
> > > > - libbpf bpf_program__set_insns change is based on bpf-next/master
> > > > - perf changes do not apply on bpf-next/master so they are based on
> > > > perf/core ... however they can be merged only after we release
> > > > libbpf 0.8.0 with bpf_program__set_insns change, so we don't break
> > > > the dynamic linking
> > > > I'm sending perf changes now just for review, I'll resend them
> > > > once libbpf 0.8.0 is released
> > > >
> > > > thanks,
> > > > jirka
> > > >
> > > >
> > > > [1] https://lore.kernel.org/bpf/CAEf4BzaiBO3_617kkXZdYJ8hS8YF--ZLgapNbgeeEJ-pY0H88g@mail.gmail.com/
> > > > ---
> > > > Jiri Olsa (1):
> > > > libbpf: Add bpf_program__set_insns function
> > > >
> > >
> > > The first patch looks good to me. The rest I can't really review and
> > > test properly, so I'll leave it up to Arnaldo.
> > >
> > > Arnaldo, how do we coordinate these patches? Should they go through
> > > bpf-next (after you Ack them) or you want them in your tree?
> > >
> > > I'd like to get the bpf_program__set_insns() patch into bpf-next so
> > > that I can do libbpf v0.8 release, having it in a separate tree is
> > > extremely inconvenient. Please let me know how you think we should
> > > proceed?
> >
> > we need to wait with perf changes after the libbpf is merged and
> > libbpf 0.8.0 is released.. so we don't break dynamic linking for
> > perf
> >
> > at the moment please just take libbpf change and I'll resend the
> > perf change later if needed
>
> Ok.
>
Jiri, libbpf v0.8 is out, can you please re-send your perf patches?
> - Arnaldo
^ permalink raw reply
* Re: [PATCH] vhost_net: fix double fget()
From: Al Viro @ 2022-05-17 22:00 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Jason Wang, kvm, virtualization, netdev, linux-kernel,
linux-fsdevel, ebiggers, davem
In-Reply-To: <20220516044400-mutt-send-email-mst@kernel.org>
On Mon, May 16, 2022 at 04:44:19AM -0400, Michael S. Tsirkin wrote:
> > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > Signed-off-by: Jason Wang <jasowang@redhat.com>
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
>
> and this is stable material I guess.
It is, except that commit message ought to be cleaned up. Something
along the lines of
----
Fix double fget() in vhost_net_set_backend()
Descriptor table is a shared resource; two fget() on the same descriptor
may return different struct file references. get_tap_ptr_ring() is
called after we'd found (and pinned) the socket we'll be using and it
tries to find the private tun/tap data structures associated with it.
Redoing the lookup by the same file descriptor we'd used to get the
socket is racy - we need to same struct file.
Thanks to Jason for spotting a braino in the original variant of patch -
I'd missed the use of fd == -1 for disabling backend, and in that case
we can end up with sock == NULL and sock != oldsock.
----
Does the above sound sane for commit message? And which tree would you
prefer it to go through? I can take it in vfs.git#fixes, or you could
take it into your tree...
^ permalink raw reply
* Re: [RFC PATCH bpf-next v2 2/7] cgroup: bpf: flush bpf stats on rstat flush
From: Yosry Ahmed @ 2022-05-17 21:51 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Hao Luo, Tejun Heo, Zefan Li, Johannes Weiner,
Shuah Khan, Roman Gushchin, Michal Hocko, Stanislav Fomichev,
David Rientjes, Greg Thelen, Shakeel Butt,
Linux Kernel Mailing List, Networking, bpf, cgroups
In-Reply-To: <20220517020840.vyfp5cit66fs2k2o@MBP-98dd607d3435.dhcp.thefacebook.com>
On Mon, May 16, 2022 at 7:08 PM Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
>
> On Sun, May 15, 2022 at 02:34:59AM +0000, Yosry Ahmed wrote:
> > +
> > +void bpf_rstat_flush(struct cgroup *cgrp, int cpu)
> > +{
> > + struct bpf_rstat_flusher *flusher;
> > + struct bpf_rstat_flush_ctx ctx = {
> > + .cgrp = cgrp,
> > + .parent = cgroup_parent(cgrp),
> > + .cpu = cpu,
> > + };
> > +
> > + rcu_read_lock();
> > + migrate_disable();
> > + spin_lock(&bpf_rstat_flushers_lock);
> > +
> > + list_for_each_entry(flusher, &bpf_rstat_flushers, list)
> > + (void) bpf_prog_run(flusher->prog, &ctx);
> > +
> > + spin_unlock(&bpf_rstat_flushers_lock);
> > + migrate_enable();
> > + rcu_read_unlock();
> > +}
> > diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c
> > index 24b5c2ab5598..0285d496e807 100644
> > --- a/kernel/cgroup/rstat.c
> > +++ b/kernel/cgroup/rstat.c
> > @@ -2,6 +2,7 @@
> > #include "cgroup-internal.h"
> >
> > #include <linux/sched/cputime.h>
> > +#include <linux/bpf-rstat.h>
> >
> > static DEFINE_SPINLOCK(cgroup_rstat_lock);
> > static DEFINE_PER_CPU(raw_spinlock_t, cgroup_rstat_cpu_lock);
> > @@ -168,6 +169,7 @@ static void cgroup_rstat_flush_locked(struct cgroup *cgrp, bool may_sleep)
> > struct cgroup_subsys_state *css;
> >
> > cgroup_base_stat_flush(pos, cpu);
> > + bpf_rstat_flush(pos, cpu);
>
> Please use the following approach instead:
>
> __weak noinline void bpf_rstat_flush(struct cgroup *cgrp, struct cgroup *parent, int cpu)
> {
> }
>
> and change above line to:
> bpf_rstat_flush(pos, cgroup_parent(pos), cpu);
>
> Then tracing bpf fentry progs will be able to attach to bpf_rstat_flush.
> Pretty much the patches 1, 2, 3 are not necessary.
> In patch 4 add bpf_cgroup_rstat_updated/flush as two kfuncs instead of stable helpers.
>
> This way patches 1,2,3,4 will become 2 trivial patches and we will be
> able to extend the interface between cgroup rstat and bpf whenever we need
> without worrying about uapi stability.
>
> We had similar discusison with HID subsystem that plans to use bpf in HID
> with the same approach.
> See this patch set:
> https://lore.kernel.org/bpf/20220421140740.459558-2-benjamin.tissoires@redhat.com/
> You'd need patch 1 from it to enable kfuncs for tracing.
>
> Your patch 5 is needed as-is.
> Yonghong,
> please review it.
> Different approach for patch 1-4 won't affect patch 5.
> Patches 6 and 7 look good.
>
> With this approach that patch 7 will mostly stay as-is. Instead of:
> +SEC("rstat/flush")
> +int vmscan_flush(struct bpf_rstat_flush_ctx *ctx)
> +{
> + struct vmscan_percpu *pcpu_stat;
> + struct vmscan *total_stat, *parent_stat;
> + struct cgroup *cgrp = ctx->cgrp, *parent = ctx->parent;
>
> it will become
>
> SEC("fentry/bpf_rstat_flush")
> int BPF_PROG(vmscan_flush, struct cgroup *cgrp, struct cgroup *parent, int cpu)
Thanks so much for taking the time to look into this.
Indeed, this approach looks cleaner and simpler. I will incorporate
that into a V1 and send it. Thanks!
^ permalink raw reply
* Re: [question] bonding: should assert dormant for active protocols like LACP?
From: Jay Vosburgh @ 2022-05-17 21:49 UTC (permalink / raw)
To: Jonathan Toppins
Cc: netdev@vger.kernel.org, Veaceslav Falico, Andy Gospodarek,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
In-Reply-To: <de8d8ca4-4ead-0cef-1315-8764d93503c1@redhat.com>
Jonathan Toppins <jtoppins@redhat.com> wrote:
>So running the following script:
>
>--%<-----
> ip link add name link-bond0 type veth peer name link-end0
> ip link add bond0 type bond mode 4 miimon 100
> ip link set link-bond0 master bond0 down
> ip netns add n1
> ip link set link-end0 netns n1 up
> ip link set bond0 up
> cat /sys/class/net/bond0/bonding/ad_partner_mac
> cat /sys/class/net/bond0/operstate
>--%<-----
>
>The bond reports its operstate to be "up" even though the bond will never
>be able to establish an LACP partner. Should bonding for active protocols,
>LACP, assert dormant[0] until the protocol has established and frames
>actually are passed?
>
>Having a predictable operstate where up actually means frames will attempt
>to be delivered would make management applications, f.e. Network Manager,
>easier to write. I have developers asking me what detailed states for LACP
>should they be looking for to determine when an LACP bond is "up". This
>seems like an incorrect implementation of operstate and RFC2863 3.1.12.
>
>Does anyone see why this would be a bad idea?
The catch with LACP is that it has a fallback, in that ports
that don't complete LACP negotiation go to "Solitary" state (I believe
this was called "Individual" in older versions of the 802.1AX / 802.3ad
standard; bonding calls this "is_individual" internally).
If there is no suitable partnered port, then a Solitary port is
made active. This permits connectivity if one end is set for LACP but
the other end is not (e.g., PXE boot to a switch port set for LACP).
For reference, I'm looking at 6.3.5 and 6.3.6 of IEEE 802.1AX-2020.
So, how should operstate be set if "has LACP partner" isn't
really the test for whether or not the interface is (to use RCC 2863
language) "in a condition to pass packets"? In your example above, I
believe the bond should be able to pass packets just fine, the packets
just won't go anywhere after they leave the bond.
-J
>-Jon
>
>[0] Documentation/networking/operstates.rst
>
---
-Jay Vosburgh, jay.vosburgh@canonical.com
^ permalink raw reply
* [PATCH net] ptp: ocp: change sysfs attr group handling
From: Jonathan Lemon @ 2022-05-17 21:46 UTC (permalink / raw)
To: zheyuma97, netdev
Cc: richardcochran, davem, kuba, pabeni, edumazet, kernel-team
In the detach path, the driver calls sysfs_remove_group() for the
groups it believes has been registered. However, if the group was
never previously registered, then this causes a splat.
Instead, compute the groups that should be registered in advance,
and then call sysfs_create_groups(), which registers them all at once.
Update the error handling appropriately.
Fixes: c205d53c4923 ("ptp: ocp: Add firmware capability bits for feature gating")
Reported-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
---
drivers/ptp/ptp_ocp.c | 57 +++++++++++++++++++++++++++++++------------
1 file changed, 42 insertions(+), 15 deletions(-)
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 36c0e188216b..860672d6a03c 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -300,7 +300,7 @@ struct ptp_ocp {
struct platform_device *spi_flash;
struct clk_hw *i2c_clk;
struct timer_list watchdog;
- const struct ocp_attr_group *attr_tbl;
+ const struct attribute_group **attr_group;
const struct ptp_ocp_eeprom_map *eeprom_map;
struct dentry *debug_root;
time64_t gnss_lost;
@@ -1836,6 +1836,42 @@ ptp_ocp_signal_init(struct ptp_ocp *bp)
bp->signal_out[i]->mem);
}
+static void
+ptp_ocp_attr_group_del(struct ptp_ocp *bp)
+{
+ sysfs_remove_groups(&bp->dev.kobj, bp->attr_group);
+ kfree(bp->attr_group);
+}
+
+static int
+ptp_ocp_attr_group_add(struct ptp_ocp *bp,
+ const struct ocp_attr_group *attr_tbl)
+{
+ int count, i;
+ int err;
+
+ count = 0;
+ for (i = 0; attr_tbl[i].cap; i++)
+ if (attr_tbl[i].cap & bp->fw_cap)
+ count++;
+
+ bp->attr_group = kcalloc(count + 1, sizeof(struct attribute_group *),
+ GFP_KERNEL);
+ if (!bp->attr_group)
+ return -ENOMEM;
+
+ count = 0;
+ for (i = 0; attr_tbl[i].cap; i++)
+ if (attr_tbl[i].cap & bp->fw_cap)
+ bp->attr_group[count++] = attr_tbl[i].group;
+
+ err = sysfs_create_groups(&bp->dev.kobj, bp->attr_group);
+ if (err)
+ bp->attr_group[0] = NULL;
+
+ return err;
+}
+
static void
ptp_ocp_sma_init(struct ptp_ocp *bp)
{
@@ -1905,7 +1941,6 @@ ptp_ocp_fb_board_init(struct ptp_ocp *bp, struct ocp_resource *r)
bp->flash_start = 1024 * 4096;
bp->eeprom_map = fb_eeprom_map;
bp->fw_version = ioread32(&bp->image->version);
- bp->attr_tbl = fb_timecard_groups;
bp->fw_cap = OCP_CAP_BASIC;
ver = bp->fw_version & 0xffff;
@@ -1919,6 +1954,10 @@ ptp_ocp_fb_board_init(struct ptp_ocp *bp, struct ocp_resource *r)
ptp_ocp_sma_init(bp);
ptp_ocp_signal_init(bp);
+ err = ptp_ocp_attr_group_add(bp, fb_timecard_groups);
+ if (err)
+ return err;
+
err = ptp_ocp_fb_set_pins(bp);
if (err)
return err;
@@ -3389,7 +3428,6 @@ ptp_ocp_complete(struct ptp_ocp *bp)
{
struct pps_device *pps;
char buf[32];
- int i, err;
if (bp->gnss_port != -1) {
sprintf(buf, "ttyS%d", bp->gnss_port);
@@ -3414,14 +3452,6 @@ ptp_ocp_complete(struct ptp_ocp *bp)
if (pps)
ptp_ocp_symlink(bp, pps->dev, "pps");
- for (i = 0; bp->attr_tbl[i].cap; i++) {
- if (!(bp->attr_tbl[i].cap & bp->fw_cap))
- continue;
- err = sysfs_create_group(&bp->dev.kobj, bp->attr_tbl[i].group);
- if (err)
- return err;
- }
-
ptp_ocp_debugfs_add_device(bp);
return 0;
@@ -3493,15 +3523,11 @@ static void
ptp_ocp_detach_sysfs(struct ptp_ocp *bp)
{
struct device *dev = &bp->dev;
- int i;
sysfs_remove_link(&dev->kobj, "ttyGNSS");
sysfs_remove_link(&dev->kobj, "ttyMAC");
sysfs_remove_link(&dev->kobj, "ptp");
sysfs_remove_link(&dev->kobj, "pps");
- if (bp->attr_tbl)
- for (i = 0; bp->attr_tbl[i].cap; i++)
- sysfs_remove_group(&dev->kobj, bp->attr_tbl[i].group);
}
static void
@@ -3511,6 +3537,7 @@ ptp_ocp_detach(struct ptp_ocp *bp)
ptp_ocp_debugfs_remove_device(bp);
ptp_ocp_detach_sysfs(bp);
+ ptp_ocp_attr_group_del(bp);
if (timer_pending(&bp->watchdog))
del_timer_sync(&bp->watchdog);
if (bp->ts0)
--
2.31.1
^ permalink raw reply related
* Re: [PATCH bpf-next v3 4/4] bpf_trace: pass array of u64 values in kprobe_multi.addrs
From: Yonghong Song @ 2022-05-17 21:34 UTC (permalink / raw)
To: Jiri Olsa, Eugene Syromiatnikov
Cc: Masami Hiramatsu, Steven Rostedt, Ingo Molnar, Alexei Starovoitov,
Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
John Fastabend, KP Singh, netdev, bpf, linux-kernel, Shuah Khan,
linux-kselftest
In-Reply-To: <YoP/eEMqAn3sVFXf@krava>
On 5/17/22 1:03 PM, Jiri Olsa wrote:
> On Tue, May 17, 2022 at 02:30:50PM +0200, Eugene Syromiatnikov wrote:
>> On Tue, May 17, 2022 at 11:12:34AM +0200, Jiri Olsa wrote:
>>> On Tue, May 17, 2022 at 09:36:47AM +0200, Eugene Syromiatnikov wrote:
>>>> With the interface as defined, it is impossible to pass 64-bit kernel
>>>> addresses from a 32-bit userspace process in BPF_LINK_TYPE_KPROBE_MULTI,
>>>> which severly limits the useability of the interface, change the ABI
>>>> to accept an array of u64 values instead of (kernel? user?) longs.
>>>> Interestingly, the rest of the libbpf infrastructure uses 64-bit values
>>>> for kallsyms addresses already, so this patch also eliminates
>>>> the sym_addr cast in tools/lib/bpf/libbpf.c:resolve_kprobe_multi_cb().
>>>
>>> so the problem is when we have 32bit user sace on 64bit kernel right?
>>>
>>> I think we should keep addrs as longs in uapi and have kernel to figure out
>>> if it needs to read u32 or u64, like you did for symbols in previous patch
>>
>> No, it's not possible here, as addrs are kernel addrs and not user space
>> addrs, so user space has to explicitly pass 64-bit addresses on 64-bit
>> kernels (or have a notion whether it is running on a 64-bit
>> or 32-bit kernel, and form the passed array accordingly, which is against
>> the idea of compat layer that tries to abstract it out).
>
> hum :-\ I'll need to check on compat layer.. there must
> be some other code doing this already somewhere, right?
I am not familiar with all these compatibility thing. But if we
have 64-bit pointer for **syms, maybe we could also have
64-bit pointer for *syms for consistency?
> jirka
>
>>
>>> we'll need to fix also bpf_kprobe_multi_cookie_swap because it assumes
>>> 64bit user space pointers
>>>
>>> would be gret if we could have selftest for this
>>>
>>> thanks,
>>> jirka
>>>
>>>>
>>>> Fixes: 0dcac272540613d4 ("bpf: Add multi kprobe link")
>>>> Fixes: 5117c26e877352bc ("libbpf: Add bpf_link_create support for multi kprobes")
>>>> Fixes: ddc6b04989eb0993 ("libbpf: Add bpf_program__attach_kprobe_multi_opts function")
>>>> Fixes: f7a11eeccb111854 ("selftests/bpf: Add kprobe_multi attach test")
>>>> Fixes: 9271a0c7ae7a9147 ("selftests/bpf: Add attach test for bpf_program__attach_kprobe_multi_opts")
>>>> Fixes: 2c6401c966ae1fbe ("selftests/bpf: Add kprobe_multi bpf_cookie test")
>>>> Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
>>>> ---
>>>> kernel/trace/bpf_trace.c | 25 ++++++++++++++++++----
>>>> tools/lib/bpf/bpf.h | 2 +-
>>>> tools/lib/bpf/libbpf.c | 8 +++----
>>>> tools/lib/bpf/libbpf.h | 2 +-
>>>> .../testing/selftests/bpf/prog_tests/bpf_cookie.c | 2 +-
>>>> .../selftests/bpf/prog_tests/kprobe_multi_test.c | 8 +++----
>>>> 6 files changed, 32 insertions(+), 15 deletions(-)
>>>>
>>>> diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
>>>> index 9d3028a..30a15b3 100644
>>>> --- a/kernel/trace/bpf_trace.c
>>>> +++ b/kernel/trace/bpf_trace.c
>>>> @@ -2454,7 +2454,7 @@ int bpf_kprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *pr
>>>> void __user *ucookies;
>>>> unsigned long *addrs;
>>>> u32 flags, cnt, size, cookies_size;
>>>> - void __user *uaddrs;
>>>> + u64 __user *uaddrs;
>>>> u64 *cookies = NULL;
>>>> void __user *usyms;
>>>> int err;
>>>> @@ -2486,9 +2486,26 @@ int bpf_kprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *pr
>>>> return -ENOMEM;
>>>>
>>>> if (uaddrs) {
>>>> - if (copy_from_user(addrs, uaddrs, size)) {
>>>> - err = -EFAULT;
>>>> - goto error;
>>>> + if (sizeof(*addrs) == sizeof(*uaddrs)) {
>>>> + if (copy_from_user(addrs, uaddrs, size)) {
>>>> + err = -EFAULT;
>>>> + goto error;
>>>> + }
>>>> + } else {
>>>> + u32 i;
>>>> + u64 addr;
>>>> +
>>>> + for (i = 0; i < cnt; i++) {
>>>> + if (get_user(addr, uaddrs + i)) {
>>>> + err = -EFAULT;
>>>> + goto error;
>>>> + }
>>>> + if (addr > ULONG_MAX) {
>>>> + err = -EINVAL;
>>>> + goto error;
>>>> + }
>>>> + addrs[i] = addr;
>>>> + }
>>>> }
>>>> } else {
>>>> struct user_syms us;
>>>> diff --git a/tools/lib/bpf/bpf.h b/tools/lib/bpf/bpf.h
>>>> index 2e0d373..da9c6037 100644
>>>> --- a/tools/lib/bpf/bpf.h
>>>> +++ b/tools/lib/bpf/bpf.h
>>>> @@ -418,7 +418,7 @@ struct bpf_link_create_opts {
>>>> __u32 flags;
>>>> __u32 cnt;
>>>> const char **syms;
>>>> - const unsigned long *addrs;
>>>> + const __u64 *addrs;
>>>> const __u64 *cookies;
>>>> } kprobe_multi;
>>>> struct {
>>>> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
>>>> index ef7f302..35fa9c5 100644
>>>> --- a/tools/lib/bpf/libbpf.c
>>>> +++ b/tools/lib/bpf/libbpf.c
>>>> @@ -10737,7 +10737,7 @@ static bool glob_match(const char *str, const char *pat)
>>>>
>>>> struct kprobe_multi_resolve {
>>>> const char *pattern;
>>>> - unsigned long *addrs;
>>>> + __u64 *addrs;
>>>> size_t cap;
>>>> size_t cnt;
>>>> };
>>>> @@ -10752,12 +10752,12 @@ resolve_kprobe_multi_cb(unsigned long long sym_addr, char sym_type,
>>>> if (!glob_match(sym_name, res->pattern))
>>>> return 0;
>>>>
>>>> - err = libbpf_ensure_mem((void **) &res->addrs, &res->cap, sizeof(unsigned long),
>>>> + err = libbpf_ensure_mem((void **) &res->addrs, &res->cap, sizeof(__u64),
>>>> res->cnt + 1);
>>>> if (err)
>>>> return err;
>>>>
>>>> - res->addrs[res->cnt++] = (unsigned long) sym_addr;
>>>> + res->addrs[res->cnt++] = sym_addr;
>>>> return 0;
>>>> }
[...]
^ permalink raw reply
* Re: [PATCH bpf-next v4 5/7] selftests/bpf: verify token of struct mptcp_sock
From: Martin KaFai Lau @ 2022-05-17 21:30 UTC (permalink / raw)
To: Geliang Tang
Cc: Mat Martineau, Geliang Tang, Networking, bpf, Alexei Starovoitov,
Daniel Borkmann, Andrii Nakryiko, MPTCP Upstream, Matthieu Baerts
In-Reply-To: <CA+WQbwuenfY9Pxet6g0Tvo++JOAmU98+QymuWVsi-2iRpPq3oQ@mail.gmail.com>
On Tue, May 17, 2022 at 01:19:38PM +0800, Geliang Tang wrote:
> Martin KaFai Lau <kafai@fb.com> 于2022年5月17日周二 09:32写道:
> >
> > On Fri, May 13, 2022 at 03:48:25PM -0700, Mat Martineau wrote:
> > [ ... ]
> >
> > > +/*
> > > + * Parse the token from the output of 'ip mptcp monitor':
> > > + *
> > > + * [ CREATED] token=3ca933d3 remid=0 locid=0 saddr4=127.0.0.1 ...
> > > + * [ CREATED] token=2ab57040 remid=0 locid=0 saddr4=127.0.0.1 ...
> > How stable is the string format ?
> >
> > If it happens to have some unrelated mptcp connection going on, will the test
> > break ?
>
> Hi Martin,
>
> Yes, it will break in that case. How can I fix this? Should I run the
> test in a special net namespace?
>
> 'ip mptcp monitor' can easily run in a special net namespace:
>
> ip -net ns1 mptcp monitor
>
> But I don't know how to run start_server() and connect_to_fd() in a
> special namespace. Could you please give me some suggestions about
> this?
You can take a look at the open_netns() usages under prog_tests/.
For example, tc_redirect.c.
I would also avoid string matching from "ip mptcp monitor" if possible
considering the command may not have support (test skip) and the
string format may change also.
One option, you can consider to directly trace some of the mptcp
functions by using bpf fentry/fexit prog to obtain the token and
save it in a global bpf variable.
Search 'SEC("fentry' or 'SEC("fexit' for some examples. Then
the iproute2 support testing and the test skip logic can go away.
Suggesting them here because the test will have better chance
to catch issue if the test is not skipped or failed because
of string format not match. I won't insist on not using
"ip mptcp monitor" though.
^ permalink raw reply
* Re: [PATCH net-next v2] net: txgbe: Add build support for txgbe
From: kernel test robot @ 2022-05-17 21:28 UTC (permalink / raw)
To: Jiawen Wu, netdev; +Cc: kbuild-all, Jiawen Wu
In-Reply-To: <20220517092109.8161-1-jiawenwu@trustnetic.com>
Hi Jiawen,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Jiawen-Wu/net-txgbe-Add-build-support-for-txgbe/20220517-171540
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 6251264fedde83ade6f0f1f7049037469dd4de0b
config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20220518/202205180531.6Hzhl9KN-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/bbd3d7eec488dc00f9b366f24e12bcb793cdd0bc
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jiawen-Wu/net-txgbe-Add-build-support-for-txgbe/20220517-171540
git checkout bbd3d7eec488dc00f9b366f24e12bcb793cdd0bc
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/net/ethernet/wangxun/txgbe/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c: In function 'txgbe_probe':
>> drivers/net/ethernet/wangxun/txgbe/txgbe_main.c:171:14: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
171 | hw = vmalloc(sizeof(*hw));
| ^~~~~~~
| kvmalloc
>> drivers/net/ethernet/wangxun/txgbe/txgbe_main.c:171:12: warning: assignment to 'struct txgbe_hw *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
171 | hw = vmalloc(sizeof(*hw));
| ^
>> drivers/net/ethernet/wangxun/txgbe/txgbe_main.c:177:9: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
177 | vfree(hw);
| ^~~~~
| kvfree
cc1: some warnings being treated as errors
vim +171 drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
119
120 /**
121 * txgbe_probe - Device Initialization Routine
122 * @pdev: PCI device information struct
123 * @ent: entry in txgbe_pci_tbl
124 *
125 * Returns 0 on success, negative on failure
126 *
127 * txgbe_probe initializes an adapter identified by a pci_dev structure.
128 * The OS initialization, configuring of the adapter private structure,
129 * and a hardware reset occur.
130 **/
131 static int txgbe_probe(struct pci_dev *pdev,
132 const struct pci_device_id __always_unused *ent)
133 {
134 struct net_device *netdev;
135 struct txgbe_adapter *adapter = NULL;
136 struct txgbe_hw *hw = NULL;
137 int err, pci_using_dac;
138 unsigned int indices = MAX_TX_QUEUES;
139 bool disable_dev = false;
140
141 err = pci_enable_device_mem(pdev);
142 if (err)
143 return err;
144
145 if (!dma_set_mask(pci_dev_to_dev(pdev), DMA_BIT_MASK(64)) &&
146 !dma_set_coherent_mask(pci_dev_to_dev(pdev), DMA_BIT_MASK(64))) {
147 pci_using_dac = 1;
148 } else {
149 err = dma_set_mask(pci_dev_to_dev(pdev), DMA_BIT_MASK(32));
150 if (err) {
151 err = dma_set_coherent_mask(pci_dev_to_dev(pdev),
152 DMA_BIT_MASK(32));
153 if (err) {
154 dev_err(pci_dev_to_dev(pdev),
155 "No usable DMA configuration, aborting\n");
156 goto err_dma;
157 }
158 }
159 pci_using_dac = 0;
160 }
161
162 err = pci_request_selected_regions(pdev,
163 pci_select_bars(pdev, IORESOURCE_MEM),
164 txgbe_driver_name);
165 if (err) {
166 dev_err(pci_dev_to_dev(pdev),
167 "pci_request_selected_regions failed 0x%x\n", err);
168 goto err_pci_reg;
169 }
170
> 171 hw = vmalloc(sizeof(*hw));
172 if (!hw)
173 return -ENOMEM;
174
175 hw->vendor_id = pdev->vendor;
176 hw->device_id = pdev->device;
> 177 vfree(hw);
178
179 pci_enable_pcie_error_reporting(pdev);
180 pci_set_master(pdev);
181 /* errata 16 */
182 if (MAX_REQUEST_SIZE == 512) {
183 pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL,
184 PCI_EXP_DEVCTL_READRQ,
185 0x2000);
186 } else {
187 pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL,
188 PCI_EXP_DEVCTL_READRQ,
189 0x1000);
190 }
191
192 netdev = alloc_etherdev_mq(sizeof(struct txgbe_adapter), indices);
193 if (!netdev) {
194 err = -ENOMEM;
195 goto err_alloc_etherdev;
196 }
197
198 SET_NETDEV_DEV(netdev, pci_dev_to_dev(pdev));
199
200 adapter = netdev_priv(netdev);
201 adapter->netdev = netdev;
202 adapter->pdev = pdev;
203 hw = &adapter->hw;
204 hw->back = adapter;
205 adapter->msg_enable = (1 << DEFAULT_DEBUG_LEVEL_SHIFT) - 1;
206
207 hw->hw_addr = ioremap(pci_resource_start(pdev, 0),
208 pci_resource_len(pdev, 0));
209 adapter->io_addr = hw->hw_addr;
210 if (!hw->hw_addr) {
211 err = -EIO;
212 goto err_ioremap;
213 }
214
215 strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
216
217 /* setup the private structure */
218 err = txgbe_sw_init(adapter);
219 if (err)
220 goto err_sw_init;
221
222 if (pci_using_dac)
223 netdev->features |= NETIF_F_HIGHDMA;
224
225 err_sw_init:
226 iounmap(adapter->io_addr);
227 err_ioremap:
228 disable_dev = !test_and_set_bit(__TXGBE_DISABLED, &adapter->state);
229 free_netdev(netdev);
230 err_alloc_etherdev:
231 pci_release_selected_regions(pdev,
232 pci_select_bars(pdev, IORESOURCE_MEM));
233 err_pci_reg:
234 err_dma:
235 if (!adapter || disable_dev)
236 pci_disable_device(pdev);
237 return err;
238 }
239
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply
* [PATCH net-next 3/3] ice: add write functionality for GNSS TTY
From: Tony Nguyen @ 2022-05-17 21:19 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Karol Kolacinski, netdev, anthony.l.nguyen, richardcochran,
Gurucharan
In-Reply-To: <20220517211935.1949447-1-anthony.l.nguyen@intel.com>
From: Karol Kolacinski <karol.kolacinski@intel.com>
Add the possibility to write raw bytes to the GNSS module through the
first TTY device. This allows user to configure the module using the
publicly available u-blox UBX protocol (version 29) commands.
Create a second read-only TTY device.
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice.h | 4 +-
drivers/net/ethernet/intel/ice/ice_gnss.c | 241 +++++++++++++++++++---
drivers/net/ethernet/intel/ice/ice_gnss.h | 26 ++-
3 files changed, 240 insertions(+), 31 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 60453b3b8d23..5c472ed99c7a 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -544,8 +544,8 @@ struct ice_pf {
u32 msg_enable;
struct ice_ptp ptp;
struct tty_driver *ice_gnss_tty_driver;
- struct tty_port gnss_tty_port;
- struct gnss_serial *gnss_serial;
+ struct tty_port *gnss_tty_port[ICE_GNSS_TTY_MINOR_DEVICES];
+ struct gnss_serial *gnss_serial[ICE_GNSS_TTY_MINOR_DEVICES];
u16 num_rdma_msix; /* Total MSIX vectors for RDMA driver */
u16 rdma_base_vector;
diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.c b/drivers/net/ethernet/intel/ice/ice_gnss.c
index c6d755f707aa..4b7b762cd787 100644
--- a/drivers/net/ethernet/intel/ice/ice_gnss.c
+++ b/drivers/net/ethernet/intel/ice/ice_gnss.c
@@ -1,10 +1,102 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2018-2021, Intel Corporation. */
+/* Copyright (C) 2021-2022, Intel Corporation. */
#include "ice.h"
#include "ice_lib.h"
#include <linux/tty_driver.h>
+/**
+ * ice_gnss_do_write - Write data to internal GNSS
+ * @pf: board private structure
+ * @buf: command buffer
+ * @size: command buffer size
+ *
+ * Write UBX command data to the GNSS receiver
+ */
+static unsigned int
+ice_gnss_do_write(struct ice_pf *pf, unsigned char *buf, unsigned int size)
+{
+ struct ice_aqc_link_topo_addr link_topo;
+ struct ice_hw *hw = &pf->hw;
+ unsigned int offset = 0;
+ int err = 0;
+
+ memset(&link_topo, 0, sizeof(struct ice_aqc_link_topo_addr));
+ link_topo.topo_params.index = ICE_E810T_GNSS_I2C_BUS;
+ link_topo.topo_params.node_type_ctx |=
+ FIELD_PREP(ICE_AQC_LINK_TOPO_NODE_CTX_M,
+ ICE_AQC_LINK_TOPO_NODE_CTX_OVERRIDE);
+
+ /* It's not possible to write a single byte to u-blox.
+ * Write all bytes in a loop until there are 6 or less bytes left. If
+ * there are exactly 6 bytes left, the last write would be only a byte.
+ * In this case, do 4+2 bytes writes instead of 5+1. Otherwise, do the
+ * last 2 to 5 bytes write.
+ */
+ while (size - offset > ICE_GNSS_UBX_WRITE_BYTES + 1) {
+ err = ice_aq_write_i2c(hw, link_topo, ICE_GNSS_UBX_I2C_BUS_ADDR,
+ cpu_to_le16(buf[offset]),
+ ICE_MAX_I2C_WRITE_BYTES,
+ &buf[offset + 1], NULL);
+ if (err)
+ goto exit;
+
+ offset += ICE_GNSS_UBX_WRITE_BYTES;
+ }
+
+ /* Single byte would be written. Write 4 bytes instead of 5. */
+ if (size - offset == ICE_GNSS_UBX_WRITE_BYTES + 1) {
+ err = ice_aq_write_i2c(hw, link_topo, ICE_GNSS_UBX_I2C_BUS_ADDR,
+ cpu_to_le16(buf[offset]),
+ ICE_MAX_I2C_WRITE_BYTES - 1,
+ &buf[offset + 1], NULL);
+ if (err)
+ goto exit;
+
+ offset += ICE_GNSS_UBX_WRITE_BYTES - 1;
+ }
+
+ /* Do the last write, 2 to 5 bytes. */
+ err = ice_aq_write_i2c(hw, link_topo, ICE_GNSS_UBX_I2C_BUS_ADDR,
+ cpu_to_le16(buf[offset]), size - offset - 1,
+ &buf[offset + 1], NULL);
+ if (!err)
+ offset = size;
+
+exit:
+ if (err)
+ dev_err(ice_pf_to_dev(pf), "GNSS failed to write, offset=%u, size=%u, err=%d\n",
+ offset, size, err);
+
+ return offset;
+}
+
+/**
+ * ice_gnss_write_pending - Write all pending data to internal GNSS
+ * @work: GNSS write work structure
+ */
+static void ice_gnss_write_pending(struct kthread_work *work)
+{
+ struct gnss_serial *gnss = container_of(work, struct gnss_serial,
+ write_work);
+ struct ice_pf *pf = gnss->back;
+
+ if (!list_empty(&gnss->queue)) {
+ struct gnss_write_buf *write_buf = NULL;
+ unsigned int bytes;
+
+ write_buf = list_first_entry(&gnss->queue,
+ struct gnss_write_buf, queue);
+
+ bytes = ice_gnss_do_write(pf, write_buf->buf, write_buf->size);
+ dev_dbg(ice_pf_to_dev(pf), "%u bytes written to GNSS\n", bytes);
+
+ list_del(&write_buf->queue);
+ kfree(write_buf->buf);
+ kfree(write_buf);
+ }
+}
+
/**
* ice_gnss_read - Read data from internal GNSS module
* @work: GNSS read work structure
@@ -104,8 +196,9 @@ static void ice_gnss_read(struct kthread_work *work)
/**
* ice_gnss_struct_init - Initialize GNSS structure for the TTY
* @pf: Board private structure
+ * @index: TTY device index
*/
-static struct gnss_serial *ice_gnss_struct_init(struct ice_pf *pf)
+static struct gnss_serial *ice_gnss_struct_init(struct ice_pf *pf, int index)
{
struct device *dev = ice_pf_to_dev(pf);
struct kthread_worker *kworker;
@@ -118,9 +211,11 @@ static struct gnss_serial *ice_gnss_struct_init(struct ice_pf *pf)
mutex_init(&gnss->gnss_mutex);
gnss->open_count = 0;
gnss->back = pf;
- pf->gnss_serial = gnss;
+ pf->gnss_serial[index] = gnss;
kthread_init_delayed_work(&gnss->read_work, ice_gnss_read);
+ INIT_LIST_HEAD(&gnss->queue);
+ kthread_init_work(&gnss->write_work, ice_gnss_write_pending);
/* Allocate a kworker for handling work required for the GNSS TTY
* writes.
*/
@@ -156,10 +251,10 @@ static int ice_gnss_tty_open(struct tty_struct *tty, struct file *filp)
tty->driver_data = NULL;
/* Get the serial object associated with this tty pointer */
- gnss = pf->gnss_serial;
+ gnss = pf->gnss_serial[tty->index];
if (!gnss) {
/* Initialize GNSS struct on the first device open */
- gnss = ice_gnss_struct_init(pf);
+ gnss = ice_gnss_struct_init(pf, tty->index);
if (!gnss)
return -ENOMEM;
}
@@ -212,25 +307,100 @@ static void ice_gnss_tty_close(struct tty_struct *tty, struct file *filp)
}
/**
- * ice_gnss_tty_write - Dummy TTY write function to avoid kernel panic
+ * ice_gnss_tty_write - Write GNSS data
* @tty: pointer to the tty_struct
* @buf: pointer to the user data
- * @cnt: the number of characters that was able to be sent to the hardware (or
- * queued to be sent at a later time)
+ * @count: the number of characters queued to be sent to the HW
+ *
+ * The write function call is called by the user when there is data to be sent
+ * to the hardware. First the tty core receives the call, and then it passes the
+ * data on to the tty driver's write function. The tty core also tells the tty
+ * driver the size of the data being sent.
+ * If any errors happen during the write call, a negative error value should be
+ * returned instead of the number of characters queued to be written.
*/
static int
-ice_gnss_tty_write(struct tty_struct *tty, const unsigned char *buf, int cnt)
+ice_gnss_tty_write(struct tty_struct *tty, const unsigned char *buf, int count)
{
- return 0;
+ struct gnss_write_buf *write_buf;
+ struct gnss_serial *gnss;
+ unsigned char *cmd_buf;
+ struct ice_pf *pf;
+ int err = count;
+
+ /* We cannot write a single byte using our I2C implementation. */
+ if (count <= 1 || count > ICE_GNSS_TTY_WRITE_BUF)
+ return -EINVAL;
+
+ gnss = tty->driver_data;
+ if (!gnss)
+ return -EFAULT;
+
+ pf = (struct ice_pf *)tty->driver->driver_state;
+ if (!pf)
+ return -EFAULT;
+
+ /* Only allow to write on TTY 0 */
+ if (gnss != pf->gnss_serial[0])
+ return -EIO;
+
+ mutex_lock(&gnss->gnss_mutex);
+
+ if (!gnss->open_count) {
+ err = -EINVAL;
+ goto exit;
+ }
+
+ cmd_buf = kcalloc(count, sizeof(*buf), GFP_KERNEL);
+ if (!cmd_buf) {
+ err = -ENOMEM;
+ goto exit;
+ }
+
+ memcpy(cmd_buf, buf, count);
+
+ /* Send the data out to a hardware port */
+ write_buf = kzalloc(sizeof(*write_buf), GFP_KERNEL);
+ if (!write_buf) {
+ err = -ENOMEM;
+ goto exit;
+ }
+
+ write_buf->buf = cmd_buf;
+ write_buf->size = count;
+ INIT_LIST_HEAD(&write_buf->queue);
+ list_add_tail(&write_buf->queue, &gnss->queue);
+ kthread_queue_work(gnss->kworker, &gnss->write_work);
+exit:
+ mutex_unlock(&gnss->gnss_mutex);
+ return err;
}
/**
- * ice_gnss_tty_write_room - Dummy TTY write_room function to avoid kernel panic
+ * ice_gnss_tty_write_room - Returns the numbers of characters to be written.
* @tty: pointer to the tty_struct
+ *
+ * This routine returns the numbers of characters the tty driver will accept
+ * for queuing to be written or 0 if either the TTY is not open or user
+ * tries to write to the TTY other than the first.
*/
static unsigned int ice_gnss_tty_write_room(struct tty_struct *tty)
{
- return 0;
+ struct gnss_serial *gnss = tty->driver_data;
+
+ /* Only allow to write on TTY 0*/
+ if (!gnss || gnss != gnss->back->gnss_serial[0])
+ return 0;
+
+ mutex_lock(&gnss->gnss_mutex);
+
+ if (!gnss->open_count) {
+ mutex_unlock(&gnss->gnss_mutex);
+ return 0;
+ }
+
+ mutex_unlock(&gnss->gnss_mutex);
+ return ICE_GNSS_TTY_WRITE_BUF;
}
static const struct tty_operations tty_gps_ops = {
@@ -250,11 +420,13 @@ static struct tty_driver *ice_gnss_create_tty_driver(struct ice_pf *pf)
const int ICE_TTYDRV_NAME_MAX = 14;
struct tty_driver *tty_driver;
char *ttydrv_name;
+ unsigned int i;
int err;
- tty_driver = tty_alloc_driver(1, TTY_DRIVER_REAL_RAW);
+ tty_driver = tty_alloc_driver(ICE_GNSS_TTY_MINOR_DEVICES,
+ TTY_DRIVER_REAL_RAW);
if (IS_ERR(tty_driver)) {
- dev_err(ice_pf_to_dev(pf), "Failed to allocate memory for GNSS TTY\n");
+ dev_err(dev, "Failed to allocate memory for GNSS TTY\n");
return NULL;
}
@@ -284,23 +456,32 @@ static struct tty_driver *ice_gnss_create_tty_driver(struct ice_pf *pf)
tty_driver->driver_state = pf;
tty_set_operations(tty_driver, &tty_gps_ops);
- pf->gnss_serial = NULL;
+ for (i = 0; i < ICE_GNSS_TTY_MINOR_DEVICES; i++) {
+ pf->gnss_tty_port[i] = kzalloc(sizeof(*pf->gnss_tty_port[i]),
+ GFP_KERNEL);
+ pf->gnss_serial[i] = NULL;
- tty_port_init(&pf->gnss_tty_port);
- tty_port_link_device(&pf->gnss_tty_port, tty_driver, 0);
+ tty_port_init(pf->gnss_tty_port[i]);
+ tty_port_link_device(pf->gnss_tty_port[i], tty_driver, i);
+ }
err = tty_register_driver(tty_driver);
if (err) {
- dev_err(ice_pf_to_dev(pf), "Failed to register TTY driver err=%d\n",
- err);
+ dev_err(dev, "Failed to register TTY driver err=%d\n", err);
- tty_port_destroy(&pf->gnss_tty_port);
+ for (i = 0; i < ICE_GNSS_TTY_MINOR_DEVICES; i++) {
+ tty_port_destroy(pf->gnss_tty_port[i]);
+ kfree(pf->gnss_tty_port[i]);
+ }
kfree(ttydrv_name);
tty_driver_kref_put(pf->ice_gnss_tty_driver);
return NULL;
}
+ for (i = 0; i < ICE_GNSS_TTY_MINOR_DEVICES; i++)
+ dev_info(dev, "%s%d registered\n", ttydrv_name, i);
+
return tty_driver;
}
@@ -328,17 +509,25 @@ void ice_gnss_init(struct ice_pf *pf)
*/
void ice_gnss_exit(struct ice_pf *pf)
{
+ unsigned int i;
+
if (!test_bit(ICE_FLAG_GNSS, pf->flags) || !pf->ice_gnss_tty_driver)
return;
- tty_port_destroy(&pf->gnss_tty_port);
+ for (i = 0; i < ICE_GNSS_TTY_MINOR_DEVICES; i++) {
+ if (pf->gnss_tty_port[i]) {
+ tty_port_destroy(pf->gnss_tty_port[i]);
+ kfree(pf->gnss_tty_port[i]);
+ }
- if (pf->gnss_serial) {
- struct gnss_serial *gnss = pf->gnss_serial;
+ if (pf->gnss_serial[i]) {
+ struct gnss_serial *gnss = pf->gnss_serial[i];
- kthread_cancel_delayed_work_sync(&gnss->read_work);
- kfree(gnss);
- pf->gnss_serial = NULL;
+ kthread_cancel_work_sync(&gnss->write_work);
+ kthread_cancel_delayed_work_sync(&gnss->read_work);
+ kfree(gnss);
+ pf->gnss_serial[i] = NULL;
+ }
}
tty_unregister_driver(pf->ice_gnss_tty_driver);
diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.h b/drivers/net/ethernet/intel/ice/ice_gnss.h
index 9211adb2372c..1f569a6e09a1 100644
--- a/drivers/net/ethernet/intel/ice/ice_gnss.h
+++ b/drivers/net/ethernet/intel/ice/ice_gnss.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2018-2021, Intel Corporation. */
+/* Copyright (C) 2021-2022, Intel Corporation. */
#ifndef _ICE_GNSS_H_
#define _ICE_GNSS_H_
@@ -8,14 +8,30 @@
#include <linux/tty_flip.h>
#define ICE_E810T_GNSS_I2C_BUS 0x2
+#define ICE_GNSS_TIMER_DELAY_TIME (HZ / 10) /* 0.1 second per message */
+#define ICE_GNSS_TTY_MINOR_DEVICES 2
+#define ICE_GNSS_TTY_WRITE_BUF 250
+#define ICE_MAX_I2C_DATA_SIZE FIELD_MAX(ICE_AQC_I2C_DATA_SIZE_M)
+#define ICE_MAX_I2C_WRITE_BYTES 4
+
+/* u-blox specific definitions */
#define ICE_GNSS_UBX_I2C_BUS_ADDR 0x42
/* Data length register is big endian */
#define ICE_GNSS_UBX_DATA_LEN_H 0xFD
#define ICE_GNSS_UBX_DATA_LEN_WIDTH 2
#define ICE_GNSS_UBX_EMPTY_DATA 0xFF
-#define ICE_GNSS_TIMER_DELAY_TIME (HZ / 10) /* 0.1 second per message */
-#define ICE_MAX_I2C_DATA_SIZE FIELD_MAX(ICE_AQC_I2C_DATA_SIZE_M)
+/* For u-blox writes are performed without address so the first byte to write is
+ * passed as I2C addr parameter.
+ */
+#define ICE_GNSS_UBX_WRITE_BYTES (ICE_MAX_I2C_WRITE_BYTES + 1)
#define ICE_MAX_UBX_READ_TRIES 255
+#define ICE_MAX_UBX_ACK_READ_TRIES 4095
+
+struct gnss_write_buf {
+ struct list_head queue;
+ unsigned int size;
+ unsigned char *buf;
+};
/**
* struct gnss_serial - data used to initialize GNSS TTY port
@@ -25,6 +41,8 @@
* @gnss_mutex: gnss_mutex used to protect GNSS serial operations
* @kworker: kwork thread for handling periodic work
* @read_work: read_work function for handling GNSS reads
+ * @write_work: write_work function for handling GNSS writes
+ * @queue: write buffers queue
*/
struct gnss_serial {
struct ice_pf *back;
@@ -33,6 +51,8 @@ struct gnss_serial {
struct mutex gnss_mutex; /* protects GNSS serial structure */
struct kthread_worker *kworker;
struct kthread_delayed_work read_work;
+ struct kthread_work write_work;
+ struct list_head queue;
};
#if IS_ENABLED(CONFIG_TTY)
--
2.35.1
^ permalink raw reply related
* [PATCH net-next 2/3] ice: add i2c write command
From: Tony Nguyen @ 2022-05-17 21:19 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Karol Kolacinski, netdev, anthony.l.nguyen, richardcochran,
Gurucharan
In-Reply-To: <20220517211935.1949447-1-anthony.l.nguyen@intel.com>
From: Karol Kolacinski <karol.kolacinski@intel.com>
Add the possibility to write to connected i2c devices using the AQ
command. FW may reject the write if the device is not on allowlist.
Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
.../net/ethernet/intel/ice/ice_adminq_cmd.h | 7 +--
drivers/net/ethernet/intel/ice/ice_common.c | 51 ++++++++++++++++++-
drivers/net/ethernet/intel/ice/ice_common.h | 4 ++
3 files changed, 58 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
index b25e27c4d887..bedc19f12cbd 100644
--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
@@ -1401,7 +1401,7 @@ struct ice_aqc_get_link_topo {
u8 rsvd[9];
};
-/* Read I2C (direct, 0x06E2) */
+/* Read/Write I2C (direct, 0x06E2/0x06E3) */
struct ice_aqc_i2c {
struct ice_aqc_link_topo_addr topo_addr;
__le16 i2c_addr;
@@ -1411,7 +1411,7 @@ struct ice_aqc_i2c {
u8 rsvd;
__le16 i2c_bus_addr;
- u8 rsvd2[4];
+ u8 i2c_data[4]; /* Used only by write command, reserved in read. */
};
/* Read I2C Response (direct, 0x06E2) */
@@ -2130,7 +2130,7 @@ struct ice_aq_desc {
struct ice_aqc_get_link_status get_link_status;
struct ice_aqc_event_lan_overflow lan_overflow;
struct ice_aqc_get_link_topo get_link_topo;
- struct ice_aqc_i2c read_i2c;
+ struct ice_aqc_i2c read_write_i2c;
struct ice_aqc_read_i2c_resp read_i2c_resp;
} params;
};
@@ -2247,6 +2247,7 @@ enum ice_adminq_opc {
ice_aqc_opc_set_mac_lb = 0x0620,
ice_aqc_opc_get_link_topo = 0x06E0,
ice_aqc_opc_read_i2c = 0x06E2,
+ ice_aqc_opc_write_i2c = 0x06E3,
ice_aqc_opc_set_port_id_led = 0x06E9,
ice_aqc_opc_set_gpio = 0x06EC,
ice_aqc_opc_get_gpio = 0x06ED,
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 9619bdb9e49a..1999c19a786e 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -4823,7 +4823,7 @@ ice_aq_read_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr,
int status;
ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_read_i2c);
- cmd = &desc.params.read_i2c;
+ cmd = &desc.params.read_write_i2c;
if (!data)
return -EINVAL;
@@ -4850,6 +4850,55 @@ ice_aq_read_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr,
return status;
}
+/**
+ * ice_aq_write_i2c
+ * @hw: pointer to the hw struct
+ * @topo_addr: topology address for a device to communicate with
+ * @bus_addr: 7-bit I2C bus address
+ * @addr: I2C memory address (I2C offset) with up to 16 bits
+ * @params: I2C parameters: bit [4] - I2C address type, bits [3:0] - data size to write (0-7 bytes)
+ * @data: pointer to data (0 to 4 bytes) to be written to the I2C device
+ * @cd: pointer to command details structure or NULL
+ *
+ * Write I2C (0x06E3)
+ *
+ * * Return:
+ * * 0 - Successful write to the i2c device
+ * * -EINVAL - Data size greater than 4 bytes
+ * * -EIO - FW error
+ */
+int
+ice_aq_write_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr,
+ u16 bus_addr, __le16 addr, u8 params, u8 *data,
+ struct ice_sq_cd *cd)
+{
+ struct ice_aq_desc desc = { 0 };
+ struct ice_aqc_i2c *cmd;
+ unsigned int i;
+ u8 data_size;
+
+ ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_write_i2c);
+ cmd = &desc.params.read_write_i2c;
+
+ data_size = FIELD_GET(ICE_AQC_I2C_DATA_SIZE_M, params);
+
+ /* data_size limited to 4 */
+ if (data_size > 4)
+ return -EINVAL;
+
+ cmd->i2c_bus_addr = cpu_to_le16(bus_addr);
+ cmd->topo_addr = topo_addr;
+ cmd->i2c_params = params;
+ cmd->i2c_addr = addr;
+
+ for (i = 0; i < data_size; i++) {
+ cmd->i2c_data[i] = *data;
+ data++;
+ }
+
+ return ice_aq_send_cmd(hw, &desc, NULL, 0, cd);
+}
+
/**
* ice_aq_set_driver_param - Set driver parameter to share via firmware
* @hw: pointer to the HW struct
diff --git a/drivers/net/ethernet/intel/ice/ice_common.h b/drivers/net/ethernet/intel/ice/ice_common.h
index 872ea7d2332d..61b7c60db689 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.h
+++ b/drivers/net/ethernet/intel/ice/ice_common.h
@@ -214,5 +214,9 @@ int
ice_aq_read_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr,
u16 bus_addr, __le16 addr, u8 params, u8 *data,
struct ice_sq_cd *cd);
+int
+ice_aq_write_i2c(struct ice_hw *hw, struct ice_aqc_link_topo_addr topo_addr,
+ u16 bus_addr, __le16 addr, u8 params, u8 *data,
+ struct ice_sq_cd *cd);
bool ice_fw_supports_report_dflt_cfg(struct ice_hw *hw);
#endif /* _ICE_COMMON_H_ */
--
2.35.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox