* Tighten some of the net/phy SoC dependencies
@ 2017-03-05 12:14 Peter Robinson
  2017-03-05 12:14 ` [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs Peter Robinson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Peter Robinson @ 2017-03-05 12:14 UTC (permalink / raw)
  To: Florian Fainelli, netdev
A pair of small Kconfig patches to tightend some of the PHY MDIO 
dependencies one the SoCs, fairly self explanatory.
Peter
^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs
  2017-03-05 12:14 Tighten some of the net/phy SoC dependencies Peter Robinson
@ 2017-03-05 12:14 ` Peter Robinson
  2017-03-05 15:06   ` Andrew Lunn
                     ` (2 more replies)
  2017-03-05 12:14 ` [PATCH 2/2] net:phy:hisi: Depend on the appropraite SoC Peter Robinson
  2017-03-05 15:09 ` Tighten some of the net/phy SoC dependencies Andrew Lunn
  2 siblings, 3 replies; 7+ messages in thread
From: Peter Robinson @ 2017-03-05 12:14 UTC (permalink / raw)
  To: Florian Fainelli, netdev; +Cc: Peter Robinson
Add dependencies on the Cavium architectures for the PHYs
as well as COMPILE_TEST to ensure build coverage.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/net/phy/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 8dbd59b..59b8313 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -127,7 +127,7 @@ config MDIO_MOXART
 
 config MDIO_OCTEON
 	tristate "Octeon and some ThunderX SOCs MDIO buses"
-	depends on 64BIT
+	depends on CAVIUM_OCTEON_SOC || ARCH_THUNDER || COMPILE_TEST
 	depends on HAS_IOMEM
 	select MDIO_CAVIUM
 	help
@@ -145,7 +145,7 @@ config MDIO_SUN4I
 
 config MDIO_THUNDER
 	tristate "ThunderX SOCs MDIO buses"
-	depends on 64BIT
+	depends on ARCH_THUNDER || COMPILE_TEST
 	depends on PCI
 	select MDIO_CAVIUM
 	help
