Skip to content

Commit d3511f5

Browse files
committed
Merge branch 'parisc-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller: "Many great new features, fixes and optimizations, including: - Convert page table updates to use per-pagetable spinlocks which overall improves performance on SMP machines a lot, by Mikulas Patocka - Kernel debugger (KGDB) support, by Sven Schnelle - KPROBES support, by Sven Schnelle - Lots of TLB lock/flush improvements, by Dave Anglin - Drop DISCONTIGMEM and switch to SPARSEMEM - Added JUMP_LABEL, branch runtime-patching support - Lots of other small speedups and cleanups, e.g. for QEMU, stack randomization, avoidance of name clashes, documentation updates, etc ..." * 'parisc-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (28 commits) parisc: Add static branch and JUMP_LABEL feature parisc: Use PA_ASM_LEVEL in boot code parisc: Rename LEVEL to PA_ASM_LEVEL to avoid name clash with DRBD code parisc: Update huge TLB page support to use per-pagetable spinlock parisc: Use per-pagetable spinlock parisc: Allow live-patching of __meminit functions parisc: Add memory barrier to asm pdc and sync instructions parisc: Add memory clobber to TLB purges parisc: Use ldcw instruction for SMP spinlock release barrier parisc: Remove lock code to serialize TLB operations in pacache.S parisc: Switch from DISCONTIGMEM to SPARSEMEM parisc: enable wide mode early parisc: update feature lists parisc: Show n/a if product number not available parisc: remove unused flags parameter in __patch_text() doc: update kprobes supported architecture list parisc: Implement kretprobes parisc: remove kprobes.h from generic-y parisc: Implement kprobes parisc: add functions required by KPROBE_EVENTS ...
2 parents 02aff8d + 62217be commit d3511f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1258
-295
lines changed

Documentation/features/debug/kgdb/arch-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
| nds32: | TODO |
2222
| nios2: | ok |
2323
| openrisc: | TODO |
24-
| parisc: | TODO |
24+
| parisc: | ok |
2525
| powerpc: | ok |
2626
| riscv: | TODO |
2727
| s390: | TODO |

Documentation/features/debug/kprobes/arch-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
| nds32: | TODO |
2222
| nios2: | TODO |
2323
| openrisc: | TODO |
24-
| parisc: | TODO |
24+
| parisc: | ok |
2525
| powerpc: | ok |
2626
| riscv: | ok |
2727
| s390: | ok |

Documentation/features/debug/kretprobes/arch-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
| nds32: | TODO |
2222
| nios2: | TODO |
2323
| openrisc: | TODO |
24-
| parisc: | TODO |
24+
| parisc: | ok |
2525
| powerpc: | ok |
2626
| riscv: | TODO |
2727
| s390: | ok |

Documentation/kprobes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ architectures:
321321
- ppc
322322
- mips
323323
- s390
324+
- parisc
324325

325326
Configuring Kprobes
326327
===================

arch/parisc/Kconfig

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ config PARISC
3636
select GENERIC_STRNCPY_FROM_USER
3737
select SYSCTL_ARCH_UNALIGN_ALLOW
3838
select SYSCTL_EXCEPTION_TRACE
39+
select ARCH_DISCARD_MEMBLOCK
3940
select HAVE_MOD_ARCH_SPECIFIC
4041
select VIRT_TO_BUS
4142
select MODULES_USE_ELF_RELA
@@ -44,6 +45,8 @@ config PARISC
4445
select HAVE_DEBUG_STACKOVERFLOW
4546
select HAVE_ARCH_AUDITSYSCALL
4647
select HAVE_ARCH_HASH
48+
select HAVE_ARCH_JUMP_LABEL
49+
select HAVE_ARCH_JUMP_LABEL_RELATIVE
4750
select HAVE_ARCH_SECCOMP_FILTER
4851
select HAVE_ARCH_TRACEHOOK
4952
select HAVE_REGS_AND_STACK_ACCESS_API
@@ -54,6 +57,9 @@ config PARISC
5457
select CPU_NO_EFFICIENT_FFS
5558
select NEED_DMA_MAP_STATE
5659
select NEED_SG_DMA_LENGTH
60+
select HAVE_ARCH_KGDB
61+
select HAVE_KPROBES
62+
select HAVE_KRETPROBES
5763

5864
help
5965
The PA-RISC microprocessor is designed by Hewlett-Packard and used
@@ -305,21 +311,16 @@ config ARCH_SELECT_MEMORY_MODEL
305311
def_bool y
306312
depends on 64BIT
307313

308-
config ARCH_DISCONTIGMEM_ENABLE
314+
config ARCH_SPARSEMEM_ENABLE
309315
def_bool y
310316
depends on 64BIT
311317

312318
config ARCH_FLATMEM_ENABLE
313319
def_bool y
314320

315-
config ARCH_DISCONTIGMEM_DEFAULT
321+
config ARCH_SPARSEMEM_DEFAULT
316322
def_bool y
317-
depends on ARCH_DISCONTIGMEM_ENABLE
318-
319-
config NODES_SHIFT
320-
int
321-
default "3"
322-
depends on NEED_MULTIPLE_NODES
323+
depends on ARCH_SPARSEMEM_ENABLE
323324

324325
source "kernel/Kconfig.hz"
325326

arch/parisc/boot/compressed/head.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
__HEAD
2323

2424
ENTRY(startup)
25-
.level LEVEL
25+
.level PA_ASM_LEVEL
2626

2727
#define PSW_W_SM 0x200
2828
#define PSW_W_BIT 36
@@ -63,7 +63,7 @@ $bss_loop:
6363
load32 BOOTADDR(decompress_kernel),%r3
6464

6565
#ifdef CONFIG_64BIT
66-
.level LEVEL
66+
.level PA_ASM_LEVEL
6767
ssm PSW_W_SM, %r0 /* set W-bit */
6868
depdi 0, 31, 32, %r3
6969
#endif
@@ -72,7 +72,7 @@ $bss_loop:
7272

7373
startup_continue:
7474
#ifdef CONFIG_64BIT
75-
.level LEVEL
75+
.level PA_ASM_LEVEL
7676
rsm PSW_W_SM, %r0 /* clear W-bit */
7777
#endif
7878

arch/parisc/boot/compressed/misc.c

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,27 +145,28 @@ static int putchar(int c)
145145

146146
void __noreturn error(char *x)
147147
{
148-
puts("\n\n");
149-
puts(x);
150-
puts("\n\n -- System halted");
148+
if (x) puts(x);
149+
puts("\n -- System halted\n");
151150
while (1) /* wait forever */
152151
;
153152
}
154153

155-
static int print_hex(unsigned long num)
154+
static int print_num(unsigned long num, int base)
156155
{
157156
const char hex[] = "0123456789abcdef";
158157
char str[40];
159158
int i = sizeof(str)-1;
160159

161160
str[i--] = '\0';
162161
do {
163-
str[i--] = hex[num & 0x0f];
164-
num >>= 4;
162+
str[i--] = hex[num % base];
163+
num = num / base;
165164
} while (num);
166165

167-
str[i--] = 'x';
168-
str[i] = '0';
166+
if (base == 16) {
167+
str[i--] = 'x';
168+
str[i] = '0';
169+
} else i++;
169170
puts(&str[i]);
170171

171172
return 0;
@@ -187,8 +188,9 @@ int printf(const char *fmt, ...)
187188

188189
if (fmt[++i] == '%')
189190
goto put;
191+
print_num(va_arg(args, unsigned long),
192+
fmt[i] == 'x' ? 16:10);
190193
++i;
191-
print_hex(va_arg(args, unsigned long));
192194
}
193195

194196
va_end(args);
@@ -327,8 +329,15 @@ unsigned long decompress_kernel(unsigned int started_wide,
327329
free_mem_end_ptr = rd_start;
328330
#endif
329331

330-
if (free_mem_ptr >= free_mem_end_ptr)
331-
error("Kernel too big for machine.");
332+
if (free_mem_ptr >= free_mem_end_ptr) {
333+
int free_ram;
334+
free_ram = (free_mem_ptr >> 20) + 1;
335+
if (free_ram < 32)
336+
free_ram = 32;
337+
printf("\nKernel requires at least %d MB RAM.\n",
338+
free_ram);
339+
error(NULL);
340+
}
332341

333342
#ifdef DEBUG
334343
printf("\n");

arch/parisc/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ generic-y += hw_irq.h
1010
generic-y += irq_regs.h
1111
generic-y += irq_work.h
1212
generic-y += kdebug.h
13-
generic-y += kprobes.h
1413
generic-y += kvm_para.h
1514
generic-y += local.h
1615
generic-y += local64.h

arch/parisc/include/asm/assembly.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@
6161
#define LDCW ldcw,co
6262
#define BL b,l
6363
# ifdef CONFIG_64BIT
64-
# define LEVEL 2.0w
64+
# define PA_ASM_LEVEL 2.0w
6565
# else
66-
# define LEVEL 2.0
66+
# define PA_ASM_LEVEL 2.0
6767
# endif
6868
#else
6969
#define LDCW ldcw
7070
#define BL bl
71-
#define LEVEL 1.1
71+
#define PA_ASM_LEVEL 1.1
7272
#endif
7373

7474
#ifdef __ASSEMBLY__

arch/parisc/include/asm/cache.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ void parisc_setup_cache_timing(void);
4444

4545
#define pdtlb(addr) asm volatile("pdtlb 0(%%sr1,%0)" \
4646
ALTERNATIVE(ALT_COND_NO_SMP, INSN_PxTLB) \
47-
: : "r" (addr))
47+
: : "r" (addr) : "memory")
4848
#define pitlb(addr) asm volatile("pitlb 0(%%sr1,%0)" \
4949
ALTERNATIVE(ALT_COND_NO_SMP, INSN_PxTLB) \
5050
ALTERNATIVE(ALT_COND_NO_SPLIT_TLB, INSN_NOP) \
51-
: : "r" (addr))
51+
: : "r" (addr) : "memory")
5252
#define pdtlb_kernel(addr) asm volatile("pdtlb 0(%0)" \
5353
ALTERNATIVE(ALT_COND_NO_SMP, INSN_PxTLB) \
54-
: : "r" (addr))
54+
: : "r" (addr) : "memory")
5555

5656
#define asm_io_fdc(addr) asm volatile("fdc %%r0(%0)" \
5757
ALTERNATIVE(ALT_COND_NO_DCACHE, INSN_NOP) \
5858
ALTERNATIVE(ALT_COND_NO_IOC_FDC, INSN_NOP) \
59-
: : "r" (addr))
59+
: : "r" (addr) : "memory")
6060
#define asm_io_sync() asm volatile("sync" \
6161
ALTERNATIVE(ALT_COND_NO_DCACHE, INSN_NOP) \
62-
ALTERNATIVE(ALT_COND_NO_IOC_FDC, INSN_NOP) :: )
62+
ALTERNATIVE(ALT_COND_NO_IOC_FDC, INSN_NOP) :::"memory")
6363

6464
#endif /* ! __ASSEMBLY__ */
6565

0 commit comments

Comments
 (0)