Skip to content

Commit bca2a25

Browse files
committed
Merge tag 'sparc-for-6.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc
Pull sparc updates from Andreas Larsson: - Avoid on-stack cpumask variables in a number of places - Move struct termio to asm/termios.h, matching other architectures and allowing certain user space applications to build also for sparc - Fix missing prototype warnings for sparc64 - Fix version generation warnings for sparc32 - Fix bug where non-consecutive CPU IDs lead to some CPUs not starting - Simplification using swap and cleanup using NULL for pointer - Convert sparc parport and chmc drivers to use remove callbacks returning void * tag 'sparc-for-6.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc: sparc/leon: Remove on-stack cpumask var sparc/pci_msi: Remove on-stack cpumask var sparc/of: Remove on-stack cpumask var sparc/irq: Remove on-stack cpumask var sparc/srmmu: Remove on-stack cpumask var sparc: chmc: Convert to platform remove callback returning void sparc: parport: Convert to platform remove callback returning void sparc: Compare pointers to NULL instead of 0 sparc: Use swap() to fix Coccinelle warning sparc32: Fix version generation failed warnings sparc64: Fix number of online CPUs sparc64: Fix prototype warning for sched_clock sparc64: Fix prototype warnings in adi_64.c sparc64: Fix prototype warning for dma_4v_iotsb_bind sparc64: Fix prototype warning for uprobe_trap sparc64: Fix prototype warning for alloc_irqstack_bootmem sparc64: Fix prototype warning for vmemmap_free sparc64: Fix prototype warnings in traps_64.c sparc64: Fix prototype warning for init_vdso_image sparc: move struct termio to asm/termios.h
2 parents 2b7ced1 + 1c9e709 commit bca2a25

24 files changed

+76
-114
lines changed

arch/sparc/include/asm/asm-prototypes.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
* Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
44
*/
55

6-
#include <asm/xor.h>
7-
#include <asm/checksum.h>
8-
#include <asm/trap_block.h>
6+
#include <linux/atomic.h>
97
#include <linux/uaccess.h>
8+
109
#include <asm/atomic.h>
11-
#include <asm/ftrace.h>
1210
#include <asm/cacheflush.h>
11+
#include <asm/checksum.h>
12+
#include <asm/delay.h>
13+
#include <asm/ftrace.h>
1314
#include <asm/oplib.h>
14-
#include <linux/atomic.h>
15+
#include <asm/pgtable.h>
16+
#include <asm/trap_block.h>
17+
#include <asm/xor.h>
1518

1619
void *__memscan_zero(void *, size_t);
1720
void *__memscan_generic(void *, int, size_t);
@@ -23,3 +26,7 @@ void *memcpy(void *dest, const void *src, size_t n);
2326
void *memset(void *s, int c, size_t n);
2427
typedef int TItype __attribute__((mode(TI)));
2528
TItype __multi3(TItype a, TItype b);
29+
30+
s64 __ashldi3(s64, int);
31+
s64 __lshrdi3(s64, int);
32+
s64 __ashrdi3(s64, int);

arch/sparc/include/asm/floppy_64.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,9 +704,7 @@ static unsigned long __init sun_floppy_init(void)
704704
ns87303_modify(config, ASC, ASC_DRV2_SEL, 0);
705705
ns87303_modify(config, FCR, 0, FCR_LDE);
706706

707-
config = sun_floppy_types[0];
708-
sun_floppy_types[0] = sun_floppy_types[1];
709-
sun_floppy_types[1] = config;
707+
swap(sun_floppy_types[0], sun_floppy_types[1]);
710708

711709
if (sun_pci_broken_drive != -1) {
712710
sun_pci_broken_drive = 1 - sun_pci_broken_drive;

arch/sparc/include/asm/parport_64.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static int ecpp_probe(struct platform_device *op)
196196
return err;
197197
}
198198

199-
static int ecpp_remove(struct platform_device *op)
199+
static void ecpp_remove(struct platform_device *op)
200200
{
201201
struct parport *p = dev_get_drvdata(&op->dev);
202202
int slot = p->dma;
@@ -216,8 +216,6 @@ static int ecpp_remove(struct platform_device *op)
216216
d_len);
217217
clear_bit(slot, dma_slot_map);
218218
}
219-
220-
return 0;
221219
}
222220

223221
static const struct of_device_id ecpp_match[] = {
@@ -245,7 +243,7 @@ static struct platform_driver ecpp_driver = {
245243
.of_match_table = ecpp_match,
246244
},
247245
.probe = ecpp_probe,
248-
.remove = ecpp_remove,
246+
.remove_new = ecpp_remove,
249247
};
250248

251249
static int parport_pc_find_nonpci_ports(int autoirq, int autodma)

arch/sparc/include/asm/smp_64.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask);
4747
int hard_smp_processor_id(void);
4848
#define raw_smp_processor_id() (current_thread_info()->cpu)
4949

50-
void smp_fill_in_cpu_possible_map(void);
5150
void smp_fill_in_sib_core_maps(void);
5251
void __noreturn cpu_play_dead(void);
5352

@@ -77,7 +76,6 @@ void __cpu_die(unsigned int cpu);
7776
#define smp_fill_in_sib_core_maps() do { } while (0)
7877
#define smp_fetch_global_regs() do { } while (0)
7978
#define smp_fetch_global_pmu() do { } while (0)
80-
#define smp_fill_in_cpu_possible_map() do { } while (0)
8179
#define smp_init_cpu_poke() do { } while (0)
8280
#define scheduler_poke() do { } while (0)
8381