-- 
2.9.3
^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH 2/2] net:phy:hisi: Depend on the appropraite SoC
  2017-03-05 12:14 Tighten some of the net/phy SoC dependencies Peter Robinson
  2017-03-05 12:14 ` [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs Peter Robinson
@ 2017-03-05 12:14 ` Peter Robinson
  2017-03-05 15:09 ` Tighten some of the net/phy SoC dependencies Andrew Lunn
  2 siblings, 0 replies; 7+ messages in thread
From: Peter Robinson @ 2017-03-05 12:14 UTC (permalink / raw)
  To: Florian Fainelli, netdev; +Cc: Peter Robinson
The HiSi PHY only ships on the ARM SoC so depend on it.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
 drivers/net/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 59b8313..be6f853 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -113,6 +113,7 @@ config MDIO_GPIO
 
 config MDIO_HISI_FEMAC
 	tristate "Hisilicon FEMAC MDIO bus controller"
+	depends on ARCH_HISI || COMPILE_TEST
 	depends on HAS_IOMEM && OF_MDIO
 	help
 	  This module provides a driver for the MDIO busses found in the
-- 
2.9.3
^ permalink raw reply related	[flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs
  2017-03-05 12:14 ` [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs Peter Robinson
@ 2017-03-05 15:06   ` Andrew Lunn
  2017-03-05 21:47   ` kbuild test robot
  2017-03-05 22:43   ` kbuild test robot
  2 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2017-03-05 15:06 UTC (permalink / raw)
  To: Peter Robinson; +Cc: Florian Fainelli, netdev
On Sun, Mar 05, 2017 at 12:14:33PM +0000, Peter Robinson wrote:
> Add dependencies on the Cavium architectures for the PHYs
Hi Peter
These are not PHY drivers, but MDIO bus drivers. 
> as well as COMPILE_TEST to ensure build coverage.
> 
> Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
> ---
>  drivers/net/phy/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
> index 8dbd59b..59b8313 100644
> --- a/drivers/net/phy/Kconfig
> +++ b/drivers/net/phy/Kconfig
> @@ -127,7 +127,7 @@ config MDIO_MOXART
>  
>  config MDIO_OCTEON
>  	tristate "Octeon and some ThunderX SOCs MDIO buses"
> -	depends on 64BIT
Have you tried building this on a 32 bit system with COMPILE_TEST?  I
just wondering why this 64BIT depends is here.
     Andrew
^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Tighten some of the net/phy SoC dependencies
  2017-03-05 12:14 Tighten some of the net/phy SoC dependencies Peter Robinson
  2017-03-05 12:14 ` [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs Peter Robinson
  2017-03-05 12:14 ` [PATCH 2/2] net:phy:hisi: Depend on the appropraite SoC Peter Robinson
@ 2017-03-05 15:09 ` Andrew Lunn
  2 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2017-03-05 15:09 UTC (permalink / raw)
  To: Peter Robinson; +Cc: Florian Fainelli, netdev
On Sun, Mar 05, 2017 at 12:14:32PM +0000, Peter Robinson wrote:
> A pair of small Kconfig patches to tightend some of the PHY MDIO 
> dependencies one the SoCs, fairly self explanatory.
Hi Peter
Please use git format-patch --cover to generate the cover note for a
patch set.
[PATCH 1/2] net: phy: Add dependencies for Cavium SoCs
[PATCH 2/2/2] net:phy:hisi: Depend on the appropraite SoC
It would be nice to have consistent spacing in the subject line
prefixes. And the correct spelling of appropriate.
	  Thanks
		Andrew
^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs
  2017-03-05 12:14 ` [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs Peter Robinson
  2017-03-05 15:06   ` Andrew Lunn
@ 2017-03-05 21:47   ` kbuild test robot
  2017-03-05 22:43   ` kbuild test robot
  2 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2017-03-05 21:47 UTC (permalink / raw)
  To: Peter Robinson; +Cc: kbuild-all, Florian Fainelli, netdev, Peter Robinson
[-- Attachment #1: Type: text/plain, Size: 901 bytes --]
Hi Peter,
[auto build test WARNING on net-next/master]
[also build test WARNING on v4.11-rc1 next-20170303]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url:    https://github.com/0day-ci/linux/commits/Peter-Robinson/net-phy-Add-dependencies-for-Cavium-SoCs/20170306-043809
config: x86_64-randconfig-x003-201710 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 
All warnings (new ones prefixed by >>):
warning: (THUNDER_NIC_BGX && THUNDER_NIC_RGX) selects MDIO_THUNDER which has unmet direct dependencies (NETDEVICES && PHYLIB && (ARCH_THUNDER || COMPILE_TEST) && PCI)
---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31336 bytes --]
^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs
  2017-03-05 12:14 ` [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs Peter Robinson
  2017-03-05 15:06   ` Andrew Lunn
  2017-03-05 21:47   ` kbuild test robot
@ 2017-03-05 22:43   ` kbuild test robot
  2 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2017-03-05 22:43 UTC (permalink / raw)
  To: Peter Robinson; +Cc: kbuild-all, Florian Fainelli, netdev, Peter Robinson
[-- Attachment #1: Type: text/plain, Size: 12009 bytes --]
Hi Peter,
[auto build test ERROR on net-next/master]
[also build test ERROR on v4.11-rc1 next-20170303]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url:    https://github.com/0day-ci/linux/commits/Peter-Robinson/net-phy-Add-dependencies-for-Cavium-SoCs/20170306-043809
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 
All error/warnings (new ones prefixed by >>):
   In file included from drivers/net/phy/mdio-cavium.c:14:0:
   drivers/net/phy/mdio-cavium.c: In function 'cavium_mdiobus_set_mode':
>> drivers/net/phy/mdio-cavium.h:115:31: error: implicit declaration of function 'readq' [-Werror=implicit-function-declaration]
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                  ^
>> drivers/net/phy/mdio-cavium.c:24:16: note: in expansion of macro 'oct_mdio_readq'
     smi_clk.u64 = oct_mdio_readq(p->register_base + SMI_CLK);
                   ^~~~~~~~~~~~~~
>> drivers/net/phy/mdio-cavium.h:115:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                        ^
>> drivers/net/phy/mdio-cavium.c:24:16: note: in expansion of macro 'oct_mdio_readq'
     smi_clk.u64 = oct_mdio_readq(p->register_base + SMI_CLK);
                   ^~~~~~~~~~~~~~
>> drivers/net/phy/mdio-cavium.h:114:36: error: implicit declaration of function 'writeq' [-Werror=implicit-function-declaration]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                       ^
>> drivers/net/phy/mdio-cavium.c:27:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_clk.u64, p->register_base + SMI_CLK);
     ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
>> drivers/net/phy/mdio-cavium.c:27:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_clk.u64, p->register_base + SMI_CLK);
     ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.c: In function 'cavium_mdiobus_c45_addr':
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
   drivers/net/phy/mdio-cavium.c:42:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_wr.u64, p->register_base + SMI_WR_DAT);
     ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
   drivers/net/phy/mdio-cavium.c:50:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD);
     ^~~~~~~~~~~~~~~
