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: <1516111587.1648.0@smtp.crapouillou.net>
Date:   Tue, 16 Jan 2018 15:06:27 +0100
From:   Paul Cercueil <paul@...pouillou.net>
To:     James Hogan <james.hogan@...s.com>
Cc:     Ralf Baechle <ralf@...ux-mips.org>,
        Maarten ter Huurne <maarten@...ewalker.org>,
        Paul Burton <paul.burton@...s.com>,
        linux-kernel@...r.kernel.org, linux-mips@...ux-mips.org
Subject: Re: [PATCH v6 10/15] MIPS: ingenic: Detect machtype from SoC
 compatible string

Hi James,

Le mer. 10 janv. 2018 à 23:27, James Hogan <james.hogan@...s.com> a 
écrit :
> On Fri, Jan 05, 2018 at 07:25:08PM +0100, Paul Cercueil wrote:
>>  Previously, the mips_machtype variable was always initialized
>>  to MACH_INGENIC_JZ4740 even if running on different SoCs.
>> 
>>  Signed-off-by: Paul Cercueil <paul@...pouillou.net>
>>  ---
>>   arch/mips/jz4740/prom.c  |  1 -
>>   arch/mips/jz4740/setup.c | 26 ++++++++++++++++++++++----
>>   2 files changed, 22 insertions(+), 5 deletions(-)
>> 
>>   v2: No change
>>   v3: No change
>>   v4: No change
>>   v5: Use SPDX license identifier
>>   v6: Init mips_machtype from DT compatible string instead of using
>>       MIPS_MACHINE
>> 
>>  diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c
>>  index a62dd8e6ecf9..eb9f2f97bedb 100644
>>  --- a/arch/mips/jz4740/prom.c
>>  +++ b/arch/mips/jz4740/prom.c
>>  @@ -25,7 +25,6 @@
>> 
>>   void __init prom_init(void)
>>   {
>>  -	mips_machtype = MACH_INGENIC_JZ4740;
>>   	fw_init_cmdline();
>>   }
>> 
>>  diff --git a/arch/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c
>>  index 6d0152321819..cd89536fbba1 100644
>>  --- a/arch/mips/jz4740/setup.c
>>  +++ b/arch/mips/jz4740/setup.c
>>  @@ -53,16 +53,30 @@ static void __init jz4740_detect_mem(void)
>>   	add_memory_region(0, size, BOOT_MEM_RAM);
>>   }
>> 
>>  +static unsigned long __init get_board_mach_type(const void *fdt)
>>  +{
>>  +	if (!fdt_node_check_compatible(fdt, 0, "ingenic,jz4780"))
>>  +		return MACH_INGENIC_JZ4780;
>>  +	if (!fdt_node_check_compatible(fdt, 0, "ingenic,jz4770"))
>>  +		return MACH_INGENIC_JZ4770;
>>  +
>>  +	return MACH_INGENIC_JZ4740;
>>  +}
>>  +
>>   void __init plat_mem_setup(void)
>>   {
>>   	int offset;
>> 
>>  +	if (!early_init_dt_scan(__dtb_start))
>>  +		return;
>>  +
>>   	jz4740_reset_init();
>>  -	__dt_setup_arch(__dtb_start);
> 
> Is it intentional that by removing this we no longer set the machine
> name, so it'll default to "unknown"? The commit message doesn't 
> mention
> that change.
> 
> Cheers
> James

You're right, thank you for spotting that. I'll send a revised version 
ASAP.

-Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