arch/sparc/include/uapi/asm/termbits.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ typedef unsigned int tcflag_t;
1010
typedef unsigned long tcflag_t;
1111
#endif
1212

13-
#define NCC 8
14-
struct termio {
15-
unsigned short c_iflag; /* input mode flags */
16-
unsigned short c_oflag; /* output mode flags */
17-
unsigned short c_cflag; /* control mode flags */
18-
unsigned short c_lflag; /* local mode flags */
19-
unsigned char c_line; /* line discipline */
20-
unsigned char c_cc[NCC]; /* control characters */
21-
};
22-
2313
#define NCCS 17
2414
struct termios {
2515
tcflag_t c_iflag; /* input mode flags */

arch/sparc/include/uapi/asm/termios.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,14 @@ struct winsize {
4040
unsigned short ws_ypixel;
4141
};
4242

43+
#define NCC 8
44+
struct termio {
45+
unsigned short c_iflag; /* input mode flags */
46+
unsigned short c_oflag; /* output mode flags */
47+
unsigned short c_cflag; /* control mode flags */
48+
unsigned short c_lflag; /* local mode flags */
49+
unsigned char c_line; /* line discipline */
50+
unsigned char c_cc[NCC]; /* control characters */
51+
};
4352

4453
#endif /* _UAPI_SPARC_TERMIOS_H */

arch/sparc/kernel/adi_64.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ void __init mdesc_adi_init(void)
121121
mdesc_release(hp);
122122
}
123123

124-
tag_storage_desc_t *find_tag_store(struct mm_struct *mm,
125-
struct vm_area_struct *vma,
126-
unsigned long addr)
124+
static tag_storage_desc_t *find_tag_store(struct mm_struct *mm,
125+
struct vm_area_struct *vma,
126+
unsigned long addr)
127127
{
128128
tag_storage_desc_t *tag_desc = NULL;
129129
unsigned long i, max_desc, flags;
@@ -153,9 +153,9 @@ tag_storage_desc_t *find_tag_store(struct mm_struct *mm,
153153
return tag_desc;
154154
}
155155

156-
tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm,
157-
struct vm_area_struct *vma,
158-
unsigned long addr)
156+
static tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm,
157+
struct vm_area_struct *vma,
158+
unsigned long addr)
159159
{
160160
unsigned char *tags;
161161
unsigned long i, size, max_desc, flags;
@@ -296,7 +296,7 @@ tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm,
296296
return tag_desc;
297297
}
298298

299-
void del_tag_store(tag_storage_desc_t *tag_desc, struct mm_struct *mm)
299+
static void del_tag_store(tag_storage_desc_t *tag_desc, struct mm_struct *mm)
300300
{
301301
unsigned long flags;
302302
unsigned char *tags = NULL;

arch/sparc/kernel/chmc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ static void jbusmc_destroy(struct platform_device *op, struct jbusmc *p)
788788
kfree(p);
789789
}
790790

791-
static int us3mc_remove(struct platform_device *op)
791+
static void us3mc_remove(struct platform_device *op)
792792
{
793793
void *p = dev_get_drvdata(&op->dev);
794794

@@ -798,7 +798,6 @@ static int us3mc_remove(struct platform_device *op)
798798
else if (mc_type == MC_TYPE_JBUS)
799799
jbusmc_destroy(op, p);
800800
}
801-
return 0;
802801
}
803802

804803
static const struct of_device_id us3mc_match[] = {
@@ -815,7 +814,7 @@ static struct platform_driver us3mc_driver = {
815814
.of_match_table = us3mc_match,
816815
},
817816
.probe = us3mc_probe,
818-
.remove = us3mc_remove,
817+
.remove_new = us3mc_remove,
819818
};
820819

821820
static inline bool us3mc_platform(void)

arch/sparc/kernel/irq_64.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,17 +349,13 @@ static unsigned int sun4u_compute_tid(unsigned long imap, unsigned long cpuid)
349349
#ifdef CONFIG_SMP
350350
static int irq_choose_cpu(unsigned int irq, const struct cpumask *affinity)
351351
{
352-
cpumask_t mask;
353352
int cpuid;
354353

355-
cpumask_copy(&mask, affinity);
356-
if (cpumask_equal(&mask, cpu_online_mask)) {
354+
if (cpumask_equal(affinity, cpu_online_mask)) {
357355
cpuid = map_to_cpu(irq);
358356
} else {
359-
cpumask_t tmp;
360-
361-
cpumask_and(&tmp, cpu_online_mask, &mask);
362-
cpuid = cpumask_empty(&tmp) ? map_to_cpu(irq) : cpumask_first(&tmp);
357+
cpuid = cpumask_first_and(affinity, cpu_online_mask);
358+
cpuid = cpuid < nr_cpu_ids ? cpuid : map_to_cpu(irq);
363359
}
364360

365361
return cpuid;

arch/sparc/kernel/kernel.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ int handle_popc(u32 insn, struct pt_regs *regs);
4040
void handle_lddfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr);
4141
void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr);
4242

43+
/* uprobes.c */
44+
asmlinkage void uprobe_trap(struct pt_regs *regs,
45+
unsigned long trap_level);
46+
4347
/* smp_64.c */
4448
void __irq_entry smp_call_function_client(int irq, struct pt_regs *regs);
4549
void __irq_entry smp_call_function_single_client(int irq, struct pt_regs *regs);

0 commit comments

Comments
 (0)