Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'mips_6.11_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS updates from Thomas Bogendoerfer:

- Use improved timer sync for Loongson64

- Fix address of GCR_ACCESS register

- Add missing MODULE_DESCRIPTION

* tag 'mips_6.11_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
mips: sibyte: add missing MODULE_DESCRIPTION() macro
MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later
MIPS: Loongson64: Switch to SYNC_R4K

+12 -35
+1
arch/mips/Kconfig
··· 478 478 select BOARD_SCACHE 479 479 select CSRC_R4K 480 480 select CEVT_R4K 481 + select SYNC_R4K 481 482 select FORCE_PCI 482 483 select ISA 483 484 select I8259
+4
arch/mips/include/asm/mips-cm.h
··· 240 240 GCR_ACCESSOR_RO(32, 0x0f0, cpc_status) 241 241 #define CM_GCR_CPC_STATUS_EX BIT(0) 242 242 243 + /* GCR_ACCESS - Controls core/IOCU access to GCRs */ 244 + GCR_ACCESSOR_RW(32, 0x120, access_cm3) 245 + #define CM_GCR_ACCESS_ACCESSEN GENMASK(7, 0) 246 + 243 247 /* GCR_L2_CONFIG - Indicates L2 cache configuration when Config5.L2C=1 */ 244 248 GCR_ACCESSOR_RW(32, 0x130, l2_config) 245 249 #define CM_GCR_L2_CONFIG_BYPASS BIT(20)
-1
arch/mips/include/asm/smp.h
··· 50 50 #define SMP_CALL_FUNCTION 0x2 51 51 /* Octeon - Tell another core to flush its icache */ 52 52 #define SMP_ICACHE_FLUSH 0x4 53 - #define SMP_ASK_C0COUNT 0x8 54 53 55 54 /* Mask of CPUs which are currently definitely operating coherently */ 56 55 extern cpumask_t cpu_coherent_mask;
+4 -1
arch/mips/kernel/smp-cps.c
··· 317 317 write_gcr_co_reset_ext_base(CM_GCR_Cx_RESET_EXT_BASE_UEB); 318 318 319 319 /* Ensure the core can access the GCRs */ 320 - set_gcr_access(1 << core); 320 + if (mips_cm_revision() < CM_REV_CM3) 321 + set_gcr_access(1 << core); 322 + else 323 + set_gcr_access_cm3(1 << core); 321 324 322 325 if (mips_cpc_present()) { 323 326 /* Reset the core */
+2 -33
arch/mips/loongson64/smp.c
··· 33 33 static void __iomem *ipi_status0_regs[16]; 34 34 static void __iomem *ipi_en0_regs[16]; 35 35 static void __iomem *ipi_mailbox_buf[16]; 36 - static uint32_t core0_c0count[NR_CPUS]; 37 36 38 37 static u32 (*ipi_read_clear)(int cpu); 39 38 static void (*ipi_write_action)(int cpu, u32 action); ··· 381 382 ipi_write_action(cpu_logical_map(i), (u32)action); 382 383 } 383 384 384 - 385 385 static irqreturn_t loongson3_ipi_interrupt(int irq, void *dev_id) 386 386 { 387 - int i, cpu = smp_processor_id(); 388 - unsigned int action, c0count; 387 + int cpu = smp_processor_id(); 388 + unsigned int action; 389 389 390 390 action = ipi_read_clear(cpu); 391 391 ··· 397 399 irq_exit(); 398 400 } 399 401 400 - if (action & SMP_ASK_C0COUNT) { 401 - BUG_ON(cpu != 0); 402 - c0count = read_c0_count(); 403 - c0count = c0count ? c0count : 1; 404 - for (i = 1; i < nr_cpu_ids; i++) 405 - core0_c0count[i] = c0count; 406 - nudge_writes(); /* Let others see the result ASAP */ 407 - } 408 - 409 402 return IRQ_HANDLED; 410 403 } 411 404 412 - #define MAX_LOOPS 800 413 405 /* 414 406 * SMP init and finish on secondary CPUs 415 407 */ 416 408 static void loongson3_init_secondary(void) 417 409 { 418 - int i; 419 - uint32_t initcount; 420 410 unsigned int cpu = smp_processor_id(); 421 411 unsigned int imask = STATUSF_IP7 | STATUSF_IP6 | 422 412 STATUSF_IP3 | STATUSF_IP2; ··· 418 432 cpu_logical_map(cpu) % loongson_sysconf.cores_per_package); 419 433 cpu_data[cpu].package = 420 434 cpu_logical_map(cpu) / loongson_sysconf.cores_per_package; 421 - 422 - i = 0; 423 - core0_c0count[cpu] = 0; 424 - loongson3_send_ipi_single(0, SMP_ASK_C0COUNT); 425 - while (!core0_c0count[cpu]) { 426 - i++; 427 - cpu_relax(); 428 - } 429 - 430 - if (i > MAX_LOOPS) 431 - i = MAX_LOOPS; 432 - if (cpu_data[cpu].package) 433 - initcount = core0_c0count[cpu] + i; 434 - else /* Local access is faster for loops */ 435 - initcount = core0_c0count[cpu] + i/2; 436 - 437 - write_c0_count(initcount); 438 435 } 439 436 440 437 static void loongson3_smp_finish(void)
+1
arch/mips/sibyte/common/sb_tbprof.c
··· 589 589 590 590 MODULE_ALIAS_CHARDEV_MAJOR(SBPROF_TB_MAJOR); 591 591 MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>"); 592 + MODULE_DESCRIPTION("Support for ZBbus profiling"); 592 593 MODULE_LICENSE("GPL");