Skip to content

Commit 78352f1

Browse files
committed
Merge tag 'mips_fixes_4.16_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips
Pull MIPS fixes from James Hogan: "A few fixes for outstanding MIPS issues: - an __init section mismatch warning when brcmstb_pm is enabled - a regression handling multiple mem=X@Y arguments (4.11) - a USB Kconfig select warning, and related sparc cleanup (4.16)" * tag 'mips_fixes_4.16_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: sparc,leon: Select USB_UHCI_BIG_ENDIAN_{MMIO,DESC} usb: Move USB_UHCI_BIG_ENDIAN_* out of USB_SUPPORT MIPS: Fix incorrect mem=X@Y handling MIPS: BMIPS: Fix section mismatch warning
2 parents da370f1 + 5efad9e commit 78352f1

File tree

5 files changed

+21
-13
lines changed

5 files changed

+21
-13
lines changed

arch/mips/kernel/setup.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ static void __init bootmem_init(void)
375375
unsigned long reserved_end;
376376
unsigned long mapstart = ~0UL;
377377
unsigned long bootmap_size;
378+
phys_addr_t ramstart = (phys_addr_t)ULLONG_MAX;
378379
bool bootmap_valid = false;
379380
int i;
380381

@@ -395,7 +396,8 @@ static void __init bootmem_init(void)
395396
max_low_pfn = 0;
396397

397398
/*
398-
* Find the highest page frame number we have available.
399+
* Find the highest page frame number we have available
400+
* and the lowest used RAM address
399401
*/
400402
for (i = 0; i < boot_mem_map.nr_map; i++) {
401403
unsigned long start, end;
@@ -407,6 +409,8 @@ static void __init bootmem_init(void)
407409
end = PFN_DOWN(boot_mem_map.map[i].addr
408410
+ boot_mem_map.map[i].size);
409411

412+
ramstart = min(ramstart, boot_mem_map.map[i].addr);
413+
410414
#ifndef CONFIG_HIGHMEM
411415
/*
412416
* Skip highmem here so we get an accurate max_low_pfn if low
@@ -436,6 +440,13 @@ static void __init bootmem_init(void)
436440
mapstart = max(reserved_end, start);
437441
}
438442

443+
/*
444+
* Reserve any memory between the start of RAM and PHYS_OFFSET
445+
*/
446+
if (ramstart > PHYS_OFFSET)
447+
add_memory_region(PHYS_OFFSET, ramstart - PHYS_OFFSET,
448+
BOOT_MEM_RESERVED);
449+
439450
if (min_low_pfn >= max_low_pfn)
440451
panic("Incorrect memory mapping !!!");
441452
if (min_low_pfn > ARCH_PFN_OFFSET) {
@@ -664,9 +675,6 @@ static int __init early_parse_mem(char *p)
664675

665676
add_memory_region(start, size, BOOT_MEM_RAM);
666677

667-
if (start && start > PHYS_OFFSET)
668-
add_memory_region(PHYS_OFFSET, start - PHYS_OFFSET,
669-
BOOT_MEM_RESERVED);
670678
return 0;
671679
}
672680
early_param("mem", early_parse_mem);

arch/mips/kernel/smp-bmips.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ asmlinkage void __weak plat_wired_tlb_setup(void)
572572
*/
573573
}
574574

575-
void __init bmips_cpu_setup(void)
575+
void bmips_cpu_setup(void)
576576
{
577577
void __iomem __maybe_unused *cbr = BMIPS_GET_CBR();
578578
u32 __maybe_unused cfg;

arch/sparc/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ config SPARC_LEON
430430
depends on SPARC32
431431
select USB_EHCI_BIG_ENDIAN_MMIO
432432
select USB_EHCI_BIG_ENDIAN_DESC
433+
select USB_UHCI_BIG_ENDIAN_MMIO
434+
select USB_UHCI_BIG_ENDIAN_DESC
433435
---help---
434436
If you say Y here if you are running on a SPARC-LEON processor.
435437
The LEON processor is a synthesizable VHDL model of the

drivers/usb/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ config USB_EHCI_BIG_ENDIAN_MMIO
1919
config USB_EHCI_BIG_ENDIAN_DESC
2020
bool
2121

22+
config USB_UHCI_BIG_ENDIAN_MMIO
23+
bool
24+
25+
config USB_UHCI_BIG_ENDIAN_DESC
26+
bool
27+
2228
menuconfig USB_SUPPORT
2329
bool "USB support"
2430
depends on HAS_IOMEM

drivers/usb/host/Kconfig

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -633,14 +633,6 @@ config USB_UHCI_ASPEED
633633
bool
634634
default y if ARCH_ASPEED
635635

636-
config USB_UHCI_BIG_ENDIAN_MMIO
637-
bool
638-
default y if SPARC_LEON
639-
640-
config USB_UHCI_BIG_ENDIAN_DESC
641-
bool
642-
default y if SPARC_LEON
643-
644636
config USB_FHCI_HCD
645637
tristate "Freescale QE USB Host Controller support"
646638
depends on OF_GPIO && QE_GPIO && QUICC_ENGINE

0 commit comments

Comments
 (0)