linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jinyang He <hejinyang@loongson.cn>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	Paul Burton <paulburton@kernel.org>,
	Jun-Ru Chang <jrjang@realtek.com>
Subject: Re: [PATCH 1/4] MIPS: process: Reorder header files
Date: Mon, 18 Jan 2021 18:02:08 +0800	[thread overview]
Message-ID: <78c9211d-5304-a2b6-3a94-df9b324b7046@loongson.cn> (raw)
In-Reply-To: <20210115144631.GE15166@alpha.franken.de>

On 01/15/2021 10:46 PM, Thomas Bogendoerfer wrote:

> On Tue, Jan 12, 2021 at 08:29:14PM +0800, Jinyang He wrote:
>> Just reorder the header files.
> This alone isn't worth a commit, IMHO. I bet there are lots of includes
> no longer needed, so removing and sorting them is ok for me.
>
> Thomas.
>

Hi, Thomas,

Thanks for your advice. I analyzed majority of the symbols in this file.
The following are examples of header file references:

Space indicates that it cannot be found. (Maybe I missed it.)

     Header files                                Examples in this file
     #include <linux/completion.h>
*   #include <linux/cpu.h> get_online_cpus
*   #include <linux/errno.h>                    EOPNOTSUPP
     #include <linux/export.h>
*   #include <linux/init.h> arch_initcall
*   #include <linux/kallsyms.h> kallsyms_lookup_name
*   #include <linux/kernel.h> __kernel_text_address
     #include <linux/mm.h>
     #include <linux/mman.h>
*   #include <linux/nmi.h> nmi_cpu_backtrace
*   #include <linux/personality.h> ADDR_NO_RANDOMIZE
     #include <linux/ptrace.h>
*   #include <linux/prctl.h>                    PR_FP_MODE_FR
     #include <linux/random.h>
*   #include <linux/sched.h>                    PF_KTHREAD
*   #include <linux/sched/debug.h> in_sched_functions
     #include <linux/sched/task.h>
*   #include <linux/sched/task_stack.h> task_stack_page
     #include <linux/stddef.h>
     #include <linux/sys.h>
     #include <linux/tick.h>
     #include <linux/uaccess.h>
     #include <linux/unistd.h>

*   #include <asm/abi.h> current->thread.abi->vdso->size
*   #include <asm/asm.h>                        ALMASK
     #include <asm/bootinfo.h>
     #include <asm/cpu.h>
*   #include <asm/dsemul.h> dsemul_thread_cleanup
*   #include <asm/dsp.h>                        init_dsp
     #include <asm/elf.h>
     #include <asm/exec.h>
*   #include <asm/fpu.h>                        lose_fpu
*   #include <asm/inst.h> mips_instruction
     #include <asm/io.h>
*   #include <asm/irq.h>                        on_irq_stack
*   #include <asm/irq_regs.h>                    get_irq_regs
*   #include <asm/isadep.h>                        KU_USER
     #include <asm/mips-cps.h>
*   #include <asm/msa.h>                        is_msa_enabled
*   #include <asm/mipsregs.h>                    ST0_CU0
*   #include <asm/processor.h> VDSO_RANDOMIZE_SIZE
*   #include <asm/reg.h>                        MIPS32_EF_R1
     #include <asm/stacktrace.h>


Here about this file config is:

Enable:
CONFIG_HOTPLUG_CPU, CONFIG_MIPS_FP_SUPPORT, CONFIG_STACKPROTECTOR,
CONFIG_CPU_LOONGSON64, CONFIG_KALLSYMS, CONFIG_64BIT

Disable:
CONFIG_CPU_R3000, CONFIG_CPU_TX39XX, CONFIG_MIPS_MT_FPAFF, 
CONFIG_CPU_MICROMIPS
CONFIG_MIPS_O32_FP64_SUPPORT, CONFIG_32BIT, CONFIG_MIPS32_O32

By including only these header files which marked by '*', I have been able
to compile and use certain functions (unwind_stack) normally. So are other
header files no longer needed?

In addition, <linux/cpu.h> includes <linux/cpumask.h>, and <linux/cpumask.h>
includes <linux/kernel.h>. What should we do?

Thanks,
Jinyang


  reply	other threads:[~2021-01-18 21:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 12:29 [PATCH 0/4] MIPS: process: Some fixes and improvements about get_frame_info() Jinyang He
2021-01-12 12:29 ` [PATCH 1/4] MIPS: process: Reorder header files Jinyang He
2021-01-13  0:27   ` Huacai Chen
2021-01-15 14:46   ` Thomas Bogendoerfer
2021-01-18 10:02     ` Jinyang He [this message]
2021-01-18 11:27       ` Jinyang He
2021-01-18 22:11       ` Thomas Bogendoerfer
2021-01-12 12:29 ` [PATCH 2/4] MIPS: microMIPS: Fix the judgment of mm_jr16_op and mm_jalr_op Jinyang He
2021-01-12 12:29 ` [PATCH 3/4] MIPS: Fix get_frame_info() handing of function size Jinyang He
2021-01-12 12:29 ` [PATCH 4/4] MIPS: Add is_jr_ra_ins() to end the loop early Jinyang He
2021-10-23 18:32   ` Maciej W. Rozycki
2021-10-25  2:11     ` Jinyang He
2021-01-18  1:51 ` [PATCH 0/4] MIPS: process: Some fixes and improvements about get_frame_info() Jiaxun Yang
2021-01-19  1:29   ` Jinyang He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=78c9211d-5304-a2b6-3a94-df9b324b7046@loongson.cn \
    --to=hejinyang@loongson.cn \
    --cc=jrjang@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paulburton@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).