[U-Boot] [PATCH] powerpc: Simplify processor.h
Mario Six
mario.six at gdsys.cc
Fri Mar 29 08:31:37 UTC 2019
On Mon, Jan 28, 2019 at 9:34 AM Mario Six <mario.six at gdsys.cc> wrote:
>
> Lots of stuff in processor.h was taken verbatim from the Linux kernel.
> It was never synced, so most of it was removed or changed in the kernel
> since it was imported.
>
> Remove all the stuff that is unused in the current U-Boot sources;
> should anybody feel the need to re-sync with the kernel, they can do it
> later on.
>
> Signed-off-by: Mario Six <mario.six at gdsys.cc>
> ---
> arch/powerpc/include/asm/processor.h | 120 ---------------------------
> 1 file changed, 120 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
> index f97ce48cc27..e03ab21f59d 100644
> --- a/arch/powerpc/include/asm/processor.h
> +++ b/arch/powerpc/include/asm/processor.h
> @@ -1203,127 +1203,7 @@ int fsl_qoriq_dsp_core_to_cluster(unsigned int core);
> #endif
> #endif
>
> -
> -/* what kind of prep workstation we are */
> -extern int _prep_type;
> -/*
> - * This is used to identify the board type from a given PReP board
> - * vendor. Board revision is also made available.
> - */
> -extern unsigned char ucSystemType;
> -extern unsigned char ucBoardRev;
> -extern unsigned char ucBoardRevMaj, ucBoardRevMin;
> -
> struct task_struct;
> -void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp);
> -void release_thread(struct task_struct *);
> -
> -/*
> - * Create a new kernel thread.
> - */
> -extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
> -
> -/*
> - * Bus types
> - */
> -#define EISA_bus 0
> -#define EISA_bus__is_a_macro /* for versions in ksyms.c */
> -#define MCA_bus 0
> -#define MCA_bus__is_a_macro /* for versions in ksyms.c */
> -
> -/* Lazy FPU handling on uni-processor */
> -extern struct task_struct *last_task_used_math;
> -extern struct task_struct *last_task_used_altivec;
> -
> -/*
> - * this is the minimum allowable io space due to the location
> - * of the io areas on prep (first one at 0x80000000) but
> - * as soon as I get around to remapping the io areas with the BATs
> - * to match the mac we can raise this. -- Cort
> - */
> -#define TASK_SIZE (0x80000000UL)
> -
> -/* This decides where the kernel will search for a free chunk of vm
> - * space during mmap's.
> - */
> -#define TASK_UNMAPPED_BASE (TASK_SIZE / 8 * 3)
> -
> -typedef struct {
> - unsigned long seg;
> -} mm_segment_t;
> -
> -struct thread_struct {
> - unsigned long ksp; /* Kernel stack pointer */
> - unsigned long wchan; /* Event task is sleeping on */
> - struct pt_regs *regs; /* Pointer to saved register state */
> - mm_segment_t fs; /* for get_fs() validation */
> - void *pgdir; /* root of page-table tree */
> - signed long last_syscall;
> - double fpr[32]; /* Complete floating point set */
> - unsigned long fpscr_pad; /* fpr ... fpscr must be contiguous */
> - unsigned long fpscr; /* Floating point status */
> -#ifdef CONFIG_ALTIVEC
> - vector128 vr[32]; /* Complete AltiVec set */
> - vector128 vscr; /* AltiVec status */
> - unsigned long vrsave;
> -#endif /* CONFIG_ALTIVEC */
> -};
> -
> -#define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack)
> -
> -#define INIT_THREAD { \
> - INIT_SP, /* ksp */ \
> - 0, /* wchan */ \
> - (struct pt_regs *)INIT_SP - 1, /* regs */ \
> - KERNEL_DS, /*fs*/ \
> - swapper_pg_dir, /* pgdir */ \
> - 0, /* last_syscall */ \
> - {0}, 0, 0 \
> -}
> -
> -/*
> - * Note: the vm_start and vm_end fields here should *not*
> - * be in kernel space. (Could vm_end == vm_start perhaps?)
> - */
> -#define INIT_MMAP { &init_mm, 0, 0x1000, NULL, \
> - PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, \
> - 1, NULL, NULL }
> -
> -/*
> - * Return saved PC of a blocked thread. For now, this is the "user" PC
> - */
> -static inline unsigned long thread_saved_pc(struct thread_struct *t)
> -{
> - return (t->regs) ? t->regs->nip : 0;
> -}
> -
> -#define copy_segments(tsk, mm) do { } while (0)
> -#define release_segments(mm) do { } while (0)
> -#define forget_segments() do { } while (0)
> -
> -unsigned long get_wchan(struct task_struct *p);
> -
> -#define KSTK_EIP(tsk) ((tsk)->thread.regs->nip)
> -#define KSTK_ESP(tsk) ((tsk)->thread.regs->gpr[1])
> -
> -/*
> - * NOTE! The task struct and the stack go together
> - */
> -#define THREAD_SIZE (2*PAGE_SIZE)
> -#define alloc_task_struct() \
> - ((struct task_struct *) __get_free_pages(GFP_KERNEL,1))
> -#define free_task_struct(p) free_pages((unsigned long)(p),1)
> -#define get_task_struct(tsk) atomic_inc(&mem_map[MAP_NR(tsk)].count)
> -
> -/* in process.c - for early bootup debug -- Cort */
> -int ll_printk(const char *, ...);
> -void ll_puts(const char *);
> -
> -#define init_task (init_task_union.task)
> -#define init_stack (init_task_union.stack)
> -
> -/* In misc.c */
> -void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
>
> #ifndef CONFIG_CPU_MPC83XX
> int prt_83xx_rsr(void);
> --
> 2.20.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
Applied to u-boot-mpc83xx/next.
More information about the U-Boot
mailing list