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]
Message-ID: <20180319070859.GC21923@guoren>
Date:   Mon, 19 Mar 2018 15:08:59 +0800
From:   Guo Ren <ren_guo@...ky.com>
To:     Mark Rutland <mark.rutland@....com>
Cc:     linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
        tglx@...utronix.de, daniel.lezcano@...aro.org,
        jason@...edaemon.net, arnd@...db.de, c-sky_gcc_upstream@...ky.com,
        gnu-csky@...tor.com, thomas.petazzoni@...tlin.com,
        wbx@...ibc-ng.org
Subject: Re: [PATCH 19/19] irqchip: add irq-nationalchip.c and irq-csky.c

On Mon, Mar 19, 2018 at 04:26:00AM +0000, Mark Rutland wrote:
> On Mon, Mar 19, 2018 at 03:51:41AM +0800, Guo Ren wrote:
> > +static unsigned int intc_reg;
> 
> This should be a void __iomem *ptr;
>
OK

> > +#define CK_VA_INTC_ICR		(void *)(intc_reg + 0x00)	/* Interrupt control register(High 16bits) */
> > +#define CK_VA_INTC_ISR		(void *)(intc_reg + 0x00)	/* Interrupt status register(Low 16bits) */
> > +#define CK_VA_INTC_NEN31_00	(void *)(intc_reg + 0x10)	/* Normal interrupt enable register Low */
> > +#define	CK_VA_INTC_NEN63_32	(void *)(intc_reg + 0x28)	/* Normal interrupt enable register High */
> > +#define CK_VA_INTC_IFR31_00	(void *)(intc_reg + 0x08)	/* Normal interrupt force register Low */
> > +#define CK_VA_INTC_IFR63_32	(void *)(intc_reg + 0x20)	/* Normal interrupt force register High */
> > +#define	CK_VA_INTC_SOURCE	(void *)(intc_reg + 0x40)	/* Proiority Level Select Registers 0 */
> 
> Please use mnemonics for the offsets, and add the base address in the IO
> accessors.
> 
OK

> > +		temp = __raw_readl(CK_VA_INTC_NEN31_00);
> 
> Please use readl_relaxed() rather than __raw_readl().
>
OK

> > +		__raw_writel(temp, CK_VA_INTC_NEN31_00);
> 
> Likewise, please use writel_relaxed() rather than __raw_writel().
>
OK
 
> These need devicetree bindings. Please see
> Documentation/devicetree/bindings/submitting-patches.txt.
>
OK

> Please avoid assembly in generic driver code. Here you cna use __ffs64() after
> combining the two halves into a 64-bit quantity, or you could use ffs() on each
> half.
>
OK

> > +IRQCHIP_DECLARE(nationalchip_intc_v1_ave, "nationalchip,intc-v1,ave", intc_init);
> 
> This needs a devicetree binding document.
OK
Best Regards
 Guo Ren

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