Re: [PATCH net v4 02/13] net/8390: Fix msg_enable patch snafu

2018-02-12 Thread David Miller
From: Finn Thain 
Date: Sun, 11 Feb 2018 22:08:43 -0500 (EST)

> The lib8390 module parameter 'msg_enable' doesn't do anything useful:
> it causes an ancient version string to be logged.

Not true.

You need to look at the various netif_*() et al. message logging
interfaces, they check "p->msg_enable" to determine which messages to
print.

I'm not applying this, sorry.

Just for the record, I consider these kinds of ancient driver cleanups
painful to review, and unless they allow some ugly global kernel API
to be improved or removed such changes have very little gain.

In fact, most of them have a good chance to break things.

It is especially a dubious sequence when you cluster so many of these
things together into a large patch series.

If you are really serious about fixing real bugs, post these one at a
time, very slowly, for us to review properly and apply.

Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ata: add Amiga Gayle PATA controller driver

2018-02-12 Thread Philippe Ombredanne
On Mon, Feb 12, 2018 at 2:49 PM, Bartlomiej Zolnierkiewicz
 wrote:
> Add Amiga Gayle PATA controller driver. It enables libata support
> for the on-board IDE interfaces on some Amiga models (A600, A1200,
> A4000 and A4000T) and also for IDE interfaces on the Zorro expansion
> bus (M-Tech E-Matrix 530 expansion card).
>
> Thanks to John Paul Adrian Glaubitz and Michael Schmitz for help
> with testing the driver.
>
> Tested-by: John Paul Adrian Glaubitz 
> Cc: Michael Schmitz 
> Cc: Geert Uytterhoeven 
> Signed-off-by: Bartlomiej Zolnierkiewicz 


> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License.  See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */

Do you mind using the new SDPX ids? (well not so new anymore). [1]


> +
> +MODULE_AUTHOR("Bartlomiej Zolnierkiewicz");
> +MODULE_DESCRIPTION("low-level driver for Amiga Gayle PATA");
> +MODULE_LICENSE("GPL");
> +MODULE_ALIAS("platform:amiga-gayle-ide");
> +MODULE_VERSION(DRV_VERSION);
>

 and while doing it please make sure your MODULE_LICENSE matches
the license.
Here for instance it is not clear to me if this a GPL-2.0 or a GPL-2.0+


