+ um-setup_physmem-stop-using-global-variables.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: um: setup_physmem: stop using global variables
has been added to the -mm tree.  Its filename is
     um-setup_physmem-stop-using-global-variables.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/um-setup_physmem-stop-using-global-variables.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/um-setup_physmem-stop-using-global-variables.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
Subject: um: setup_physmem: stop using global variables

The setup_physmem() function receives uml_physmem and uml_reserved as
parameters and still used these global variables.  Replace such usage with
local variables.

Link: http://lkml.kernel.org/r/1533326330-31677-6-git-send-email-rppt@xxxxxxxxxxxxxxxxxx
Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
Acked-by: Richard Weinberger <richard@xxxxxx>
Cc: Guan Xuetao <gxt@xxxxxxxxxx>
Cc: Ley Foon Tan <ley.foon.tan@xxxxxxxxx>
Cc: Richard Kuo <rkuo@xxxxxxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/um/kernel/physmem.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/arch/um/kernel/physmem.c~um-setup_physmem-stop-using-global-variables
+++ a/arch/um/kernel/physmem.c
@@ -86,7 +86,7 @@ void __init setup_physmem(unsigned long
 	long map_size;
 	int err;
 
-	offset = uml_reserved - uml_physmem;
+	offset = reserve_end - start;
 	map_size = len - offset;
 	if(map_size <= 0) {
 		os_warn("Too few physical memory! Needed=%lu, given=%lu\n",
@@ -96,12 +96,12 @@ void __init setup_physmem(unsigned long
 
 	physmem_fd = create_mem_file(len + highmem);
 
-	err = os_map_memory((void *) uml_reserved, physmem_fd, offset,
+	err = os_map_memory((void *) reserve_end, physmem_fd, offset,
 			    map_size, 1, 1, 1);
 	if (err < 0) {
 		os_warn("setup_physmem - mapping %ld bytes of memory at 0x%p "
 			"failed - errno = %d\n", map_size,
-			(void *) uml_reserved, err);
+			(void *) reserve_end, err);
 		exit(1);
 	}
 
_

Patches currently in -mm which might be from rppt@xxxxxxxxxxxxxxxxxx are

hexagon-switch-to-no_bootmem.patch
of-ignore-sub-page-memory-regions.patch
nios2-use-generic-early_init_dt_add_memory_arch.patch
nios2-switch-to-no_bootmem.patch
um-setup_physmem-stop-using-global-variables.patch
um-switch-to-no_bootmem.patch
unicore32-switch-to-no_bootmem.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux