Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2234048ybh; Mon, 9 Mar 2020 01:39:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtJBHQuA60YFhXgX27tZFgjazMUFzJy12kG32C3NH7sHxPnVfEpXxbth4hpdZf1v2NxMHeC X-Received: by 2002:aca:c7c5:: with SMTP id x188mr10786769oif.130.1583743158059; Mon, 09 Mar 2020 01:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583743158; cv=none; d=google.com; s=arc-20160816; b=WZ1ebjPcbVdBTszeJaIi5wxUUosypbeCPwJ4fmgnE5MblMnNIlz8K4R4OK9h2bvSlV Py3rzk39vfgr+FouTX7hMN+aH2iC2OW9zKNVW1deHZICg6PPIhYABxatDnaAAPz+J9S0 /8sdr9l6choMAfKJZelJj8Z+YTFTFsyNFbQpU/ApSlhYKIx9piBvfT8NI5och0QPE8WR yLCkDRGr5hwqo6A9FIEsKMy6+s14+NlTZdq31wNAH4niYVsHag1OQPAH7XCMAz+1+z4s TrMCppE7xZ11AqlU0VhH8D8f3VHhQ5x3xbsbjsnPQ6JIlu1kwshnsavs40+rce5yqkuC tZFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:dkim-signature; bh=fspPoWh79zaLVJtcCiuZPHpClxHc3HMz8kus+GU3cug=; b=W6x/bIvvviZFwuOTNzRCHzIjAR45Vddf2bOsqDg7FkQpWVzB6u4D2eRvuwQe+SUcCK Kzy+Whz4S+RrA7IwZVWxcNTXF5OxmGd6iznp6xmlC8P/IAqk7nHMhBIIyJjmenFCADpz YxKKOLwz2PvQv+jORcBYOh4baq4CNJiwxjS/XN8M4qcpNF1sMeibdUwG2GYpodKYPu68 VqlkK9LVsg/vW4PLogW3y/QFN9OIOFf/i9JUhsjeXynSYa0a1ypA3FJKxO2+XWsJ3DsS 40sn08EVElhyBIKpDrshCZr8IKhDkNFfrnc1I+Oc3N0nWmrj9DiWFRKm6pTGucimxnKO JvJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=YbuUMczt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v22si5958853otq.109.2020.03.09.01.39.06; Mon, 09 Mar 2020 01:39:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=mail header.b=YbuUMczt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726612AbgCIIhZ (ORCPT + 99 others); Mon, 9 Mar 2020 04:37:25 -0400 Received: from sender3-op-o12.zoho.com.cn ([124.251.121.243]:17899 "EHLO sender3-op-o12.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726215AbgCIIhX (ORCPT ); Mon, 9 Mar 2020 04:37:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1583743004; s=mail; d=flygoat.com; i=jiaxun.yang@flygoat.com; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=fspPoWh79zaLVJtcCiuZPHpClxHc3HMz8kus+GU3cug=; b=YbuUMczt+Flzmo9PiR+v1tbqyKOqjXiarABsnK0yVQyEU3cIXUA8Flomt/pQ3/zb EhZm1g6u1W19YuqOmR4SzBDw8ALe8HixD94y6PpgzvK2f1GOSMeAw+GeHqIUii7eH58 Re4eRPxz/0Ny+V8XxGeJkYgR/ksbqEj5o542DP6E= Received: from mail.baihui.com by mx.zoho.com.cn with SMTP id 1583743001556858.9546748061696; Mon, 9 Mar 2020 16:36:41 +0800 (CST) Date: Mon, 09 Mar 2020 16:36:41 +0800 From: Jiaxun Yang To: "Tiezhu Yang" Cc: "Thomas Bogendoerfer" , "Huacai Chen" , "Bjorn Helgaas" , "Jens Axboe" , "linux-mips" , "linux-pci" , "linux-ide" , "linux-kernel" , "Xuefeng Li" Message-ID: <170be7063d1.c7d52ae02285.4730966984142345992@flygoat.com> In-Reply-To: <1583742206-29163-4-git-send-email-yangtiezhu@loongson.cn> References: <1583742206-29163-1-git-send-email-yangtiezhu@loongson.cn> <1583742206-29163-4-git-send-email-yangtiezhu@loongson.cn> Subject: =?UTF-8?Q?=E5=9B=9E=E5=A4=8D:[PATCH_3/6]_MIPS:_Loongson:_Use_?= =?UTF-8?Q?firmware_arguments_to_get_board_name?= MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Priority: Medium User-Agent: ZohoCN Mail X-Mailer: ZohoCN Mail Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ---- =E5=9C=A8 =E6=98=9F=E6=9C=9F=E4=B8=80, 2020-03-09 16:23:23 Tiezhu Yan= g =E6=92=B0=E5=86=99 ---- > In order to distinguish various types of bridge chip such as AMD RS780E > or Loongson 7A1000, we can use firmware arguments to get board name. >=20 Hi Tiezhu, Thanks for your contribution. Your series is sightly conflict with my "modernize" series. But that's fine= , if your code can meet mainline requirement, I'm going to adjust my works.= =20 See my comments bellow. > Signed-off-by: Tiezhu Yang > --- > arch/mips/include/asm/mach-loongson64/boot_param.h | 1 + > arch/mips/loongson64/env.c | 5 +++++ > 2 files changed, 6 insertions(+) >=20 > diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/m= ips/include/asm/mach-loongson64/boot_param.h > index 8c286be..225a563 100644 > --- a/arch/mips/include/asm/mach-loongson64/boot_param.h > +++ b/arch/mips/include/asm/mach-loongson64/boot_param.h > @@ -217,5 +217,6 @@ struct loongson_system_configuration { > =20 > extern struct efi_memory_map_loongson *loongson_memmap; > extern struct loongson_system_configuration loongson_sysconf; > +extern struct board_devices *eboard; > =20 > #endif > diff --git a/arch/mips/loongson64/env.c b/arch/mips/loongson64/env.c > index 0daeb7b..a244a8c 100644 > --- a/arch/mips/loongson64/env.c > +++ b/arch/mips/loongson64/env.c > @@ -24,6 +24,9 @@ EXPORT_SYMBOL(cpu_clock_freq); > struct efi_memory_map_loongson *loongson_memmap; > struct loongson_system_configuration loongson_sysconf; > =20 > +struct board_devices *eboard; > +EXPORT_SYMBOL(eboard); Can we make it as a part of struct loongson_sysconf and export that struct? Memory of struct eboard is not managed by kernel, we shouldn't export such= symbol. Also I noticed that you're checking PCH type repeatly in other subsystems. = Can you just determine the PCH type here? > + > u64 loongson_chipcfg[MAX_PACKAGES] =3D {0xffffffffbfc00180}; > u64 loongson_chiptemp[MAX_PACKAGES]; > u64 loongson_freqctrl[MAX_PACKAGES]; > @@ -51,6 +54,8 @@ void __init prom_init_env(void) > ((u64)loongson_p + loongson_p->system_offset); > ecpu =3D (struct efi_cpuinfo_loongson *) > ((u64)loongson_p + loongson_p->cpu_offset); > + eboard =3D (struct board_devices *) > + ((u64)loongson_p + loongson_p->boarddev_table_offset); > eirq_source =3D (struct irq_source_routing_table *) > ((u64)loongson_p + loongson_p->irq_offset); > loongson_memmap =3D (struct efi_memory_map_loongson *) > --=20 > 2.1.0 >=20 >