lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 27 May 2020 10:35:13 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Antoine Tenart <antoine.tenart@...tlin.com>
Cc:     davem@...emloft.net, andrew@...n.ch, f.fainelli@...il.com,
        hkallweit1@...il.com, richardcochran@...il.com,
        alexandre.belloni@...tlin.com, UNGLinuxDriver@...rochip.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        thomas.petazzoni@...tlin.com, allan.nielsen@...rochip.com,
        foss@...il.net
Subject: Re: [PATCH net-next 5/8] net: phy: mscc: 1588 block initialization

On Wed, 27 May 2020 18:41:55 +0200 Antoine Tenart wrote:
> From: Quentin Schulz <quentin.schulz@...tlin.com>
> 
> This patch adds the first parts of the 1588 support in the MSCC PHY,
> with registers definition and the 1588 block initialization.
> 
> Those PHYs are distributed in hardware packages containing multiple
> times the PHY. The VSC8584 for example is composed of 4 PHYs. With
> hardware packages, parts of the logic is usually common and one of the
> PHY has to be used for some parts of the initialization. Following this
> logic, the 1588 blocks of those PHYs are shared between two PHYs and
> accessing the registers has to be done using the "base" PHY of the
> group. This is handled thanks to helpers in the PTP code (and locks).
> We also need the MDIO bus lock while performing a single read or write
> to the 1588 registers as the read/write are composed of multiple MDIO
> transactions (and we don't want other threads updating the page).
> 
> Co-developed-by: Antoine Tenart <antoine.tenart@...tlin.com>
> Signed-off-by: Quentin Schulz <quentin.schulz@...tlin.com>
> Signed-off-by: Antoine Tenart <antoine.tenart@...tlin.com>

This doesn't build on my system :S

In file included from ../drivers/net/phy/mscc/mscc_ptp.c:18:
../include/linux/unaligned/be_byteshift.h:41:19: error: redefinition of ‘get_unaligned_be16’
   41 | static inline u16 get_unaligned_be16(const void *p)
      |                   ^~~~~~~~~~~~~~~~~~
In file included from ../arch/x86/include/asm/unaligned.h:9,
                 from ../include/linux/etherdevice.h:24,
                 from ../include/linux/if_vlan.h:11,
                 from ../include/linux/filter.h:22,
                 from ../include/net/sock.h:59,
                 from ../include/net/inet_sock.h:22,
                 from ../include/linux/udp.h:16,
                 from ../drivers/net/phy/mscc/mscc_ptp.c:17:
../include/linux/unaligned/access_ok.h:23:28: note: previous definition of ‘get_unaligned_be16’ was here
   23 | static __always_inline u16 get_unaligned_be16(const void *p)
      |                            ^~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/phy/mscc/mscc_ptp.c:18:
../include/linux/unaligned/be_byteshift.h:46:19: error: redefinition of ‘get_unaligned_be32’
   46 | static inline u32 get_unaligned_be32(const void *p)
      |                   ^~~~~~~~~~~~~~~~~~
In file included from ../arch/x86/include/asm/unaligned.h:9,
                 from ../include/linux/etherdevice.h:24,
                 from ../include/linux/if_vlan.h:11,
                 from ../include/linux/filter.h:22,
                 from ../include/net/sock.h:59,
                 from ../include/net/inet_sock.h:22,
                 from ../include/linux/udp.h:16,
                 from ../drivers/net/phy/mscc/mscc_ptp.c:17:
../include/linux/unaligned/access_ok.h:28:28: note: previous definition of ‘get_unaligned_be32’ was here
   28 | static __always_inline u32 get_unaligned_be32(const void *p)
      |                            ^~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/phy/mscc/mscc_ptp.c:18:
../include/linux/unaligned/be_byteshift.h:51:19: error: redefinition of ‘get_unaligned_be64’
   51 | static inline u64 get_unaligned_be64(const void *p)
      |                   ^~~~~~~~~~~~~~~~~~
In file included from ../arch/x86/include/asm/unaligned.h:9,
                 from ../include/linux/etherdevice.h:24,
                 from ../include/linux/if_vlan.h:11,
                 from ../include/linux/filter.h:22,
                 from ../include/net/sock.h:59,
                 from ../include/net/inet_sock.h:22,
                 from ../include/linux/udp.h:16,
                 from ../drivers/net/phy/mscc/mscc_ptp.c:17:
../include/linux/unaligned/access_ok.h:33:28: note: previous definition of ‘get_unaligned_be64’ was here
   33 | static __always_inline u64 get_unaligned_be64(const void *p)
      |                            ^~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/phy/mscc/mscc_ptp.c:18:
../include/linux/unaligned/be_byteshift.h:56:20: error: redefinition of ‘put_unaligned_be16’
   56 | static inline void put_unaligned_be16(u16 val, void *p)
      |                    ^~~~~~~~~~~~~~~~~~
In file included from ../arch/x86/include/asm/unaligned.h:9,
                 from ../include/linux/etherdevice.h:24,
                 from ../include/linux/if_vlan.h:11,
                 from ../include/linux/filter.h:22,
                 from ../include/net/sock.h:59,
                 from ../include/net/inet_sock.h:22,
                 from ../include/linux/udp.h:16,
                 from ../drivers/net/phy/mscc/mscc_ptp.c:17:
../include/linux/unaligned/access_ok.h:53:29: note: previous definition of ‘put_unaligned_be16’ was here
   53 | static __always_inline void put_unaligned_be16(u16 val, void *p)
      |                             ^~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/phy/mscc/mscc_ptp.c:18:
../include/linux/unaligned/be_byteshift.h:61:20: error: redefinition of ‘put_unaligned_be32’
   61 | static inline void put_unaligned_be32(u32 val, void *p)
      |                    ^~~~~~~~~~~~~~~~~~
In file included from ../arch/x86/include/asm/unaligned.h:9,
                 from ../include/linux/etherdevice.h:24,
                 from ../include/linux/if_vlan.h:11,
                 from ../include/linux/filter.h:22,
                 from ../include/net/sock.h:59,
                 from ../include/net/inet_sock.h:22,
                 from ../include/linux/udp.h:16,
                 from ../drivers/net/phy/mscc/mscc_ptp.c:17:
../include/linux/unaligned/access_ok.h:58:29: note: previous definition of ‘put_unaligned_be32’ was here
   58 | static __always_inline void put_unaligned_be32(u32 val, void *p)
      |                             ^~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/phy/mscc/mscc_ptp.c:18:
../include/linux/unaligned/be_byteshift.h:66:20: error: redefinition of ‘put_unaligned_be64’
   66 | static inline void put_unaligned_be64(u64 val, void *p)
      |                    ^~~~~~~~~~~~~~~~~~
In file included from ../arch/x86/include/asm/unaligned.h:9,
                 from ../include/linux/etherdevice.h:24,
                 from ../include/linux/if_vlan.h:11,
                 from ../include/linux/filter.h:22,
                 from ../include/net/sock.h:59,
                 from ../include/net/inet_sock.h:22,
                 from ../include/linux/udp.h:16,
                 from ../drivers/net/phy/mscc/mscc_ptp.c:17:
../include/linux/unaligned/access_ok.h:63:29: note: previous definition of ‘put_unaligned_be64’ was here
   63 | static __always_inline void put_unaligned_be64(u64 val, void *p)
      |                             ^~~~~~~~~~~~~~~~~~
../drivers/net/phy/mscc/mscc_ptp.c:658:12: warning: ‘vsc85xx_ts_engine_init’ defined but not used [-Wunused-function]
  658 | static int vsc85xx_ts_engine_init(struct phy_device *phydev, bool one_step)
      |            ^~~~~~~~~~~~~~~~~~~~~~
make[5]: *** [drivers/net/phy/mscc/mscc_ptp.o] Error 1
make[4]: *** [drivers/net/phy/mscc] Error 2
make[3]: *** [drivers/net/phy] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [drivers/net] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [drivers] Error 2
make: *** [sub-make] Error 2

Powered by blists - more mailing lists