Thanks!
[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/license-rules.rst
-- 
Cordially
Philippe Ombredanne

+1 650 799 0949 | pombreda...@nexb.com
DejaCode - What's in your code?! - http://www.dejacode.com
AboutCode - Open source for open source - https://www.aboutcode.org
nexB Inc. - http://www.nexb.com

CONFIDENTIALITY NOTICE:  This e-mail (including attachments) may
contain information that is proprietary or confidential. If you are
not the intended recipient or a person responsible for its delivery to
the intended recipient, do not copy or distribute it. Please
permanently delete the e-mail and any attachments, and notify us
immediately at (650) 799 0949.
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ata: add Amiga Gayle PATA controller driver

2018-02-12 Thread Bartlomiej Zolnierkiewicz
Add Amiga Gayle PATA controller driver. It enables libata support
for the on-board IDE interfaces on some Amiga models (A600, A1200,
A4000 and A4000T) and also for IDE interfaces on the Zorro expansion
bus (M-Tech E-Matrix 530 expansion card).

Thanks to John Paul Adrian Glaubitz and Michael Schmitz for help
with testing the driver.

Tested-by: John Paul Adrian Glaubitz 
Cc: Michael Schmitz 
Cc: Geert Uytterhoeven 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/ata/Kconfig  |   12 ++
 drivers/ata/Makefile |1 
 drivers/ata/pata_gayle.c |  224 +++
 3 files changed, 237 insertions(+)

Index: b/drivers/ata/Kconfig
===
--- a/drivers/ata/Kconfig   2018-01-30 17:02:59.792831900 +0100
+++ b/drivers/ata/Kconfig   2018-01-30 17:02:59.792831900 +0100
@@ -963,6 +963,18 @@ config PATA_FALCON
 
  If unsure, say N.
 
+config PATA_GAYLE
+   tristate "Amiga Gayle PATA support"
+   depends on M68K && AMIGA
+   help
+ This option enables support for the on-board IDE
+ interfaces on some Amiga models (A600, A1200,
+ A4000 and A4000T) and also for IDE interfaces on
+ the Zorro expansion bus (M-Tech E-Matrix 530
+ expansion card).
+
+ If unsure, say N.
+
 config PATA_ISAPNP
tristate "ISA Plug and Play PATA support"
depends on ISAPNP
Index: b/drivers/ata/Makefile
===
--- a/drivers/ata/Makefile  2018-01-30 17:02:59.792831900 +0100
+++ b/drivers/ata/Makefile  2018-01-30 17:02:59.792831900 +0100
@@ -98,6 +98,7 @@ obj-$(CONFIG_PATA_WINBOND)+= pata_sl82c
 # SFF PIO only
 obj-$(CONFIG_PATA_CMD640_PCI)  += pata_cmd640.o
 obj-$(CONFIG_PATA_FALCON)  += pata_falcon.o
+obj-$(CONFIG_PATA_GAYLE)   += pata_gayle.o
 obj-$(CONFIG_PATA_ISAPNP)  += pata_isapnp.o
 obj-$(CONFIG_PATA_IXP4XX_CF)   += pata_ixp4xx_cf.o
 obj-$(CONFIG_PATA_MPIIX)   += pata_mpiix.o
Index: b/drivers/ata/pata_gayle.c
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ b/drivers/ata/pata_gayle.c  2018-01-30 17:05:04.780835047 +0100
@@ -0,0 +1,224 @@
+/*
+ * Amiga Gayle PATA controller driver
+ *
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Based on gayle.c:
+ *
+ * Created 12 Jul 1997 by Geert Uytterhoeven
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define DRV_NAME "pata_gayle"
+#define DRV_VERSION "0.1.0"
+
+#define GAYLE_CONTROL  0x101a
+
+static struct scsi_host_template pata_gayle_sht = {
+   ATA_PIO_SHT(DRV_NAME),
+};
+
+/* FIXME: is this needed? */
+static unsigned int pata_gayle_data_xfer(struct ata_queued_cmd *qc,
+unsigned char *buf,
+unsigned int buflen, int rw)
+{
+   struct ata_device *dev = qc->dev;
+   struct ata_port *ap = dev->link->ap;
+   void __iomem *data_addr = ap->ioaddr.data_addr;
+   unsigned int words = buflen >> 1;
+
+   /* Transfer multiple of 2 bytes */
+   if (rw == READ)
+   raw_insw((u16 *)data_addr, (u16 *)buf, words);
+   else
+   raw_outsw((u16 *)data_addr, (u16 *)buf, words);
+
+   /* Transfer trailing byte, if any. */
+   if (unlikely(buflen & 0x01)) {
+   unsigned char pad[2] = { };
+
+   /* Point buf to the tail of buffer */
+   buf += buflen - 1;
+
+   if (rw == READ) {
+   raw_insw((u16 *)data_addr, (u16 *)pad, 1);
+   *buf = pad[0];
+   } else {
+   pad[0] = *buf;
+   raw_outsw((u16 *)data_addr, (u16 *)pad, 1);
+   }
+   words++;
+   }
+
+   return words << 1;
+}
+
+/*
+ * Provide our own set_mode() as we don't want to change anything that has
+ * already been configured..
+ */
+static int pata_gayle_set_mode(struct ata_link *link,
+  struct ata_device **unused)
+{
+   struct ata_device *dev;
+
+   ata_for_each_dev(dev, link, ENABLED) {
+   /* We don't really care */
+   dev->pio_mode = dev->xfer_mode = XFER_PIO_0;
+   dev->xfer_shift = ATA_SHIFT_PIO;
+   dev->flags |= ATA_DFLAG_PIO;
+   ata_dev_info(dev, "configured for PIO\n");
+   }
+   return 0;

Re: [PATCH net v4 06/13] net/mac89x0: Convert to platform_driver

2018-02-12 Thread Geert Uytterhoeven
On Mon, Feb 12, 2018 at 4:08 AM, Finn Thain  wrote:
> Apparently these Dayna cards don't have a pseudoslot declaration ROM
> which means they can't be probed like NuBus cards.
>
> Cc: Geert Uytterhoeven 
> Signed-off-by: Finn Thain 
> ---
>  arch/m68k/mac/config.c|  4 ++
>  drivers/net/Space.c   |  3 --
>  drivers/net/ethernet/cirrus/mac89x0.c | 69 
> ---
>  include/net/Space.h   |  1 -
>  4 files changed, 35 insertions(+), 42 deletions(-)

For the m68k part:
Acked-by: Geert Uytterhoeven 

> --- a/drivers/net/ethernet/cirrus/mac89x0.c
> +++ b/drivers/net/ethernet/cirrus/mac89x0.c

> @@ -167,10 +172,9 @@ static const struct net_device_ops mac89x0_netdev_ops = {
>
>  /* Probe for the CS8900 card in slot E.  We won't bother looking
> anywhere else until we have a really good reason to do so. */
> -struct net_device * __init mac89x0_probe(int unit)
> +static int mac89x0_device_probe(struct platform_device *pdev)
>  {
> struct net_device *dev;
> -   static int once_is_enough;
> struct net_local *lp;
> static unsigned version_printed;
> int i, slot;
> @@ -181,20 +185,13 @@ struct net_device * __init mac89x0_probe(int unit)
> struct nubus_rsrc *fres;
>
> if (!MACH_IS_MAC)
> -   return ERR_PTR(-ENODEV);
> +   return -ENODEV;

I think this check can be removed completely, as the platform device will
exist on suitable Macs only.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net v4 09/13] net/mac8390: Convert to nubus_driver

2018-02-12 Thread Geert Uytterhoeven
On Mon, Feb 12, 2018 at 4:08 AM, Finn Thain  wrote:
> This resolves an old bug that constrained this driver to no more than
> one card.
>
> Tested-by: Stan Johnson 
> Signed-off-by: Finn Thain 

> --- a/drivers/net/ethernet/8390/mac8390.c
> +++ b/drivers/net/ethernet/8390/mac8390.c

> @@ -390,86 +389,86 @@ static bool __init mac8390_init(struct net_device *dev,
> return true;
>  }
>
> -struct net_device * __init mac8390_probe(int unit)
> +static int mac8390_device_probe(struct nubus_board *board)
>  {
> struct net_device *dev;
> -   struct nubus_rsrc *ndev = NULL;
> int err = -ENODEV;
> -   static unsigned int slots;
> -
> -   enum mac8390_type cardtype;
> -
> -   /* probably should check for Nubus instead */
> +   struct nubus_rsrc *fres;
> +   enum mac8390_type cardtype = MAC8390_NONE;
>
> if (!MACH_IS_MAC)
> -   return ERR_PTR(-ENODEV);
> +   return -ENODEV;

I think this check can be removed completely, as the nubus_board will
exist on suitable Macs only.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] m68k/defconfig: Update defconfigs for v4.16-rc1

2018-02-12 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven 
---
 arch/m68k/configs/amiga_defconfig| 13 -
 arch/m68k/configs/apollo_defconfig   | 13 -
 arch/m68k/configs/atari_defconfig| 13 -
 arch/m68k/configs/bvme6000_defconfig | 13 -
 arch/m68k/configs/hp300_defconfig| 13 -
 arch/m68k/configs/mac_defconfig  | 13 -
 arch/m68k/configs/multi_defconfig| 13 -
 arch/m68k/configs/mvme147_defconfig  | 13 -
 arch/m68k/configs/mvme16x_defconfig  | 13 -
 arch/m68k/configs/q40_defconfig  | 13 -
 arch/m68k/configs/sun3_defconfig | 13 -
 arch/m68k/configs/sun3x_defconfig| 13 -
 12 files changed, 144 insertions(+), 12 deletions(-)

diff --git a/arch/m68k/configs/amiga_defconfig 
b/arch/m68k/configs/amiga_defconfig
index 52fa7fbdefa2c5ad..e7995c1e534a0b4a 100644
--- a/arch/m68k/configs/amiga_defconfig
+++ b/arch/m68k/configs/amiga_defconfig
@@ -105,6 +105,7 @@ CONFIG_NFT_META=m
 CONFIG_NFT_RT=m
 CONFIG_NFT_NUMGEN=m
 CONFIG_NFT_CT=m
+CONFIG_NFT_FLOW_OFFLOAD=m
 CONFIG_NFT_SET_RBTREE=m
 CONFIG_NFT_SET_HASH=m
 CONFIG_NFT_SET_BITMAP=m
@@ -124,6 +125,8 @@ CONFIG_NFT_FIB_INET=m
 CONFIG_NFT_DUP_NETDEV=m
 CONFIG_NFT_FWD_NETDEV=m
 CONFIG_NFT_FIB_NETDEV=m
+CONFIG_NF_FLOW_TABLE_INET=m
+CONFIG_NF_FLOW_TABLE=m
 CONFIG_NETFILTER_XT_SET=m
 CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
@@ -202,6 +205,7 @@ CONFIG_NFT_CHAIN_ROUTE_IPV4=m
 CONFIG_NFT_DUP_IPV4=m
 CONFIG_NFT_FIB_IPV4=m
 CONFIG_NF_TABLES_ARP=m
+CONFIG_NF_FLOW_TABLE_IPV4=m
 CONFIG_NF_LOG_ARP=m
 CONFIG_NFT_CHAIN_NAT_IPV4=m
 CONFIG_NFT_MASQ_IPV4=m
@@ -231,6 +235,7 @@ CONFIG_NF_SOCKET_IPV6=m
 CONFIG_NFT_CHAIN_ROUTE_IPV6=m
 CONFIG_NFT_DUP_IPV6=m
 CONFIG_NFT_FIB_IPV6=m
+CONFIG_NF_FLOW_TABLE_IPV6=m
 CONFIG_NFT_CHAIN_NAT_IPV6=m
 CONFIG_NFT_MASQ_IPV6=m
 CONFIG_NFT_REDIR_IPV6=m
@@ -244,6 +249,7 @@ CONFIG_IP6_NF_MATCH_IPV6HEADER=m
 CONFIG_IP6_NF_MATCH_MH=m
 CONFIG_IP6_NF_MATCH_RPFILTER=m
 CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_SRH=m
 CONFIG_IP6_NF_TARGET_HL=m
 CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_REJECT=m
@@ -354,6 +360,7 @@ CONFIG_SCSI_ZORRO7XX=y
 CONFIG_MD=y
 CONFIG_MD_LINEAR=m
 CONFIG_BLK_DEV_DM=m
+CONFIG_DM_UNSTRIPED=m
 CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_THIN_PROVISIONING=m
@@ -399,6 +406,7 @@ CONFIG_ARIADNE=y
 # CONFIG_NET_CADENCE is not set
 # CONFIG_NET_VENDOR_BROADCOM is not set
 # CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_NET_VENDOR_CORTINA is not set
 # CONFIG_NET_VENDOR_EZCHIP is not set
 # CONFIG_NET_VENDOR_HP is not set
 # CONFIG_NET_VENDOR_HUAWEI is not set
@@ -416,6 +424,7 @@ CONFIG_ZORRO8390=y
 # CONFIG_NET_VENDOR_SEEQ is not set
 # CONFIG_NET_VENDOR_SOLARFLARE is not set
 # CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_SOCIONEXT is not set
 # CONFIG_NET_VENDOR_STMICRO is not set
 # CONFIG_NET_VENDOR_VIA is not set
 # CONFIG_NET_VENDOR_WIZNET is not set
@@ -474,6 +483,7 @@ CONFIG_RTC_CLASS=y
 # CONFIG_RTC_NVMEM is not set
 CONFIG_RTC_DRV_MSM6242=m
 CONFIG_RTC_DRV_RP5C01=m
+# CONFIG_VIRTIO_MENU is not set
 # CONFIG_IOMMU_SUPPORT is not set
 CONFIG_HEARTBEAT=y
 CONFIG_PROC_HARDWARE=y
@@ -579,6 +589,7 @@ CONFIG_DLM=m
 # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_WW_MUTEX_SELFTEST=m
+CONFIG_RUNTIME_TESTING_MENU=y
 CONFIG_TEST_LIST_SORT=m
 CONFIG_TEST_SORT=m
 CONFIG_ATOMIC64_SELFTEST=m
@@ -593,7 +604,7 @@ CONFIG_TEST_RHASHTABLE=m
 CONFIG_TEST_HASH=m
 CONFIG_TEST_USER_COPY=m
 CONFIG_TEST_BPF=m
-CONFIG_TEST_FIND_BIT=m
+CONFIG_FIND_BIT_BENCHMARK=m
 CONFIG_TEST_FIRMWARE=m
 CONFIG_TEST_SYSCTL=m
 CONFIG_TEST_UDELAY=m
diff --git a/arch/m68k/configs/apollo_defconfig 
b/arch/m68k/configs/apollo_defconfig
index b00fe19e1c048f40..dbbdac446b77f3b4 100644
--- a/arch/m68k/configs/apollo_defconfig
+++ b/arch/m68k/configs/apollo_defconfig
@@ -103,6 +103,7 @@ CONFIG_NFT_META=m
 CONFIG_NFT_RT=m
 CONFIG_NFT_NUMGEN=m
 CONFIG_NFT_CT=m
+CONFIG_NFT_FLOW_OFFLOAD=m
 CONFIG_NFT_SET_RBTREE=m
 CONFIG_NFT_SET_HASH=m
 CONFIG_NFT_SET_BITMAP=m
@@ -122,6 +123,8 @@ CONFIG_NFT_FIB_INET=m
 CONFIG_NFT_DUP_NETDEV=m
 CONFIG_NFT_FWD_NETDEV=m
 CONFIG_NFT_FIB_NETDEV=m
+CONFIG_NF_FLOW_TABLE_INET=m
+CONFIG_NF_FLOW_TABLE=m
 CONFIG_NETFILTER_XT_SET=m
 CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
 CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
@@ -200,6 +203,7 @@ CONFIG_NFT_CHAIN_ROUTE_IPV4=m
 CONFIG_NFT_DUP_IPV4=m
 CONFIG_NFT_FIB_IPV4=m
 CONFIG_NF_TABLES_ARP=m
+CONFIG_NF_FLOW_TABLE_IPV4=m
 CONFIG_NF_LOG_ARP=m
 CONFIG_NFT_CHAIN_NAT_IPV4=m
 CONFIG_NFT_MASQ_IPV4=m
@@ -229,6 +233,7 @@ CONFIG_NF_SOCKET_IPV6=m
 CONFIG_NFT_CHAIN_ROUTE_IPV6=m
 CONFIG_NFT_DUP_IPV6=m
 CONFIG_NFT_FIB_IPV6=m
+CONFIG_NF_FLOW_TABLE_IPV6=m
 CONFIG_NFT_CHAIN_NAT_IPV6=m
 CONFIG_NFT_MASQ_IPV6=m
 CONFIG_NFT_REDIR_IPV6=m
@@ -242,6 +247,7 @@ CONFIG_IP6_NF_MATCH_IPV6HEADER=m
 CONFIG_IP6_NF_MATCH_MH=m
 CONFIG_IP6_NF_MATCH_RPFILTER=m
 CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_SRH=m
 

[PATCH] m68k/mm: Stop printing the virtual memory layout

2018-02-12 Thread Geert Uytterhoeven
Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with
%p"), the virtual memory layout printed during boot up contains "ptrval"
instead of actual addresses:

Memory: 268040K/276480K available (2979K kernel code, 310K rwdata, 784K 
rodata, 144K init, 172K bss, 8440K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector  : 0x003d2e74 - 0x003d3274   (   1 KiB)
kmap: 0xd000 - 0xf000   ( 512 MiB)
vmalloc : 0x1180 - 0xd000   (3048 MiB)
lowmem  : 0x - 0x1100   ( 272 MiB)
  .init : 0x(ptrval) - 0x(ptrval)   ( 144 KiB)
  .text : 0x(ptrval) - 0x(ptrval)   (2980 KiB)
  .data : 0x(ptrval) - 0x(ptrval)   (1095 KiB)
  .bss  : 0x(ptrval) - 0x(ptrval)   ( 173 KiB)

Instead of changing the printing to "%px", and leaking virtual memory
layout information again, just remove the printing completely, cfr. e.g.
commit 071929dbdd865f77 ("arm64: Stop printing the virtual memory
layout").

All interesting information (actual section sizes) is already printed by
mem_init_print_info() just above anyway.

Signed-off-by: Geert Uytterhoeven 
---
 arch/m68k/mm/init.c | 27 ---
 1 file changed, 27 deletions(-)

diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
index e85acd131fa8fe76..8827b7f914025595 100644
--- a/arch/m68k/mm/init.c
+++ b/arch/m68k/mm/init.c
@@ -120,32 +120,6 @@ void free_initmem(void)
 #define VECTORS_ramvec
 #endif
 
-void __init print_memmap(void)
-{
-#define UL(x) ((unsigned long) (x))
-#define MLK(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 10
-#define MLM(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 20
-#define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), 1024)
-
-   pr_notice("Virtual kernel memory layout:\n"
-   "vector  : 0x%08lx - 0x%08lx   (%4ld KiB)\n"
-   "kmap: 0x%08lx - 0x%08lx   (%4ld MiB)\n"
-   "vmalloc : 0x%08lx - 0x%08lx   (%4ld MiB)\n"
-   "lowmem  : 0x%08lx - 0x%08lx   (%4ld MiB)\n"
-   "  .init : 0x%p" " - 0x%p" "   (%4d KiB)\n"
-   "  .text : 0x%p" " - 0x%p" "   (%4d KiB)\n"
-   "  .data : 0x%p" " - 0x%p" "   (%4d KiB)\n"
-   "  .bss  : 0x%p" " - 0x%p" "   (%4d KiB)\n",
-   MLK(VECTORS, VECTORS + 256),
-   MLM(KMAP_START, KMAP_END),
-   MLM(VMALLOC_START, VMALLOC_END),
-   MLM(PAGE_OFFSET, (unsigned long)high_memory),
-   MLK_ROUNDUP(__init_begin, __init_end),
-   MLK_ROUNDUP(_stext, _etext),
-   MLK_ROUNDUP(_sdata, _edata),
-   MLK_ROUNDUP(__bss_start, __bss_stop));
-}
-
 static inline void init_pointer_tables(void)
 {
 #if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
@@ -170,7 +144,6 @@ void __init mem_init(void)
free_all_bootmem();
init_pointer_tables();
mem_init_print_info(NULL);
-   print_memmap();
 }
 
 #ifdef CONFIG_BLK_DEV_INITRD
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] m68k/mm: Stop printing the virtual memory layout

2018-02-12 Thread Finn Thain
On Mon, 12 Feb 2018, Geert Uytterhoeven wrote:

> Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with
> %p"), the virtual memory layout printed during boot up contains "ptrval"
> instead of actual addresses:
> 
> Memory: 268040K/276480K available (2979K kernel code, 310K rwdata, 784K 
> rodata, 144K init, 172K bss, 8440K reserved, 0K cma-reserved)
> Virtual kernel memory layout:
>   vector  : 0x003d2e74 - 0x003d3274   (   1 KiB)
>   kmap: 0xd000 - 0xf000   ( 512 MiB)
>   vmalloc : 0x1180 - 0xd000   (3048 MiB)
>   lowmem  : 0x - 0x1100   ( 272 MiB)
> .init : 0x(ptrval) - 0x(ptrval)   ( 144 KiB)
> .text : 0x(ptrval) - 0x(ptrval)   (2980 KiB)
> .data : 0x(ptrval) - 0x(ptrval)   (1095 KiB)
> .bss  : 0x(ptrval) - 0x(ptrval)   ( 173 KiB)
> 
> Instead of changing the printing to "%px", and leaking virtual memory
> layout information again,
> 
> just remove the printing completely, cfr. e.g.
> commit 071929dbdd865f77 ("arm64: Stop printing the virtual memory
> layout").
> 
> All interesting information (actual section sizes) is already printed by
> mem_init_print_info() just above anyway.
> 

Or maybe revert to %lx with pr_debug instead of pr_notice. Just a thought; 
I don't have any preference.

-- 

> Signed-off-by: Geert Uytterhoeven 
> ---
>  arch/m68k/mm/init.c | 27 ---
>  1 file changed, 27 deletions(-)
> 
> diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
> index e85acd131fa8fe76..8827b7f914025595 100644
> --- a/arch/m68k/mm/init.c
> +++ b/arch/m68k/mm/init.c
> @@ -120,32 +120,6 @@ void free_initmem(void)
>  #define VECTORS  _ramvec
>  #endif
>  
> -void __init print_memmap(void)
> -{
> -#define UL(x) ((unsigned long) (x))
> -#define MLK(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 10
> -#define MLM(b, t) UL(b), UL(t), (UL(t) - UL(b)) >> 20
> -#define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), 1024)
> -
> - pr_notice("Virtual kernel memory layout:\n"
> - "vector  : 0x%08lx - 0x%08lx   (%4ld KiB)\n"
> - "kmap: 0x%08lx - 0x%08lx   (%4ld MiB)\n"
> - "vmalloc : 0x%08lx - 0x%08lx   (%4ld MiB)\n"
> - "lowmem  : 0x%08lx - 0x%08lx   (%4ld MiB)\n"
> - "  .init : 0x%p" " - 0x%p" "   (%4d KiB)\n"
> - "  .text : 0x%p" " - 0x%p" "   (%4d KiB)\n"
> - "  .data : 0x%p" " - 0x%p" "   (%4d KiB)\n"
> - "  .bss  : 0x%p" " - 0x%p" "   (%4d KiB)\n",
> - MLK(VECTORS, VECTORS + 256),
> - MLM(KMAP_START, KMAP_END),
> - MLM(VMALLOC_START, VMALLOC_END),
> - MLM(PAGE_OFFSET, (unsigned long)high_memory),
> - MLK_ROUNDUP(__init_begin, __init_end),
> - MLK_ROUNDUP(_stext, _etext),
> - MLK_ROUNDUP(_sdata, _edata),
> - MLK_ROUNDUP(__bss_start, __bss_stop));
> -}
> -
>  static inline void init_pointer_tables(void)
>  {
>  #if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
> @@ -170,7 +144,6 @@ void __init mem_init(void)
>   free_all_bootmem();
>   init_pointer_tables();
>   mem_init_print_info(NULL);
> - print_memmap();
>  }
>  
>  #ifdef CONFIG_BLK_DEV_INITRD
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net v4 01/13] net/8390: Remove redundant make dependencies

2018-02-12 Thread Geert Uytterhoeven
On Mon, Feb 12, 2018 at 4:08 AM, Finn Thain  wrote:
> The hydra, zorro8390 and mcf8390 drivers all #include "lib8390.c" and
> have no need for 8390.o. modinfo confirms no dependency on 8390.ko.
> Drop the redundant dependency from the Makefile. objdump confirms
> that this has no effect on the module binaries.
>
> Cc: Greg Ungerer 
> Cc: Geert Uytterhoeven 
> Signed-off-by: Finn Thain 

Acked-by: Geert Uytterhoeven 

The superfluous additions of 8390.o were introduced in commit
644570b830266ff3 ("8390: Move the 8390 related drivers").

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] m68k/mm: Stop printing the virtual memory layout

2018-02-12 Thread Geert Uytterhoeven
Hi Finn,

On Tue, Feb 13, 2018 at 1:48 AM, Finn Thain  wrote:
> On Mon, 12 Feb 2018, Geert Uytterhoeven wrote:
>> Since commit ad67b74d2469d9b8 ("printk: hash addresses printed with
>> %p"), the virtual memory layout printed during boot up contains "ptrval"
>> instead of actual addresses:
>>
>> Memory: 268040K/276480K available (2979K kernel code, 310K rwdata, 784K 
>> rodata, 144K init, 172K bss, 8440K reserved, 0K cma-reserved)
>> Virtual kernel memory layout:
>>   vector  : 0x003d2e74 - 0x003d3274   (   1 KiB)
>>   kmap: 0xd000 - 0xf000   ( 512 MiB)
>>   vmalloc : 0x1180 - 0xd000   (3048 MiB)
>>   lowmem  : 0x - 0x1100   ( 272 MiB)
>> .init : 0x(ptrval) - 0x(ptrval)   ( 144 KiB)
>> .text : 0x(ptrval) - 0x(ptrval)   (2980 KiB)
>> .data : 0x(ptrval) - 0x(ptrval)   (1095 KiB)
>> .bss  : 0x(ptrval) - 0x(ptrval)   ( 173 KiB)
>>
>> Instead of changing the printing to "%px", and leaking virtual memory
>> layout information again,
>>
>> just remove the printing completely, cfr. e.g.
>> commit 071929dbdd865f77 ("arm64: Stop printing the virtual memory
>> layout").
>>
>> All interesting information (actual section sizes) is already printed by
>> mem_init_print_info() just above anyway.
>
> Or maybe revert to %lx with pr_debug instead of pr_notice. Just a thought;

(%px prints unhashed pointers, no need for %lx and cast)

> I don't have any preference.

Dynamic debug is hot these days, so that may be enabled by distros,
still leaking the info.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net v4 02/13] net/8390: Fix msg_enable patch snafu

2018-02-12 Thread Finn Thain
On Mon, 12 Feb 2018, David Miller wrote:

> From: Finn Thain 
> Date: Sun, 11 Feb 2018 22:08:43 -0500 (EST)
> 
> > The lib8390 module parameter 'msg_enable' doesn't do anything useful:
> > it causes an ancient version string to be logged.
> 
> Not true.
> 
> You need to look at the various netif_*() et al. message logging
> interfaces, they check "p->msg_enable" to determine which messages to
> print.
> 

I think you have overlooked those modules which offer no way to set 
p->msg_enable, i.e. ax88796, axnet_cs, etherh, hydra, mac8390, mcf8390, 
pcnet_cs and zorro8390.

The apne, ne, ne2k-pci, smc-ultra, stnic, and wd modules are not at issue 
here because they define their own msg_enable parameters and they also 
assign p->msg_enable accordingly.

> I'm not applying this, sorry.
> 

Please take another look.

> Just for the record, I consider these kinds of ancient driver cleanups 
> painful to review, and unless they allow some ugly global kernel API to 
> be improved or removed such changes have very little gain.
> 

OK. When there are no users, I'll send you no patches.

But even then, I may continue to send patches to other maintainers who may 
be open to the possibility of unforeseen future uses of the body of 
contributed code under their care.

> In fact, most of them have a good chance to break things.
> 

You saw the tested-by tags, right? Anyway, if you consider my previous 
work, I believe you'll find that I've fixed more bugs than I've 
introduced.

> It is especially a dubious sequence when you cluster so many of these 
> things together into a large patch series.
> 

Sorry if that gave the wrong impression. Doing that made my workflow 
easier.

> If you are really serious about fixing real bugs, post these one at a 
> time, very slowly, for us to review properly and apply.
> 
> Thank you.

Please don't feel like I'm trying to pressure you to expedite this.

FWIW, this submission was arranged so that you might cherry-pick the first 
N patches, for some satisfactory value of N.

I will split up this series by driver (8390, sonic, etc) so it's more 
clear which patches are independent and which patches can be reviewed 
together.

Thanks.

-- 

> --
> To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net v4 09/13] net/mac8390: Convert to nubus_driver

2018-02-12 Thread Finn Thain
On Mon, 12 Feb 2018, Geert Uytterhoeven wrote:

> On Mon, Feb 12, 2018 at 4:08 AM, Finn Thain  
> wrote:
> > This resolves an old bug that constrained this driver to no more than
> > one card.
> >
> > Tested-by: Stan Johnson 
> > Signed-off-by: Finn Thain 
> 
> > --- a/drivers/net/ethernet/8390/mac8390.c
> > +++ b/drivers/net/ethernet/8390/mac8390.c
> 
> > @@ -390,86 +389,86 @@ static bool __init mac8390_init(struct net_device 
> > *dev,
> > return true;
> >  }
> >
> > -struct net_device * __init mac8390_probe(int unit)
> > +static int mac8390_device_probe(struct nubus_board *board)
> >  {
> > struct net_device *dev;
> > -   struct nubus_rsrc *ndev = NULL;
> > int err = -ENODEV;
> > -   static unsigned int slots;
> > -
> > -   enum mac8390_type cardtype;
> > -
> > -   /* probably should check for Nubus instead */
> > +   struct nubus_rsrc *fres;
> > +   enum mac8390_type cardtype = MAC8390_NONE;
> >
> > if (!MACH_IS_MAC)
> > -   return ERR_PTR(-ENODEV);
> > +   return -ENODEV;
> 
> I think this check can be removed completely,

I agree.

> as the nubus_board will exist on suitable Macs only.
> 

And considering the out-of-tree Nubus PowerMac port, this check just makes 
the driver less portable.

I'll resubmit these patches with the changes you have suggested (here and 
elsewhere). Thanks for your review.

BTW, would you be willing to review the rest of this series sometime? I 
ask because David has voiced concerns about code quality, and your 
"reviewed-by" tag speaks volumes.

-- 

> Gr{oetje,eeting}s,
> 
> Geert
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html