2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 17:23:55 +08:00

OpenRISC updates for 5.6

A few cleanups all over the place, things of note:
  - Enable the clone3 syscall
  - Remove CONFIG_CROSS_COMPILE from Krzysztof Kozlowski
  - Update to use mmgrab from Julia Lawall
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE2cRzVK74bBA6Je/xw7McLV5mJ+QFAl6Ma4EACgkQw7McLV5m
 J+R+nRAAhGFdmzGCizblS1CqXxUEp58EJgQ6LwmDLiDcXBwZYiw3nh3pQq0hF6sP
 SJQuyZH1HmNLkvKmLylyRowrqW8bHfr3ePOwMfqtX0kzt1DlDn/Nibq8Ua0MrqGv
 CSNI0wbBFNb6+ej1lIS6wAwYd3Ji4XmPupBk2zo6BMAfM1mEzndw7FKf8imIyOMB
 hH1sumKBc+zKAMmINs+BiCxO1T/Fc9M7FUpL7Ai18OpOAXr/dDQR5ej8b7BlOJ45
 hkwJZa3iBMRTsptiqAvX/CswsrsBhEqoLe7Z2+XH8+wR0Kp7rXiKI05kPykBN+aj
 x7KUP2Kr9Mg4samb+QWfxGT27YIKhhPwbJSRdLITtTsp9gd+g1sNYZah/nOHhq87
 U24ZdCcQDQ33yebsJIiBEZ8FAeg7gvzTQRPiqpxulLjXYSEFrprOklPn7PL0R0Fw
 KsOkUrRsEgpXzTA9bCcr5jOLbR7HomdnkHRE5h6LTcnddiyHoViYMMrhreMAVzFY
 UG7DG8K1t8FX89qVEMTvG0mIdUUldTQ+MvYiA9sELQoYT6ZmlZzgeai9vPCfEfP5
 pAgSfJyH3VlqKygqwHLrtyiHEm77nbufdPHy/f4YBXBitmfcD17+gldRtT2mBtXF
 yr5xwPccJnk9SiBs0ihe80zUHaM3N52M1lWJIErjeRc134oaeSU=
 =3Y8m
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://github.com/openrisc/linux

Pull OpenRISC updates from Stafford Horne:
 "A few cleanups all over the place, things of note:

   - Enable the clone3 syscall

   - Remove CONFIG_CROSS_COMPILE from Krzysztof Kozlowski

   - Update to use mmgrab from Julia Lawall"

* tag 'for-linus' of git://github.com/openrisc/linux:
  openrisc: Remove obsolete show_trace_task function
  openrisc: Cleanup copy_thread_tls docs and comments
  openrisc: Enable the clone3 syscall
  openrisc: Convert copy_thread to copy_thread_tls
  openrisc: use mmgrab
  openrisc: configs: Cleanup CONFIG_CROSS_COMPILE
This commit is contained in:
Linus Torvalds 2020-04-07 12:33:37 -07:00
commit d5d247661e
8 changed files with 12 additions and 24 deletions

View File

@ -37,8 +37,8 @@ or Stafford's toolchain build and release scripts.
Build the Linux kernel as usual::
make ARCH=openrisc defconfig
make ARCH=openrisc
make ARCH=openrisc CROSS_COMPILE="or1k-linux-" defconfig
make ARCH=openrisc CROSS_COMPILE="or1k-linux-"
3) Running on FPGA (optional)

View File

@ -16,6 +16,7 @@ config OPENRISC
select HANDLE_DOMAIN_IRQ
select GPIOLIB
select HAVE_ARCH_TRACEHOOK
select HAVE_COPY_THREAD_TLS
select SPARSE_IRQ
select GENERIC_IRQ_CHIP
select GENERIC_IRQ_PROBE

View File

@ -1,4 +1,3 @@
CONFIG_CROSS_COMPILE="or1k-linux-"
CONFIG_NO_HZ=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_BLK_DEV_INITRD=y

View File

@ -1,4 +1,3 @@
CONFIG_CROSS_COMPILE="or1k-linux-"
CONFIG_LOCALVERSION="-simple-smp"
CONFIG_NO_HZ=y
CONFIG_LOG_BUF_SHIFT=14

View File

@ -24,6 +24,7 @@
#define __ARCH_WANT_SET_GET_RLIMIT
#define __ARCH_WANT_SYS_FORK
#define __ARCH_WANT_SYS_CLONE
#define __ARCH_WANT_SYS_CLONE3
#define __ARCH_WANT_TIME32_SYSCALLS
#include <asm-generic/unistd.h>

View File

@ -117,12 +117,12 @@ void release_thread(struct task_struct *dead_task)
extern asmlinkage void ret_from_fork(void);
/*
* copy_thread
* copy_thread_tls
* @clone_flags: flags
* @usp: user stack pointer or fn for kernel thread
* @arg: arg to fn for kernel thread; always NULL for userspace thread
* @p: the newly created task
* @regs: CPU context to copy for userspace thread; always NULL for kthread
* @tls: the Thread Local Storage pointer for the new process
*
* At the top of a newly initialized kernel stack are two stacked pt_reg
* structures. The first (topmost) is the userspace context of the thread.
@ -148,8 +148,8 @@ extern asmlinkage void ret_from_fork(void);
*/
int
copy_thread(unsigned long clone_flags, unsigned long usp,
unsigned long arg, struct task_struct *p)
copy_thread_tls(unsigned long clone_flags, unsigned long usp,
unsigned long arg, struct task_struct *p, unsigned long tls)
{
struct pt_regs *userregs;
struct pt_regs *kregs;
@ -179,16 +179,10 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
userregs->sp = usp;
/*
* For CLONE_SETTLS set "tp" (r10) to the TLS pointer passed to sys_clone.
*
* The kernel entry is:
* int clone (long flags, void *child_stack, int *parent_tid,
* int *child_tid, struct void *tls)
*
* This makes the source r7 in the kernel registers.
* For CLONE_SETTLS set "tp" (r10) to the TLS pointer.
*/
if (clone_flags & CLONE_SETTLS)
userregs->gpr[10] = userregs->gpr[7];
userregs->gpr[10] = tls;
userregs->gpr[11] = 0; /* Result from fork() */

View File

@ -14,6 +14,7 @@
#include <linux/smp.h>
#include <linux/cpu.h>
#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/irq.h>
#include <asm/cpuinfo.h>
#include <asm/mmu_context.h>
@ -113,7 +114,7 @@ asmlinkage __init void secondary_start_kernel(void)
* All kernel threads share the same mm context; grab a
* reference and switch to it.
*/
atomic_inc(&mm->mm_count);
mmgrab(mm);
current->active_mm = mm;
cpumask_set_cpu(cpu, mm_cpumask(mm));

View File

@ -55,13 +55,6 @@ void show_stack(struct task_struct *task, unsigned long *esp)
unwind_stack(NULL, esp, print_trace);
}
void show_trace_task(struct task_struct *tsk)
{
/*
* TODO: SysRq-T trace dump...
*/
}
void show_registers(struct pt_regs *regs)
{
int i;