Skip to content

Commit f5ce046

Browse files
committed
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: - Halve maximum number of CPUs if DEBUG_KMAP_LOCAL is enabled - Fix conversion for_each_membock() to for_each_mem_range() - Fix footbridge PCI mapping - Avoid uprobes hooking on thumb instructions * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9071/1: uprobes: Don't hook on thumb instructions ARM: footbridge: fix PCI interrupt mapping ARM: 9069/1: NOMMU: Fix conversion for_each_membock() to for_each_mem_range() ARM: 9063/1: mm: reduce maximum number of CPUs if DEBUG_KMAP_LOCAL is enabled
2 parents c98ff1d + d2f7eca commit f5ce046

File tree

9 files changed

+23
-15
lines changed

9 files changed

+23
-15
lines changed

arch/arm/Kconfig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,9 +1293,15 @@ config KASAN_SHADOW_OFFSET
12931293

12941294
config NR_CPUS
12951295
int "Maximum number of CPUs (2-32)"
1296-
range 2 32
1296+
range 2 16 if DEBUG_KMAP_LOCAL
1297+
range 2 32 if !DEBUG_KMAP_LOCAL
12971298
depends on SMP
12981299
default "4"
1300+
help
1301+
The maximum number of CPUs that the kernel can support.
1302+
Up to 32 CPUs can be supported, or up to 16 if kmap_local()
1303+
debugging is enabled, which uses half of the per-CPU fixmap
1304+
slots as guard regions.
12991305

13001306
config HOTPLUG_CPU
13011307
bool "Support for hot-pluggable CPUs"

arch/arm/mach-footbridge/cats-pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
#include <asm/mach-types.h>
1616

1717
/* cats host-specific stuff */
18-
static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
18+
static int irqmap_cats[] = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
1919

2020
static u8 cats_no_swizzle(struct pci_dev *dev, u8 *pin)
2121
{
2222
return 0;
2323
}
2424

25-
static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
25+
static int cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2626
{
2727
if (dev->irq >= 255)
2828
return -1; /* not a valid interrupt. */

arch/arm/mach-footbridge/ebsa285-pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#include <asm/mach/pci.h>
1515
#include <asm/mach-types.h>
1616

17-
static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
17+
static int irqmap_ebsa285[] = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
1818

19-
static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
19+
static int ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2020
{
2121
if (dev->vendor == PCI_VENDOR_ID_CONTAQ &&
2222
dev->device == PCI_DEVICE_ID_CONTAQ_82C693)

arch/arm/mach-footbridge/netwinder-pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* We now use the slot ID instead of the device identifiers to select
1919
* which interrupt is routed where.
2020
*/
21-
static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
21+
static int netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2222
{
2323
switch (slot) {
2424
case 0: /* host bridge */

arch/arm/mach-footbridge/personal-pci.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
#include <asm/mach/pci.h>
1515
#include <asm/mach-types.h>
1616

17-
static int irqmap_personal_server[] __initdata = {
17+
static int irqmap_personal_server[] = {
1818
IRQ_IN0, IRQ_IN1, IRQ_IN2, IRQ_IN3, 0, 0, 0,
1919
IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI
2020
};
2121

22-
static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot,
23-
u8 pin)
22+
static int personal_server_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2423
{
2524
unsigned char line;
2625

arch/arm/mm/mmu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,7 @@ void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot)
387387
pte_t *pte = pte_offset_fixmap(pmd_off_k(vaddr), vaddr);
388388

389389
/* Make sure fixmap region does not exceed available allocation. */
390-
BUILD_BUG_ON(FIXADDR_START + (__end_of_fixed_addresses * PAGE_SIZE) >
391-
FIXADDR_END);
390+
BUILD_BUG_ON(__fix_to_virt(__end_of_fixed_addresses) < FIXADDR_START);
392391
BUG_ON(idx >= __end_of_fixed_addresses);
393392

394393
/* we only support device mappings until pgprot_kernel has been set */

arch/arm/mm/pmsa-v7.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ void __init pmsav7_adjust_lowmem_bounds(void)
235235
phys_addr_t mem_end;
236236
phys_addr_t reg_start, reg_end;
237237
unsigned int mem_max_regions;
238+
bool first = true;
238239
int num;
239240
u64 i;
240241

@@ -263,7 +264,7 @@ void __init pmsav7_adjust_lowmem_bounds(void)
263264
#endif
264265

265266
for_each_mem_range(i, &reg_start, &reg_end) {
266-
if (i == 0) {
267+
if (first) {
267268
phys_addr_t phys_offset = PHYS_OFFSET;
268269

269270
/*
@@ -275,6 +276,7 @@ void __init pmsav7_adjust_lowmem_bounds(void)
275276
mem_start = reg_start;
276277
mem_end = reg_end;
277278
specified_mem_size = mem_end - mem_start;
279+
first = false;
278280
} else {
279281
/*
280282
* memblock auto merges contiguous blocks, remove

arch/arm/mm/pmsa-v8.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ void __init pmsav8_adjust_lowmem_bounds(void)
9595
{
9696
phys_addr_t mem_end;
9797
phys_addr_t reg_start, reg_end;
98+
bool first = true;
9899
u64 i;
99100

100101
for_each_mem_range(i, &reg_start, &reg_end) {
101-
if (i == 0) {
102+
if (first) {
102103
phys_addr_t phys_offset = PHYS_OFFSET;
103104

104105
/*
@@ -107,6 +108,7 @@ void __init pmsav8_adjust_lowmem_bounds(void)
107108
if (reg_start != phys_offset)
108109
panic("First memory bank must be contiguous from PHYS_OFFSET");
109110
mem_end = reg_end;
111+
first = false;
110112
} else {
111113
/*
112114
* memblock auto merges contiguous blocks, remove

arch/arm/probes/uprobes/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,15 @@ unsigned long uprobe_get_swbp_addr(struct pt_regs *regs)
204204
static struct undef_hook uprobes_arm_break_hook = {
205205
.instr_mask = 0x0fffffff,
206206
.instr_val = (UPROBE_SWBP_ARM_INSN & 0x0fffffff),
207-
.cpsr_mask = MODE_MASK,
207+
.cpsr_mask = (PSR_T_BIT | MODE_MASK),
208208
.cpsr_val = USR_MODE,
209209
.fn = uprobe_trap_handler,
210210
};
211211

212212
static struct undef_hook uprobes_arm_ss_hook = {
213213
.instr_mask = 0x0fffffff,
214214
.instr_val = (UPROBE_SS_ARM_INSN & 0x0fffffff),
215-
.cpsr_mask = MODE_MASK,
215+
.cpsr_mask = (PSR_T_BIT | MODE_MASK),
216216
.cpsr_val = USR_MODE,
217217
.fn = uprobe_trap_handler,
218218
};

0 commit comments

Comments
 (0)