Commit 78352f18 authored by Linus Torvalds's avatar Linus Torvalds

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
parents da370f1d 5efad9ee
...@@ -375,6 +375,7 @@ static void __init bootmem_init(void) ...@@ -375,6 +375,7 @@ static void __init bootmem_init(void)
unsigned long reserved_end; unsigned long reserved_end;
unsigned long mapstart = ~0UL; unsigned long mapstart = ~0UL;
unsigned long bootmap_size; unsigned long bootmap_size;
phys_addr_t ramstart = (phys_addr_t)ULLONG_MAX;
bool bootmap_valid = false; bool bootmap_valid = false;
int i; int i;
...@@ -395,7 +396,8 @@ static void __init bootmem_init(void) ...@@ -395,7 +396,8 @@ static void __init bootmem_init(void)
max_low_pfn = 0; max_low_pfn = 0;
/* /*
* Find the highest page frame number we have available. * Find the highest page frame number we have available
* and the lowest used RAM address
*/ */
for (i = 0; i < boot_mem_map.nr_map; i++) { for (i = 0; i < boot_mem_map.nr_map; i++) {
unsigned long start, end; unsigned long start, end;
...@@ -407,6 +409,8 @@ static void __init bootmem_init(void) ...@@ -407,6 +409,8 @@ static void __init bootmem_init(void)
end = PFN_DOWN(boot_mem_map.map[i].addr end = PFN_DOWN(boot_mem_map.map[i].addr
+ boot_mem_map.map[i].size); + boot_mem_map.map[i].size);
ramstart = min(ramstart, boot_mem_map.map[i].addr);
#ifndef CONFIG_HIGHMEM #ifndef CONFIG_HIGHMEM
/* /*
* Skip highmem here so we get an accurate max_low_pfn if low * Skip highmem here so we get an accurate max_low_pfn if low
...@@ -436,6 +440,13 @@ static void __init bootmem_init(void) ...@@ -436,6 +440,13 @@ static void __init bootmem_init(void)
mapstart = max(reserved_end, start); mapstart = max(reserved_end, start);
} }
/*
* Reserve any memory between the start of RAM and PHYS_OFFSET
*/
if (ramstart > PHYS_OFFSET)
add_memory_region(PHYS_OFFSET, ramstart - PHYS_OFFSET,
BOOT_MEM_RESERVED);
if (min_low_pfn >= max_low_pfn) if (min_low_pfn >= max_low_pfn)
panic("Incorrect memory mapping !!!"); panic("Incorrect memory mapping !!!");
if (min_low_pfn > ARCH_PFN_OFFSET) { if (min_low_pfn > ARCH_PFN_OFFSET) {
...@@ -664,9 +675,6 @@ static int __init early_parse_mem(char *p) ...@@ -664,9 +675,6 @@ static int __init early_parse_mem(char *p)
add_memory_region(start, size, BOOT_MEM_RAM); add_memory_region(start, size, BOOT_MEM_RAM);
if (start && start > PHYS_OFFSET)
add_memory_region(PHYS_OFFSET, start - PHYS_OFFSET,
BOOT_MEM_RESERVED);
return 0; return 0;
} }
early_param("mem", early_parse_mem); early_param("mem", early_parse_mem);
......
...@@ -572,7 +572,7 @@ asmlinkage void __weak plat_wired_tlb_setup(void) ...@@ -572,7 +572,7 @@ asmlinkage void __weak plat_wired_tlb_setup(void)
*/ */
} }
void __init bmips_cpu_setup(void) void bmips_cpu_setup(void)
{ {
void __iomem __maybe_unused *cbr = BMIPS_GET_CBR(); void __iomem __maybe_unused *cbr = BMIPS_GET_CBR();
u32 __maybe_unused cfg; u32 __maybe_unused cfg;
......
...@@ -430,6 +430,8 @@ config SPARC_LEON ...@@ -430,6 +430,8 @@ config SPARC_LEON
depends on SPARC32 depends on SPARC32
select USB_EHCI_BIG_ENDIAN_MMIO select USB_EHCI_BIG_ENDIAN_MMIO
select USB_EHCI_BIG_ENDIAN_DESC select USB_EHCI_BIG_ENDIAN_DESC
select USB_UHCI_BIG_ENDIAN_MMIO
select USB_UHCI_BIG_ENDIAN_DESC
---help--- ---help---
If you say Y here if you are running on a SPARC-LEON processor. If you say Y here if you are running on a SPARC-LEON processor.
The LEON processor is a synthesizable VHDL model of the The LEON processor is a synthesizable VHDL model of the
......
...@@ -19,6 +19,12 @@ config USB_EHCI_BIG_ENDIAN_MMIO ...@@ -19,6 +19,12 @@ config USB_EHCI_BIG_ENDIAN_MMIO
config USB_EHCI_BIG_ENDIAN_DESC config USB_EHCI_BIG_ENDIAN_DESC
bool bool
config USB_UHCI_BIG_ENDIAN_MMIO
bool
config USB_UHCI_BIG_ENDIAN_DESC
bool
menuconfig USB_SUPPORT menuconfig USB_SUPPORT
bool "USB support" bool "USB support"
depends on HAS_IOMEM depends on HAS_IOMEM
......
...@@ -633,14 +633,6 @@ config USB_UHCI_ASPEED ...@@ -633,14 +633,6 @@ config USB_UHCI_ASPEED
bool bool
default y if ARCH_ASPEED default y if ARCH_ASPEED
config USB_UHCI_BIG_ENDIAN_MMIO
bool
default y if SPARC_LEON
config USB_UHCI_BIG_ENDIAN_DESC
bool
default y if SPARC_LEON
config USB_FHCI_HCD config USB_FHCI_HCD
tristate "Freescale QE USB Host Controller support" tristate "Freescale QE USB Host Controller support"
depends on OF_GPIO && QE_GPIO && QUICC_ENGINE depends on OF_GPIO && QE_GPIO && QUICC_ENGINE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment