linux-mips
[Top] [All Lists]

Re: [v2 PATCH] MIPS: Add current_cpu_prid() to optimize the code generat

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [v2 PATCH] MIPS: Add current_cpu_prid() to optimize the code generation
From: wu zhangjin <wuzhangjin@gmail.com>
Date: Wed, 29 Dec 2010 13:33:52 +0800
Cc: linux-mips@linux-mips.org, Wu Zhangjin <wuzhangjin@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=9K6T/3ljyG41rGtSFem/IB0vinHE/AuaCxt/iPQmXHM=; b=Ws8sEVfPOIGl1yH+A7M6pjv2Kbb9pcmkeordr4vOeRylzfoqtrdedaQxOlzioSQowO iZTc7xncvTLcg1C+cFkQileTsok3Qj8XLOEsrSWfZmsLLg5qx+da9rxFwN/XQP+wqTl4 CpD2QjWntzhXsiSmXAs/13IKs5DlzQ8EjcPpE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=UFVqrLn0U5B5bvCDh/FLG0jKlDRMatXWuLfBXDb5DrJOVj4gMCrArRCi0YAqF7fhh0 Mq1EBQCeLWBy52WocwhQas02JE1hmN7JookMsPTzcMCP06u8THXaGoZ7hKyEGJFTiNwJ dNoy+cNCIhiKGJtJMEGT/bidXh4H8RAHR0EyM=
In-reply-to: <1293298802-12727-1-git-send-email-wuzhangjin@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1293298802-12727-1-git-send-email-wuzhangjin@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
Hi, Ralf

This patch is too big for review, If the basic idea is okay for you, I
will split it and resend it.

Thanks,
Wu Zhangjin

On Sun, Dec 26, 2010 at 1:40 AM, Wu Zhangjin <wuzhangjin@gmail.com> wrote:
> current_cpu_prid(), cpu_prid_comp(), cpu_prid_imp() and cpu_prid_rev()
> are added to simplify/beautify the processord_id related code.
>
> And if current_cpu_prid() is pre-encoded for the specific processor in
> cpu-feature-overrides.h, the code generation will be optimized.
>
> cpu_prid_encode() and cpu_prid_encode_copt() are added to encode the
> current_cpu_prid(), the former one can be used by most of the processors
> whose 'Company Options' part of the prid register is 0 or is not used by
> any of the existing codes. Or current_cpu_prid() can be simply assigned
> as the value of read_c0_prid(), which can be printed by the
> show_cpuinfo() defined in arch/mips/kernel/proc.c.
>
> The size of compressed kernel image(vmlinuz) can be reduced about 0.1M
> if current_cpu_prid() is pre-defined as a fixed value in
> cpu-feature-overrides.h.

<Prev in Thread] Current Thread [Next in Thread>