Skip to content

Commit feb0eee

Browse files
committed
Merge tag 'parisc-for-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc architecture fixes from Helge Deller: "A bugfix in the LWS code, which used different lock words than the parisc lightweight spinlock checks. This inconsistency triggered false positives when the lightweight spinlock checks checked the locks of mutexes. The other patches are trivial cleanups and most of them fix sparse warnings. Summary: - Fix LWS code to use same lock words as for the parisc lightweight spinlocks - Use PTR_ERR_OR_ZERO() in pdt init code - Fix lots of sparse warnings" * tag 'parisc-for-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: perf: Make cpu_device variable static parisc: ftrace: Add declaration for ftrace_function_trampoline() parisc: boot: Nuke some sparse warnings in decompressor parisc: processor: Include asm/smp.h for init_per_cpu() parisc: unaligned: Include linux/sysctl.h for unaligned_enabled parisc: Move proc_mckinley_root and proc_runway_root to sba_iommu parisc: dma: Add prototype for pcxl_dma_start parisc: parisc_ksyms: Include libgcc.h for libgcc prototypes parisc: ucmpdi2: Fix no previous prototype for '__ucmpdi2' warning parisc: firmware: Mark pdc_result buffers local parisc: firmware: Fix sparse context imbalance warnings parisc: signal: Fix sparse incorrect type in assignment warning parisc: ioremap: Fix sparse warnings parisc: fault: Use C99 arrary initializers parisc: pdt: Use PTR_ERR_OR_ZERO() to simplify code parisc: Fix lightweight spinlock checks to not break futexes
2 parents 2a5482c + d863066 commit feb0eee

File tree

22 files changed

+88
-112
lines changed

22 files changed

+88
-112
lines changed

arch/parisc/Kconfig.debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
config LIGHTWEIGHT_SPINLOCK_CHECK
44
bool "Enable lightweight spinlock checks"
5-
depends on SMP && !DEBUG_SPINLOCK
5+
depends on DEBUG_KERNEL && SMP && !DEBUG_SPINLOCK
66
default y
77
help
88
Add checks with low performance impact to the spinlock functions

arch/parisc/boot/compressed/misc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ char *strchr(const char *s, int c)
117117
return NULL;
118118
}
119119

120-
int puts(const char *s)
120+
static int puts(const char *s)
121121
{
122122
const char *nuline = s;
123123

@@ -172,7 +172,7 @@ static int print_num(unsigned long num, int base)
172172
return 0;
173173
}
174174

175-
int printf(const char *fmt, ...)
175+
static int printf(const char *fmt, ...)
176176
{
177177
va_list args;
178178
int i = 0;
@@ -204,13 +204,13 @@ void abort(void)
204204
}
205205

206206
#undef malloc
207-
void *malloc(size_t size)
207+
static void *malloc(size_t size)
208208
{
209209
return malloc_gzip(size);
210210
}
211211

212212
#undef free
213-
void free(void *ptr)
213+
static void free(void *ptr)
214214
{
215215
return free_gzip(ptr);
216216
}
@@ -278,7 +278,7 @@ static void parse_elf(void *output)
278278
free(phdrs);
279279
}
280280