>> drivers/net/phy/mdio-cavium.h:115:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                        ^
   drivers/net/phy/mdio-cavium.c:57:16: note: in expansion of macro 'oct_mdio_readq'
      smi_wr.u64 = oct_mdio_readq(p->register_base + SMI_WR_DAT);
                   ^~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.c: In function 'cavium_mdiobus_read':
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
   drivers/net/phy/mdio-cavium.c:89:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD);
     ^~~~~~~~~~~~~~~
>> drivers/net/phy/mdio-cavium.h:115:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                        ^
   drivers/net/phy/mdio-cavium.c:96:16: note: in expansion of macro 'oct_mdio_readq'
      smi_rd.u64 = oct_mdio_readq(p->register_base + SMI_RD_DAT);
                   ^~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.c: In function 'cavium_mdiobus_write':
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
   drivers/net/phy/mdio-cavium.c:128:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_wr.u64, p->register_base + SMI_WR_DAT);
     ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
   drivers/net/phy/mdio-cavium.c:134:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD);
     ^~~~~~~~~~~~~~~
>> drivers/net/phy/mdio-cavium.h:115:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                        ^
   drivers/net/phy/mdio-cavium.c:141:16: note: in expansion of macro 'oct_mdio_readq'
      smi_wr.u64 = oct_mdio_readq(p->register_base + SMI_WR_DAT);
                   ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/net/phy/mdio-octeon.c: In function 'octeon_mdiobus_probe':
>> drivers/net/phy/mdio-octeon.c:51:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      (u64)devm_ioremap(&pdev->dev, mdio_phys, regsize);
      ^
   In file included from drivers/net/phy/mdio-octeon.c:17:0:
>> drivers/net/phy/mdio-cavium.h:114:36: error: implicit declaration of function 'writeq' [-Werror=implicit-function-declaration]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                       ^
>> drivers/net/phy/mdio-octeon.c:59:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
     ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
>> drivers/net/phy/mdio-octeon.c:59:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
     ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
   drivers/net/phy/mdio-octeon.c:80:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
     ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-octeon.c: In function 'octeon_mdiobus_remove':
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
   drivers/net/phy/mdio-octeon.c:94:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
     ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/net/phy/mdio-thunder.c: In function 'thunder_mdiobus_pci_probe':
>> drivers/net/phy/mdio-thunder.c:90:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      bus->register_base = (u64)nexus->bar0 +
                           ^
   In file included from drivers/net/phy/mdio-thunder.c:18:0:
