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  linux-cve-announce  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:   Fri, 29 Oct 2021 07:34:40 +0200
From:   Lukas Bulwahn <lukas.bulwahn@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Russell King <linux@...linux.org.uk>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        Sekhar Nori <nsekhar@...com>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Linus Walleij <linusw@...nel.org>,
        Imre Kaloz <kaloz@...nwrt.org>,
        Krzysztof Halasa <khalasa@...p.pl>,
        Avi Fishman <avifishman70@...il.com>,
        Tomer Maimon <tmaimon77@...il.com>,
        Tali Perry <tali.perry1@...il.com>,
        Patrick Venture <venture@...gle.com>,
        Nancy Yuen <yuenn@...gle.com>,
        Benjamin Fair <benjaminfair@...gle.com>,
        Dinh Nguyen <dinguyen@...nel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        OpenBMC Maillist <openbmc@...ts.ozlabs.org>,
        kernel-janitors <kernel-janitors@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/13] arm: debug: remove obsolete debug code for DEBUG_ZTE_ZX

On Thu, Oct 28, 2021 at 4:38 PM Arnd Bergmann <arnd@...db.de> wrote:
>
> On Thu, Oct 28, 2021 at 4:19 PM Lukas Bulwahn <lukas.bulwahn@...il.com> wrote:
> >
> > Commit 89d4f98ae90d ("ARM: remove zte zx platform") removes the config
> > DEBUG_ZTE_ZX. Hence, since then, the "ifdef CONFIG_DEBUG_ZTE_ZX" in
> > ./arch/arm/include/debug/pl01x.S is dead code.
> >
> > Fortunately, ./scripts/checkkconfigsymbols.py detects this and warns:
> >
> > DEBUG_ZTE_ZX
> > Referencing files: arch/arm/include/debug/pl01x.S
> >
> > So, remove the obsolete ifdef CONFIG_DEBUG_ZTE_ZX.
> >
> > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@...il.com>
>
> Reviewed-by: Arnd Bergmann <arnd@...db.de>
>
> I see another copy of these constants in drivers/tty/serial/amba-pl011.c,
> which we should probably clean up as well.
>

Arnd, did you have something like this---see below---for serial
amba-pl011 in mind?

Then, I would adjust the patch to remove all the zte_zx serial
left-over in one commit.

Lukas

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index d361cd84ff8c..c9534e229166 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -188,38 +188,6 @@ static struct vendor_data vendor_st = {
     .get_fifosize        = get_fifosize_st,
 };

-static const u16 pl011_zte_offsets[REG_ARRAY_SIZE] = {
-    [REG_DR] = ZX_UART011_DR,
-    [REG_FR] = ZX_UART011_FR,
-    [REG_LCRH_RX] = ZX_UART011_LCRH,
-    [REG_LCRH_TX] = ZX_UART011_LCRH,
-    [REG_IBRD] = ZX_UART011_IBRD,
-    [REG_FBRD] = ZX_UART011_FBRD,
-    [REG_CR] = ZX_UART011_CR,
-    [REG_IFLS] = ZX_UART011_IFLS,
-    [REG_IMSC] = ZX_UART011_IMSC,
-    [REG_RIS] = ZX_UART011_RIS,
-    [REG_MIS] = ZX_UART011_MIS,
-    [REG_ICR] = ZX_UART011_ICR,
-    [REG_DMACR] = ZX_UART011_DMACR,
-};
-
-static unsigned int get_fifosize_zte(struct amba_device *dev)
-{
-    return 16;
-}
-
-static struct vendor_data vendor_zte = {
-    .reg_offset        = pl011_zte_offsets,
-    .access_32b        = true,
-    .ifls            = UART011_IFLS_RX4_8|UART011_IFLS_TX4_8,
-    .fr_busy        = ZX_UART01x_FR_BUSY,
-    .fr_dsr            = ZX_UART01x_FR_DSR,
-    .fr_cts            = ZX_UART01x_FR_CTS,
-    .fr_ri            = ZX_UART011_FR_RI,
-    .get_fifosize        = get_fifosize_zte,
-};
-
 /* Deals with DMA transactions */

 struct pl011_sgbuf {
@@ -2974,11 +2942,6 @@ static const struct amba_id pl011_ids[] = {
         .mask    = 0x00ffffff,
         .data    = &vendor_st,
     },
-    {
-        .id    = AMBA_LINUX_ID(0x00, 0x1, 0xffe),
-        .mask    = 0x00ffffff,
-        .data    = &vendor_zte,
-    },
     { 0, 0 },
 };

diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index edfcf7a14dcd..6c7f47846971 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -90,14 +90,8 @@ enum amba_vendor {
     AMBA_VENDOR_ST = 0x80,
     AMBA_VENDOR_QCOM = 0x51,
     AMBA_VENDOR_LSI = 0xb6,
-    AMBA_VENDOR_LINUX = 0xfe,    /* This value is not official */
 };

-/* This is used to generate pseudo-ID for AMBA device */
-#define AMBA_LINUX_ID(conf, rev, part) \
-    (((conf) & 0xff) << 24 | ((rev) & 0xf) << 20 | \
-    AMBA_VENDOR_LINUX << 12 | ((part) & 0xfff))
-
 extern struct bus_type amba_bustype;

 #define to_amba_device(d)    container_of(d, struct amba_device, dev)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