Commit 0678afa6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'loongarch-fixes-5.19-1' of...

Merge tag 'loongarch-fixes-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson

Pull LoongArch fixes from Huacai Chen.
 "Fix build errors and a stale comment"

* tag 'loongarch-fixes-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
  LoongArch: Remove MIPS comment about cycle counter
  LoongArch: Fix copy_thread() build errors
  LoongArch: Fix the !CONFIG_SMP build
parents 1c27f1fc 5c95fe8b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -343,6 +343,7 @@ config NR_CPUS

config NUMA
	bool "NUMA Support"
	select SMP
	select ACPI_NUMA if ACPI
	help
	  Say Y to compile the kernel with NUMA (Non-Uniform Memory Access)
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ typedef struct {
	unsigned int __softirq_pending;
} ____cacheline_aligned irq_cpustat_t;

DECLARE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat);
DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);

#define __ARCH_IRQ_STAT

+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
#define __ASM_PERCPU_H

#include <asm/cmpxchg.h>
#include <asm/loongarch.h>

/* Use r21 for fast access */
register unsigned long __my_cpu_offset __asm__("$r21");
+7 −16
Original line number Diff line number Diff line
@@ -9,10 +9,16 @@
#include <linux/atomic.h>
#include <linux/bitops.h>
#include <linux/linkage.h>
#include <linux/smp.h>
#include <linux/threads.h>
#include <linux/cpumask.h>

extern int smp_num_siblings;
extern int num_processors;
extern int disabled_cpus;
extern cpumask_t cpu_sibling_map[];
extern cpumask_t cpu_core_map[];
extern cpumask_t cpu_foreign_map[];

void loongson3_smp_setup(void);
void loongson3_prepare_cpus(unsigned int max_cpus);
void loongson3_boot_secondary(int cpu, struct task_struct *idle);
@@ -25,26 +31,11 @@ int loongson3_cpu_disable(void);
void loongson3_cpu_die(unsigned int cpu);
#endif

#ifdef CONFIG_SMP

static inline void plat_smp_setup(void)
{
	loongson3_smp_setup();
}

#else /* !CONFIG_SMP */

static inline void plat_smp_setup(void) { }

#endif /* !CONFIG_SMP */

extern int smp_num_siblings;
extern int num_processors;
extern int disabled_cpus;
extern cpumask_t cpu_sibling_map[];
extern cpumask_t cpu_core_map[];
extern cpumask_t cpu_foreign_map[];

static inline int raw_smp_processor_id(void)
{
#if defined(__VDSO__)
+0 −7
Original line number Diff line number Diff line
@@ -12,13 +12,6 @@
#include <asm/cpu.h>
#include <asm/cpu-features.h>

/*
 * Standard way to access the cycle counter.
 * Currently only used on SMP for scheduling.
 *
 * We know that all SMP capable CPUs have cycle counters.
 */

typedef unsigned long cycles_t;

#define get_cycles get_cycles
Loading