>> drivers/net/phy/mdio-cavium.h:114:36: error: implicit declaration of function 'writeq' [-Werror=implicit-function-declaration]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                       ^
>> drivers/net/phy/mdio-thunder.c:95:3: note: in expansion of macro 'oct_mdio_writeq'
      oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
      ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
>> drivers/net/phy/mdio-thunder.c:95:3: note: in expansion of macro 'oct_mdio_writeq'
      oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
      ^~~~~~~~~~~~~~~
>> drivers/net/phy/mdio-thunder.c:97:51: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t {aka unsigned int}' [-Wformat=]
      snprintf(bus->mii_bus->id, MII_BUS_ID_SIZE, "%llx", r.start);
                                                      ^
   In file included from include/linux/dma-mapping.h:6:0,
                    from include/linux/skbuff.h:34,
                    from include/linux/if_ether.h:23,
                    from include/uapi/linux/ethtool.h:18,
                    from include/linux/ethtool.h:17,
                    from include/linux/phy.h:21,
                    from include/linux/of_mdio.h:12,
                    from drivers/net/phy/mdio-thunder.c:10:
   drivers/net/phy/mdio-thunder.c:106:24: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'resource_size_t {aka unsigned int}' [-Wformat=]
      dev_info(&pdev->dev, "Added bus at %llx\n", r.start);
                           ^
   include/linux/device.h:1316:51: note: in definition of macro 'dev_info'
    #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
                                                      ^~~
   In file included from drivers/net/phy/mdio-thunder.c:18:0:
   drivers/net/phy/mdio-thunder.c: In function 'thunder_mdiobus_pci_remove':
   drivers/net/phy/mdio-cavium.h:114:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                                   ^
   drivers/net/phy/mdio-thunder.c:133:3: note: in expansion of macro 'oct_mdio_writeq'
      oct_mdio_writeq(0, bus->register_base + SMI_EN);
      ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
vim +/readq +115 drivers/net/phy/mdio-cavium.h
1eefee90 David Daney 2016-03-11  108  
1eefee90 David Daney 2016-03-11  109  static inline u64 oct_mdio_readq(u64 addr)
1eefee90 David Daney 2016-03-11  110  {
1eefee90 David Daney 2016-03-11  111  	return cvmx_read_csr(addr);
1eefee90 David Daney 2016-03-11  112  }
1eefee90 David Daney 2016-03-11  113  #else
1eefee90 David Daney 2016-03-11 @114  #define oct_mdio_writeq(val, addr)	writeq(val, (void *)addr)
1eefee90 David Daney 2016-03-11 @115  #define oct_mdio_readq(addr)		readq((void *)addr)
1eefee90 David Daney 2016-03-11  116  #endif
1eefee90 David Daney 2016-03-11  117  
1eefee90 David Daney 2016-03-11  118  int cavium_mdiobus_read(struct mii_bus *bus, int phy_id, int regnum);
:::::: The code at line 115 was first introduced by commit
:::::: 1eefee901fca0208b8a56f20cdc134e2b8638ae7 phy: mdio-octeon: Refactor into two files/modules
:::::: TO: David Daney <david.daney@cavium.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58718 bytes --]
^ permalink raw reply	[flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-03-05 22:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-05 12:14 Tighten some of the net/phy SoC dependencies Peter Robinson
2017-03-05 12:14 ` [PATCH 1/2] net: phy: Add dependencies for Cavium SoCs Peter Robinson
2017-03-05 15:06   ` Andrew Lunn
2017-03-05 21:47   ` kbuild test robot
2017-03-05 22:43   ` kbuild test robot
2017-03-05 12:14 ` [PATCH 2/2] net:phy:hisi: Depend on the appropraite SoC Peter Robinson
2017-03-05 15:09 ` Tighten some of the net/phy SoC dependencies Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).