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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a143yQ72+QGZSxpiFc7p8Hb7PXuCybJBFoLRSBaZ2uw4g@mail.gmail.com>
Date:   Thu, 18 Jan 2018 11:11:13 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Greentime Hu <green.hu@...il.com>
Cc:     Greentime <greentime@...estech.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jason Cooper <jason@...edaemon.net>,
        Marc Zyngier <marc.zyngier@....com>,
        Rob Herring <robh+dt@...nel.org>,
        Networking <netdev@...r.kernel.org>,
        Vincent Chen <deanbo422@...il.com>,
        DTML <devicetree@...r.kernel.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        David Howells <dhowells@...hat.com>,
        Will Deacon <will.deacon@....com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        linux-serial@...r.kernel.org,
        Geert Uytterhoeven <geert.uytterhoeven@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Mark Rutland <mark.rutland@....com>, Greg KH <greg@...ah.com>,
        Guo Ren <ren_guo@...ky.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        David Miller <davem@...emloft.net>,
        Jonas Bonn <jonas@...thpole.se>,
        Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
        Stafford Horne <shorne@...il.com>,
        Vincent Chen <vincentc@...estech.com>
Subject: Re: [PATCH v6 06/36] nds32: Kernel booting and initialization

On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu <green.hu@...il.com> wrote:

I had not looked at this patch in enough detail earlier, sorry about
that. It should be
easy enough to fix though.

> +#ifdef CONFIG_VGA_CONSOLE
> +struct screen_info screen_info;
> +#endif

I would assume that you can't ever have a VGA console. Just drop all
the references
here and instead send a patch to the fbdev maintainer to add the dependency
at CONFIG_VGA_CONSOLE to prevent selecting it with nds32.

> +extern struct mm_struct init_mm;

init_mm is declared in linux/mm_types.h, so you should need another declaration.
In general, you should never put 'extern' declarations in to .c files anyway.

> +
> +extern void __init early_init_devtree(void *params);
> +extern void __init early_trap_init(void);

similarly, these are declared in include/linux/of_fdt.h

> +void __init setup_arch(char **cmdline_p)
> +{
> +       early_init_devtree(__atags_pointer ?
> +                          phys_to_virt(__atags_pointer) : __dtb_start);

The reference to '__atags_pointer' appears to be a leftover from pre-DT
days. Can you just remove that?

> +void calibrate_delay(void)
> +{
> +       const int *val;
> +       struct device_node *cpu = NULL;
> +       cpu = of_find_compatible_node(NULL, NULL, "andestech,nds32v3");
> +       val = of_get_property(cpu, "clock-frequency", NULL);
> +       if (!val || !*val)
> +               panic("no cpu 'clock-frequency' parameter in device tree");
> +       loops_per_jiffy = be32_to_cpup(val) / HZ;
> +       pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n",
> +               loops_per_jiffy / (500000 / HZ),
> +               (loops_per_jiffy / (5000 / HZ)) % 100, loops_per_jiffy);
> +}

This seems very odd to me: The 'clock-frequency' property in the
cpu node should refer to the actual frequency it is running at, but that
tends to be different from the bogomips as needed by the ndelay()
function. Can you explain what is going on here?

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