]> Git Repo - linux.git/commitdiff
Merge tag 'uml-for-linus-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <[email protected]>
Fri, 31 Jan 2025 02:29:40 +0000 (18:29 -0800)
committerLinus Torvalds <[email protected]>
Fri, 31 Jan 2025 02:29:40 +0000 (18:29 -0800)
Pull UML updates from Richard Weinberger:

 - hostfs: Convert to writepages

 - many cleanups: removal of dead macros, missing __init

* tag 'uml-for-linus-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux:
  um: Remove unused asm/archparam.h header
  um: Include missing headers in asm/pgtable.h
  hostfs: Convert to writepages
  um: rtc: use RTC time when calculating the alarm
  um: Remove unused user_context function
  um: Remove unused THREAD_NAME_LEN macro
  um: Remove unused PGD_BOUND macro
  um: Mark setup_env_path as __init
  um: Mark install_fatal_handler as __init
  um: Mark set_stklim as __init
  um: Mark get_top_address as __init
  um: Mark parse_cache_line as __init
  um: Mark parse_host_cpu_flags as __init
  um: Count iomem_size only once in physmem calculation
  um: Remove obsolete fixmap support
  um: Remove unused MODULES_LEN macro

1  2 
arch/um/kernel/mem.c

diff --combined arch/um/kernel/mem.c
index d9881290749376834423582cb91f4d96e596f047,8a0e74ad00d114de393d96eaec2bb6696e471f6e..befed230aac28e96fe54b3b41cd68f46fa2cfac3
@@@ -9,7 -9,6 +9,6 @@@
  #include <linux/mm.h>
  #include <linux/swap.h>
  #include <linux/slab.h>
- #include <asm/fixmap.h>
  #include <asm/page.h>
  #include <asm/pgalloc.h>
  #include <as-layout.h>
@@@ -74,6 -73,7 +73,7 @@@ void __init mem_init(void
        kmalloc_ok = 1;
  }
  
+ #if IS_ENABLED(CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA)
  /*
   * Create a page table and place a pointer to it in a middle page
   * directory entry.
@@@ -152,7 -152,6 +152,6 @@@ static void __init fixrange_init(unsign
  
  static void __init fixaddr_user_init( void)
  {
- #ifdef CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA
        long size = FIXADDR_USER_END - FIXADDR_USER_START;
        pte_t *pte;
        phys_t p;
                pte = virt_to_kpte(vaddr);
                pte_set_val(*pte, p, PAGE_READONLY);
        }
- #endif
  }
+ #endif
  
  void __init paging_init(void)
  {
        unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
-       unsigned long vaddr;
  
        empty_zero_page = (unsigned long *) memblock_alloc_low(PAGE_SIZE,
                                                               PAGE_SIZE);
        max_zone_pfn[ZONE_NORMAL] = end_iomem >> PAGE_SHIFT;
        free_area_init(max_zone_pfn);
  
-       /*
-        * Fixed mappings, only the page table structure has to be
-        * created - mappings will be set by set_fixmap():
-        */
-       vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
-       fixrange_init(vaddr, FIXADDR_TOP, swapper_pg_dir);
+ #if IS_ENABLED(CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA)
        fixaddr_user_init();
+ #endif
  }
  
  /*
@@@ -214,13 -207,14 +207,13 @@@ void free_initmem(void
  
  pgd_t *pgd_alloc(struct mm_struct *mm)
  {
 -      pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL);
 +      pgd_t *pgd = __pgd_alloc(mm, 0);
  
 -      if (pgd) {
 -              memset(pgd, 0, USER_PTRS_PER_PGD * sizeof(pgd_t));
 +      if (pgd)
                memcpy(pgd + USER_PTRS_PER_PGD,
                       swapper_pg_dir + USER_PTRS_PER_PGD,
                       (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
 -      }
 +
        return pgd;
  }
  
This page took 0.054612 seconds and 4 git commands to generate.