Skip to content

Commit a37eea9

Browse files
committed
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
2 parents 6d61a53 + 2cec2c4 commit a37eea9

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

arch/sparc/kernel/irq_32.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,18 +199,18 @@ int arch_show_interrupts(struct seq_file *p, int prec)
199199
int j;
200200

201201
#ifdef CONFIG_SMP
202-
seq_printf(p, "RES: ");
202+
seq_printf(p, "RES:");
203203
for_each_online_cpu(j)
204-
seq_printf(p, "%10u ", cpu_data(j).irq_resched_count);
204+
seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_resched_count, 10);
205205
seq_printf(p, " IPI rescheduling interrupts\n");
206-
seq_printf(p, "CAL: ");
206+
seq_printf(p, "CAL:");
207207
for_each_online_cpu(j)
208-
seq_printf(p, "%10u ", cpu_data(j).irq_call_count);
208+
seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_call_count, 10);
209209
seq_printf(p, " IPI function call interrupts\n");
210210
#endif
211-
seq_printf(p, "NMI: ");
211+
seq_printf(p, "NMI:");
212212
for_each_online_cpu(j)
213-
seq_printf(p, "%10u ", cpu_data(j).counter);
213+
seq_put_decimal_ull_width(p, " ", cpu_data(j).counter, 10);
214214
seq_printf(p, " Non-maskable interrupts\n");
215215
return 0;
216216
}

arch/sparc/kernel/irq_64.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/seq_file.h>
2323
#include <linux/ftrace.h>
2424
#include <linux/irq.h>
25+
#include <linux/string_choices.h>
2526

2627
#include <asm/ptrace.h>
2728
#include <asm/processor.h>
@@ -145,9 +146,7 @@ static int hv_irq_version;
145146
*/
146147
static bool sun4v_cookie_only_virqs(void)
147148
{
148-
if (hv_irq_version >= 3)
149-
return true;
150-
return false;
149+
return hv_irq_version >= 3;
151150
}
152151

153152
static void __init irq_init_hv(void)
@@ -170,7 +169,7 @@ static void __init irq_init_hv(void)
170169

171170
pr_info("SUN4V: Using IRQ API major %d, cookie only virqs %s\n",
172171
hv_irq_version,
173-
sun4v_cookie_only_virqs() ? "enabled" : "disabled");
172+
str_enabled_disabled(sun4v_cookie_only_virqs()));
174173
}
175174

176175
/* This function is for the timer interrupt.*/
@@ -304,9 +303,9 @@ int arch_show_interrupts(struct seq_file *p, int prec)
304303
{
305304
int j;
306305

307-
seq_printf(p, "NMI: ");
306+
seq_printf(p, "NMI:");
308307
for_each_online_cpu(j)
309-
seq_printf(p, "%10u ", cpu_data(j).__nmi_count);
308+
seq_put_decimal_ull_width(p, " ", cpu_data(j).__nmi_count, 10);
310309
seq_printf(p, " Non-maskable interrupts\n");
311310
return 0;
312311
}

arch/sparc/kernel/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus)
932932
{
933933
const struct pci_slot_names {
934934
u32 slot_mask;
935-
char names[0];
935+
char names[];
936936
} *prop;
937937
const char *sp;
938938
int len, i;

0 commit comments

Comments
 (0)