Skip to content

Commit

Permalink
Merge tag 'mips_fixes_4.16_2' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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
  • Loading branch information
torvalds committed Feb 16, 2018
2 parents da370f1 + 5efad9e commit 78352f1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
16 changes: 12 additions & 4 deletions arch/mips/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ static void __init bootmem_init(void)
unsigned long reserved_end;
unsigned long mapstart = ~0UL;
unsigned long bootmap_size;
phys_addr_t ramstart = (phys_addr_t)ULLONG_MAX;
bool bootmap_valid = false;
int i;

Expand All @@ -395,7 +396,8 @@ static void __init bootmem_init(void)
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++) {
unsigned long start, end;
Expand All @@ -407,6 +409,8 @@ static void __init bootmem_init(void)
end = PFN_DOWN(boot_mem_map.map[i].addr
+ boot_mem_map.map[i].size);

ramstart = min(ramstart, boot_mem_map.map[i].addr);

#ifndef CONFIG_HIGHMEM
/*
* Skip highmem here so we get an accurate max_low_pfn if low
Expand Down Expand Up @@ -436,6 +440,13 @@ static void __init bootmem_init(void)
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)
panic("Incorrect memory mapping !!!");
if (min_low_pfn > ARCH_PFN_OFFSET) {
Expand Down Expand Up @@ -664,9 +675,6 @@ static int __init early_parse_mem(char *p)

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;
}
early_param("mem", early_parse_mem);
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/smp-bmips.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
u32 __maybe_unused cfg;
Expand Down
2 changes: 2 additions & 0 deletions arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ config SPARC_LEON
depends on SPARC32
select USB_EHCI_BIG_ENDIAN_MMIO
select USB_EHCI_BIG_ENDIAN_DESC
select USB_UHCI_BIG_ENDIAN_MMIO
select USB_UHCI_BIG_ENDIAN_DESC
---help---
If you say Y here if you are running on a SPARC-LEON processor.
The LEON processor is a synthesizable VHDL model of the
Expand Down
6 changes: 6 additions & 0 deletions drivers/usb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ config USB_EHCI_BIG_ENDIAN_MMIO
config USB_EHCI_BIG_ENDIAN_DESC
bool

config USB_UHCI_BIG_ENDIAN_MMIO
bool

config USB_UHCI_BIG_ENDIAN_DESC
bool

menuconfig USB_SUPPORT
bool "USB support"
depends on HAS_IOMEM
Expand Down
8 changes: 0 additions & 8 deletions drivers/usb/host/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -633,14 +633,6 @@ config USB_UHCI_ASPEED
bool
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
tristate "Freescale QE USB Host Controller support"
depends on OF_GPIO && QE_GPIO && QUICC_ENGINE
Expand Down

0 comments on commit 78352f1

Please sign in to comment.