281-
unsigned long decompress_kernel(unsigned int started_wide,
281+
asmlinkage unsigned long __visible decompress_kernel(unsigned int started_wide,
282282
unsigned int command_line,
283283
const unsigned int rd_start,
284284
const unsigned int rd_end)

arch/parisc/include/asm/dma.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#define dma_outb outb
1515
#define dma_inb inb
1616

17+
extern unsigned long pcxl_dma_start;
18+
1719
/*
1820
** DMA_CHUNK_SIZE is used by the SCSI mid-layer to break up
1921
** (or rather not merge) DMAs into manageable chunks.

arch/parisc/include/asm/ftrace.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ extern void mcount(void);
1212
extern unsigned long sys_call_table[];
1313

1414
extern unsigned long return_address(unsigned int);
15+
struct ftrace_regs;
16+
extern void ftrace_function_trampoline(unsigned long parent,
17+
unsigned long self_addr, unsigned long org_sp_gr3,
18+
struct ftrace_regs *fregs);
1519

1620
#ifdef CONFIG_DYNAMIC_FTRACE
1721
extern void ftrace_caller(void);

arch/parisc/include/asm/spinlock.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#include <asm/processor.h>
88
#include <asm/spinlock_types.h>
99

10-
#define SPINLOCK_BREAK_INSN 0x0000c006 /* break 6,6 */
11-
1210
static inline void arch_spin_val_check(int lock_val)
1311
{
1412
if (IS_ENABLED(CONFIG_LIGHTWEIGHT_SPINLOCK_CHECK))

arch/parisc/include/asm/spinlock_types.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
#define __ARCH_SPIN_LOCK_UNLOCKED_VAL 0x1a46
66

7+
#define SPINLOCK_BREAK_INSN 0x0000c006 /* break 6,6 */
8+
9+
#ifndef __ASSEMBLY__
10+
711
typedef struct {
812
#ifdef CONFIG_PA20
913
volatile unsigned int slock;
@@ -27,6 +31,8 @@ typedef struct {
2731
volatile unsigned int counter;
2832
} arch_rwlock_t;
2933

34+
#endif /* __ASSEMBLY__ */
35+
3036
#define __ARCH_RW_LOCK_UNLOCKED__ 0x01000000
3137
#define __ARCH_RW_LOCK_UNLOCKED { .lock_mutex = __ARCH_SPIN_LOCK_UNLOCKED, \
3238
.counter = __ARCH_RW_LOCK_UNLOCKED__ }

arch/parisc/kernel/firmware.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
static DEFINE_SPINLOCK(pdc_lock);
7575
#endif
7676

77-
unsigned long pdc_result[NUM_PDC_RESULT] __aligned(8);
78-
unsigned long pdc_result2[NUM_PDC_RESULT] __aligned(8);
77+
static unsigned long pdc_result[NUM_PDC_RESULT] __aligned(8);
78+
static unsigned long pdc_result2[NUM_PDC_RESULT] __aligned(8);
7979

8080
#ifdef CONFIG_64BIT
8181
#define WIDE_FIRMWARE 0x1
@@ -334,15 +334,15 @@ int __pdc_cpu_rendezvous(void)
334334
/**
335335
* pdc_cpu_rendezvous_lock - Lock PDC while transitioning to rendezvous state
336336
*/
337-
void pdc_cpu_rendezvous_lock(void)
337+
void pdc_cpu_rendezvous_lock(void) __acquires(&pdc_lock)
338338
{
339339
spin_lock(&pdc_lock);
340340
}
341341

342342
/**
343343
* pdc_cpu_rendezvous_unlock - Unlock PDC after reaching rendezvous state
344344
*/
345-
void pdc_cpu_rendezvous_unlock(void)
345+
void pdc_cpu_rendezvous_unlock(void) __releases(&pdc_lock)
346346
{
347347
spin_unlock(&pdc_lock);
348348
}

arch/parisc/kernel/ftrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static void __hot prepare_ftrace_return(unsigned long *parent,
5353

5454
static ftrace_func_t ftrace_func;
5555

56-
void notrace __hot ftrace_function_trampoline(unsigned long parent,
56+
asmlinkage void notrace __hot ftrace_function_trampoline(unsigned long parent,
5757
unsigned long self_addr,
5858
unsigned long org_sp_gr3,
5959
struct ftrace_regs *fregs)

arch/parisc/kernel/parisc_ksyms.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/module.h>
1515
#include <linux/kernel.h>
1616
#include <linux/syscalls.h>
17+
#include <linux/libgcc.h>
1718

1819
#include <linux/string.h>
1920
EXPORT_SYMBOL(memset);
@@ -92,12 +93,6 @@ EXPORT_SYMBOL($$divI_12);
9293
EXPORT_SYMBOL($$divI_14);
9394
EXPORT_SYMBOL($$divI_15);
9495

95-
extern void __ashrdi3(void);
96-
extern void __ashldi3(void);
97-
extern void __lshrdi3(void);
98-
extern void __muldi3(void);
99-
extern void __ucmpdi2(void);
100-
10196
EXPORT_SYMBOL(__ashrdi3);
10297
EXPORT_SYMBOL(__ashldi3);
10398
EXPORT_SYMBOL(__lshrdi3);

arch/parisc/kernel/pci-dma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
3939
static unsigned long pcxl_used_bytes __read_mostly;
4040
static unsigned long pcxl_used_pages __read_mostly;
4141

42-
extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */
42+
unsigned long pcxl_dma_start __ro_after_init; /* pcxl dma mapping area start */
4343
static DEFINE_SPINLOCK(pcxl_res_lock);
4444
static char *pcxl_res_map;
4545
static int pcxl_res_hint;
@@ -381,7 +381,7 @@ pcxl_dma_init(void)
381381
pcxl_res_map = (char *)__get_free_pages(GFP_KERNEL,
382382
get_order(pcxl_res_size));
383383
memset(pcxl_res_map, 0, pcxl_res_size);
384-
proc_gsc_root = proc_mkdir("gsc", NULL);
384+
proc_gsc_root = proc_mkdir("bus/gsc", NULL);
385385
if (!proc_gsc_root)
386386
printk(KERN_WARNING
387387
"pcxl_dma_init: Unable to create gsc /proc dir entry\n");

0 commit comments

Comments
 (0)