mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-10 07:41:09 -04:00
Merge tag 'mips_fixes_5.10_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fixes from Thomas Bogendoerfer: - fix bug preventing booting on several platforms - fix for build error, when modules need has_transparent_hugepage - fix for memleak in alchemy clk setup * tag 'mips_fixes_5.10_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu MIPS: kernel: Fix for_each_memblock conversion MIPS: export has_transparent_hugepage() for modules
This commit is contained in:
@@ -152,6 +152,7 @@ static struct clk __init *alchemy_clk_setup_cpu(const char *parent_name,
|
||||
{
|
||||
struct clk_init_data id;
|
||||
struct clk_hw *h;
|
||||
struct clk *clk;
|
||||
|
||||
h = kzalloc(sizeof(*h), GFP_KERNEL);
|
||||
if (!h)
|
||||
@@ -164,7 +165,13 @@ static struct clk __init *alchemy_clk_setup_cpu(const char *parent_name,
|
||||
id.ops = &alchemy_clkops_cpu;
|
||||
h->init = &id;
|
||||
|
||||
return clk_register(NULL, h);
|
||||
clk = clk_register(NULL, h);
|
||||
if (IS_ERR(clk)) {
|
||||
pr_err("failed to register clock\n");
|
||||
kfree(h);
|
||||
}
|
||||
|
||||
return clk;
|
||||
}
|
||||
|
||||
/* AUXPLLs ************************************************************/
|
||||
|
||||
@@ -262,8 +262,8 @@ static void __init bootmem_init(void)
|
||||
static void __init bootmem_init(void)
|
||||
{
|
||||
phys_addr_t ramstart, ramend;
|
||||
phys_addr_t start, end;
|
||||
u64 i;
|
||||
unsigned long start, end;
|
||||
int i;
|
||||
|
||||
ramstart = memblock_start_of_DRAM();
|
||||
ramend = memblock_end_of_DRAM();
|
||||
@@ -300,7 +300,7 @@ static void __init bootmem_init(void)
|
||||
|
||||
min_low_pfn = ARCH_PFN_OFFSET;
|
||||
max_pfn = PFN_DOWN(ramend);
|
||||
for_each_mem_range(i, &start, &end) {
|
||||
for_each_mem_pfn_range(i, MAX_NUMNODES, &start, &end, NULL) {
|
||||
/*
|
||||
* Skip highmem here so we get an accurate max_low_pfn if low
|
||||
* memory stops short of high memory.
|
||||
|
||||
@@ -438,6 +438,7 @@ int has_transparent_hugepage(void)
|
||||
}
|
||||
return mask == PM_HUGE_MASK;
|
||||
}
|
||||
EXPORT_SYMBOL(has_transparent_hugepage);
|
||||
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user