Skip to content

Commit e9ac503

Browse files
committed
Merge branch 'linus'
2 parents 1d9e325 + df0219d commit e9ac503

File tree

10 files changed

+68
-31
lines changed

10 files changed

+68
-31
lines changed

arch/parisc/Kconfig

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ menu "Processor type and features"
146146

147147
choice
148148
prompt "Processor type"
149-
default PA7000
149+
default PA7000 if "$(ARCH)" = "parisc"
150150

151151
config PA7000
152-
bool "PA7000/PA7100"
152+
bool "PA7000/PA7100" if "$(ARCH)" = "parisc"
153153
help
154154
This is the processor type of your CPU. This information is
155155
used for optimizing purposes. In order to compile a kernel
@@ -160,21 +160,21 @@ config PA7000
160160
which is required on some machines.
161161

162162
config PA7100LC
163-
bool "PA7100LC"
163+
bool "PA7100LC" if "$(ARCH)" = "parisc"
164164
help
165165
Select this option for the PCX-L processor, as used in the
166166
712, 715/64, 715/80, 715/100, 715/100XC, 725/100, 743, 748,
167167
D200, D210, D300, D310 and E-class
168168

169169
config PA7200
170-
bool "PA7200"
170+
bool "PA7200" if "$(ARCH)" = "parisc"
171171
help
172172
Select this option for the PCX-T' processor, as used in the
173173
C100, C110, J100, J110, J210XC, D250, D260, D350, D360,
174174
K100, K200, K210, K220, K400, K410 and K420
175175

176176
config PA7300LC
177-
bool "PA7300LC"
177+
bool "PA7300LC" if "$(ARCH)" = "parisc"
178178
help
179179
Select this option for the PCX-L2 processor, as used in the
180180
744, A180, B132L, B160L, B180L, C132L, C160L, C180L,
@@ -224,17 +224,8 @@ config MLONGCALLS
224224
Enabling this option will probably slow down your kernel.
225225

226226
config 64BIT
227-
bool "64-bit kernel"
227+
def_bool "$(ARCH)" = "parisc64"
228228
depends on PA8X00
229-
help
230-
Enable this if you want to support 64bit kernel on PA-RISC platform.
231-
232-
At the moment, only people willing to use more than 2GB of RAM,
233-
or having a 64bit-only capable PA-RISC machine should say Y here.
234-
235-
Since there is no 64bit userland on PA-RISC, there is no point to
236-
enable this option otherwise. The 64bit kernel is significantly bigger
237-
and slower than the 32bit one.
238229

239230
choice
240231
prompt "Kernel page size"

arch/parisc/include/asm/bitops.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@
1212
#include <asm/barrier.h>
1313
#include <linux/atomic.h>
1414

15-
/* compiler build environment sanity checks: */
16-
#if !defined(CONFIG_64BIT) && defined(__LP64__)
17-
#error "Please use 'ARCH=parisc' to build the 32-bit kernel."
18-
#endif
19-
#if defined(CONFIG_64BIT) && !defined(__LP64__)
20-
#error "Please use 'ARCH=parisc64' to build the 64-bit kernel."
21-
#endif
22-
2315
/* See http://marc.theaimsgroup.com/?t=108826637900003 for discussion
2416
* on use of volatile and __*_bit() (set/clear/change):
2517
* *_bit() want use of volatile.

arch/parisc/kernel/head.S

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <linux/init.h>
2323
#include <linux/pgtable.h>
2424

25-
.level PA_ASM_LEVEL
25+
.level 1.1
2626

2727
__INITDATA
2828
ENTRY(boot_args)
@@ -70,6 +70,47 @@ $bss_loop:
7070
stw,ma %arg2,4(%r1)
7171
stw,ma %arg3,4(%r1)
7272

73+
#if !defined(CONFIG_64BIT) && defined(CONFIG_PA20)
74+
/* This 32-bit kernel was compiled for PA2.0 CPUs. Check current CPU
75+
* and halt kernel if we detect a PA1.x CPU. */
76+
ldi 32,%r10
77+
mtctl %r10,%cr11
78+
.level 2.0
79+
mfctl,w %cr11,%r10
80+
.level 1.1
81+
comib,<>,n 0,%r10,$cpu_ok
82+
83+
load32 PA(msg1),%arg0
84+
ldi msg1_end-msg1,%arg1
85+
$iodc_panic:
86+
copy %arg0, %r10
87+
copy %arg1, %r11
88+
load32 PA(init_stack),%sp
89+
#define MEM_CONS 0x3A0
90+
ldw MEM_CONS+32(%r0),%arg0 // HPA
91+
ldi ENTRY_IO_COUT,%arg1
92+
ldw MEM_CONS+36(%r0),%arg2 // SPA
93+
ldw MEM_CONS+8(%r0),%arg3 // layers
94+
load32 PA(__bss_start),%r1
95+
stw %r1,-52(%sp) // arg4
96+
stw %r0,-56(%sp) // arg5
97+
stw %r10,-60(%sp) // arg6 = ptr to text
98+
stw %r11,-64(%sp) // arg7 = len
99+
stw %r0,-68(%sp) // arg8
100+
load32 PA(.iodc_panic_ret), %rp
101+
ldw MEM_CONS+40(%r0),%r1 // ENTRY_IODC
102+
bv,n (%r1)
103+
.iodc_panic_ret:
104+
b . /* wait endless with ... */
105+
or %r10,%r10,%r10 /* qemu idle sleep */
106+
msg1: .ascii "Can't boot kernel which was built for PA8x00 CPUs on this machine.\r\n"
107+
msg1_end:
108+
109+
$cpu_ok:
110+
#endif
111+
112+
.level PA_ASM_LEVEL
113+
73114
/* Initialize startup VM. Just map first 16/32 MB of memory */
74115
load32 PA(swapper_pg_dir),%r4
75116
mtctl %r4,%cr24 /* Initialize kernel root pointer */

arch/parisc/kernel/unaligned.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
#define R1(i) (((i)>>21)&0x1f)
9494
#define R2(i) (((i)>>16)&0x1f)
9595
#define R3(i) ((i)&0x1f)
96-
#define FR3(i) ((((i)<<1)&0x1f)|(((i)>>6)&1))
96+
#define FR3(i) ((((i)&0x1f)<<1)|(((i)>>6)&1))
9797
#define IM(i,n) (((i)>>1&((1<<(n-1))-1))|((i)&1?((0-1L)<<(n-1)):0))
9898
#define IM5_2(i) IM((i)>>16,5)
9999
#define IM5_3(i) IM((i),5)

drivers/mmc/host/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ config MMC_SDHCI_OF_ASPEED
171171
config MMC_SDHCI_OF_ASPEED_TEST
172172
bool "Tests for the ASPEED SDHCI driver" if !KUNIT_ALL_TESTS
173173
depends on MMC_SDHCI_OF_ASPEED && KUNIT
174+
depends on (MMC_SDHCI_OF_ASPEED=m || KUNIT=y)
174175
default KUNIT_ALL_TESTS
175176
help
176177
Enable KUnit tests for the ASPEED SDHCI driver. Select this

drivers/parisc/ccio-dma.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static int ioc_count;
268268
* Each bit can represent a number of pages.
269269
* LSbs represent lower addresses (IOVA's).
270270
*
271-
* This was was copied from sba_iommu.c. Don't try to unify
271+
* This was copied from sba_iommu.c. Don't try to unify
272272
* the two resource managers unless a way to have different
273273
* allocation policies is also adjusted. We'd like to avoid
274274
* I/O TLB thrashing by having resource allocation policy
@@ -1380,15 +1380,17 @@ ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr)
13801380
}
13811381
}
13821382

1383-
static void __init ccio_init_resources(struct ioc *ioc)
1383+
static int __init ccio_init_resources(struct ioc *ioc)
13841384
{
13851385
struct resource *res = ioc->mmio_region;
13861386
char *name = kmalloc(14, GFP_KERNEL);
1387-
1387+
if (unlikely(!name))
1388+
return -ENOMEM;
13881389
snprintf(name, 14, "GSC Bus [%d/]", ioc->hw_path);
13891390

13901391
ccio_init_resource(res, name, &ioc->ioc_regs->io_io_low);
13911392
ccio_init_resource(res + 1, name, &ioc->ioc_regs->io_io_low_hv);
1393+
return 0;
13921394
}
13931395

13941396
static int new_ioc_area(struct resource *res, unsigned long size,
@@ -1543,7 +1545,10 @@ static int __init ccio_probe(struct parisc_device *dev)
15431545
return -ENOMEM;
15441546
}
15451547
ccio_ioc_init(ioc);
1546-
ccio_init_resources(ioc);
1548+
if (ccio_init_resources(ioc)) {
1549+
kfree(ioc);
1550+
return -ENOMEM;
1551+
}
15471552
hppa_dma_ops = &ccio_ops;
15481553

15491554
hba = kzalloc(sizeof(*hba), GFP_KERNEL);

drivers/parisc/led.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ int lcd_print( const char *str )
646646
cancel_delayed_work_sync(&led_task);
647647

648648
/* copy display string to buffer for procfs */
649-
strlcpy(lcd_text, str, sizeof(lcd_text));
649+
strscpy(lcd_text, str, sizeof(lcd_text));
650650

651651
/* Set LCD Cursor to 1st character */
652652
gsc_writeb(lcd_info.reset_cmd1, LCD_CMD_REG);

kernel/module/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ static int find_module_sections(struct module *mod, struct load_info *info)
20992099
sizeof(*mod->static_call_sites),
21002100
&mod->num_static_call_sites);
21012101
#endif
2102-
#ifdef CONFIG_KUNIT
2102+
#if IS_ENABLED(CONFIG_KUNIT)
21032103
mod->kunit_suites = section_objs(info, ".kunit_test_suites",
21042104
sizeof(*mod->kunit_suites),
21052105
&mod->num_kunit_suites);

tools/testing/selftests/lib.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ ifeq (0,$(MAKELEVEL))
4040
endif
4141
endif
4242
selfdir = $(realpath $(dir $(filter %/lib.mk,$(MAKEFILE_LIST))))
43+
top_srcdir = $(selfdir)/../../..
4344

4445
# The following are built by lib.mk common compile rules.
4546
# TEST_CUSTOM_PROGS should be used by tests that require

tools/testing/selftests/sgx/sigstruct.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
#include "defines.h"
1818
#include "main.h"
1919

20+
/*
21+
* FIXME: OpenSSL 3.0 has deprecated some functions. For now just ignore
22+
* the warnings.
23+
*/
24+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
25+
2026
struct q1q2_ctx {
2127
BN_CTX *bn_ctx;
2228
BIGNUM *m;

0 commit comments

Comments
 (0)