Commit 3bfd8fca authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'loongarch-fixes-6.1-2' of...

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

Pull LoongArch fixes from Huacai Chen:
 "Fix two build warnings, a copy_thread() bug, two page table
  manipulation bugs, and some trivial cleanups"

* tag 'loongarch-fixes-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
  docs/zh_CN/LoongArch: Fix wrong description of FPRs Note
  LoongArch: Fix unsigned comparison with less than zero
  LoongArch: Set _PAGE_DIRTY only if _PAGE_MODIFIED is set in {pmd,pte}_mkwrite()
  LoongArch: Set _PAGE_DIRTY only if _PAGE_WRITE is set in {pmd,pte}_mkdirty()
  LoongArch: Clear FPU/SIMD thread info flags for kernel thread
  LoongArch: SMP: Change prefix from loongson3 to loongson
  LoongArch: Combine acpi_boot_table_init() and acpi_boot_init()
  LoongArch: Makefile: Use "grep -E" instead of "egrep"
parents 6fd2152f fa0e3812
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -70,8 +70,8 @@ LA64中每个寄存器为64位宽。 ``$r0`` 的内容总是固定为0,而其
================= ================== =================== ==========

.. note::
    注意:在一些遗留代码中有时可能见到 ``$v0`` 和 ``$v1`` ,它们是
    ``$a0`` 和 ``$a1`` 的别名,属于已经废弃的用法。
    注意:在一些遗留代码中有时可能见到 ``$fv0`` 和 ``$fv1`` ,它们是
    ``$fa0`` 和 ``$fa1`` 的别名,属于已经废弃的用法。


向量寄存器
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ KBUILD_LDFLAGS += -m $(ld-emul)

ifdef CONFIG_LOONGARCH
CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
	egrep -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
	grep -E -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
	sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
endif

+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ extern struct fwnode_handle *liointc_handle;
extern struct fwnode_handle *pch_lpc_handle;
extern struct fwnode_handle *pch_pic_handle[MAX_IO_PICS];

extern irqreturn_t loongson3_ipi_interrupt(int irq, void *dev);
extern irqreturn_t loongson_ipi_interrupt(int irq, void *dev);

#include <asm-generic/irq.h>

+12 −4
Original line number Diff line number Diff line
@@ -349,13 +349,17 @@ static inline pte_t pte_mkclean(pte_t pte)

static inline pte_t pte_mkdirty(pte_t pte)
{
	pte_val(pte) |= (_PAGE_DIRTY | _PAGE_MODIFIED);
	pte_val(pte) |= _PAGE_MODIFIED;
	if (pte_val(pte) & _PAGE_WRITE)
		pte_val(pte) |= _PAGE_DIRTY;
	return pte;
}

static inline pte_t pte_mkwrite(pte_t pte)
{
	pte_val(pte) |= (_PAGE_WRITE | _PAGE_DIRTY);
	pte_val(pte) |= _PAGE_WRITE;
	if (pte_val(pte) & _PAGE_MODIFIED)
		pte_val(pte) |= _PAGE_DIRTY;
	return pte;
}

@@ -455,7 +459,9 @@ static inline int pmd_write(pmd_t pmd)

static inline pmd_t pmd_mkwrite(pmd_t pmd)
{
	pmd_val(pmd) |= (_PAGE_WRITE | _PAGE_DIRTY);
	pmd_val(pmd) |= _PAGE_WRITE;
	if (pmd_val(pmd) & _PAGE_MODIFIED)
		pmd_val(pmd) |= _PAGE_DIRTY;
	return pmd;
}

@@ -478,7 +484,9 @@ static inline pmd_t pmd_mkclean(pmd_t pmd)

static inline pmd_t pmd_mkdirty(pmd_t pmd)
{
	pmd_val(pmd) |= (_PAGE_DIRTY | _PAGE_MODIFIED);
	pmd_val(pmd) |= _PAGE_MODIFIED;
	if (pmd_val(pmd) & _PAGE_WRITE)
		pmd_val(pmd) |= _PAGE_DIRTY;
	return pmd;
}

+15 −15
Original line number Diff line number Diff line
@@ -19,21 +19,21 @@ 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);
void loongson3_init_secondary(void);
void loongson3_smp_finish(void);
void loongson3_send_ipi_single(int cpu, unsigned int action);
void loongson3_send_ipi_mask(const struct cpumask *mask, unsigned int action);
void loongson_smp_setup(void);
void loongson_prepare_cpus(unsigned int max_cpus);
void loongson_boot_secondary(int cpu, struct task_struct *idle);
void loongson_init_secondary(void);
void loongson_smp_finish(void);
void loongson_send_ipi_single(int cpu, unsigned int action);
void loongson_send_ipi_mask(const struct cpumask *mask, unsigned int action);
#ifdef CONFIG_HOTPLUG_CPU
int loongson3_cpu_disable(void);
void loongson3_cpu_die(unsigned int cpu);
int loongson_cpu_disable(void);
void loongson_cpu_die(unsigned int cpu);
#endif

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

static inline int raw_smp_processor_id(void)
@@ -85,28 +85,28 @@ extern void show_ipi_list(struct seq_file *p, int prec);
 */
static inline void smp_send_reschedule(int cpu)
{
	loongson3_send_ipi_single(cpu, SMP_RESCHEDULE);
	loongson_send_ipi_single(cpu, SMP_RESCHEDULE);
}

static inline void arch_send_call_function_single_ipi(int cpu)
{
	loongson3_send_ipi_single(cpu, SMP_CALL_FUNCTION);
	loongson_send_ipi_single(cpu, SMP_CALL_FUNCTION);
}

static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
{
	loongson3_send_ipi_mask(mask, SMP_CALL_FUNCTION);
	loongson_send_ipi_mask(mask, SMP_CALL_FUNCTION);
}

#ifdef CONFIG_HOTPLUG_CPU
static inline int __cpu_disable(void)
{
	return loongson3_cpu_disable();
	return loongson_cpu_disable();
}

static inline void __cpu_die(unsigned int cpu)
{
	loongson3_cpu_die(cpu);
	loongson_cpu_die(cpu);
}

extern void play_dead(void);
Loading