This includes the following changes related to sparc for v6.14:

- Improve performance for reading /proc/interrupts
 
 - Simplify irq code for sun4v
 
 - Replace zero-length array with flexible array in struct for pci for sparc64
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQQfqfbgobF48oKMeq81AykqDLayywUCZ5iBmRQcYW5kcmVhc0Bn
 YWlzbGVyLmNvbQAKCRA1AykqDLayy57PAP9VNWtuAC1f1rW/wm0Is50jzdNWtUj2
 L5/llSPJRs2m6gEAp3h2g8dyG2J6ls75kjGWfAKL/po+/f2Kcl+e5VuDjw0=
 =8T7X
 -----END PGP SIGNATURE-----

Merge tag 'sparc-for-6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc

Pull sparc updates from Andreas Larsson:

 - Improve performance for reading /proc/interrupts

 - Simplify irq code for sun4v

 - Replace zero-length array with flexible array in struct for pci for
   sparc64

* tag 'sparc-for-6.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc:
  sparc/irq: Remove unneeded if check in sun4v_cookie_only_virqs()
  sparc/irq: Use str_enabled_disabled() helper function
  sparc: replace zero-length array with flexible-array member
  sparc/irq: use seq_put_decimal_ull_width() for decimal values
This commit is contained in:
Linus Torvalds 2025-01-28 08:38:30 -08:00
commit a37eea94f7
3 changed files with 12 additions and 13 deletions

View File

@ -199,18 +199,18 @@ int arch_show_interrupts(struct seq_file *p, int prec)
int j;
#ifdef CONFIG_SMP
seq_printf(p, "RES: ");
seq_printf(p, "RES:");
for_each_online_cpu(j)
seq_printf(p, "%10u ", cpu_data(j).irq_resched_count);
seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_resched_count, 10);
seq_printf(p, " IPI rescheduling interrupts\n");
seq_printf(p, "CAL: ");
seq_printf(p, "CAL:");
for_each_online_cpu(j)
seq_printf(p, "%10u ", cpu_data(j).irq_call_count);
seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_call_count, 10);
seq_printf(p, " IPI function call interrupts\n");
#endif
seq_printf(p, "NMI: ");
seq_printf(p, "NMI:");
for_each_online_cpu(j)
seq_printf(p, "%10u ", cpu_data(j).counter);
seq_put_decimal_ull_width(p, " ", cpu_data(j).counter, 10);
seq_printf(p, " Non-maskable interrupts\n");
return 0;
}

View File

@ -22,6 +22,7 @@
#include <linux/seq_file.h>
#include <linux/ftrace.h>
#include <linux/irq.h>
#include <linux/string_choices.h>
#include <asm/ptrace.h>
#include <asm/processor.h>
@ -145,9 +146,7 @@ static int hv_irq_version;
*/
static bool sun4v_cookie_only_virqs(void)
{
if (hv_irq_version >= 3)
return true;
return false;
return hv_irq_version >= 3;
}
static void __init irq_init_hv(void)
@ -170,7 +169,7 @@ static void __init irq_init_hv(void)
pr_info("SUN4V: Using IRQ API major %d, cookie only virqs %s\n",
hv_irq_version,
sun4v_cookie_only_virqs() ? "enabled" : "disabled");
str_enabled_disabled(sun4v_cookie_only_virqs()));
}
/* This function is for the timer interrupt.*/
@ -304,9 +303,9 @@ int arch_show_interrupts(struct seq_file *p, int prec)
{
int j;
seq_printf(p, "NMI: ");
seq_printf(p, "NMI:");
for_each_online_cpu(j)
seq_printf(p, "%10u ", cpu_data(j).__nmi_count);
seq_put_decimal_ull_width(p, " ", cpu_data(j).__nmi_count, 10);
seq_printf(p, " Non-maskable interrupts\n");
return 0;
}

View File

@ -932,7 +932,7 @@ static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus)
{
const struct pci_slot_names {
u32 slot_mask;
char names[0];
char names[];
} *prop;
const char *sp;
int len, i;