Re: [PATCH] x86_64: Remove the unused x86_64_task_uses_5level()

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

 



Hi Dave,

At 07/16/2018 09:36 PM, Dave Anderson wrote:

----- Original Message -----
There's no way to enable paging mode on per-task basis. So, Check
for per-task is redundant. Remove the x86_64_task_uses_5level()

Beautiful -- queued for crash-7.2.4:

    https://github.com/crash-utility/crash/commit/61fcad549faa479e6831d5283387f8f2e4ec9202

Thanks again for all of your work in this task,

It's my pleasure. ;-).

Now, seems all the work of 5-level paging support is over.

I will test it again totally.

Thanks,
	dou

   Dave


Signed-off-by: Dou Liyang <douly.fnst@xxxxxxxxxxxxxx>
---
  x86_64.c | 11 ++---------
  1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/x86_64.c b/x86_64.c
index b07d6f2..96f685b 100644
--- a/x86_64.c
+++ b/x86_64.c
@@ -24,7 +24,6 @@ static int x86_64_uvtop(struct task_context *, ulong, physaddr_t *, int);
  static int x86_64_uvtop_level4(struct task_context *, ulong, physaddr_t *, int);
  static int x86_64_uvtop_level4_xen_wpt(struct task_context *, ulong, physaddr_t *, int);
  static int x86_64_uvtop_level4_rhel4_xen_wpt(struct task_context *, ulong, physaddr_t *, int);
-static int x86_64_task_uses_5level(struct task_context *);
  static ulong x86_64_vmalloc_start(void);
  static int x86_64_is_task_addr(ulong);
  static int x86_64_verify_symbol(const char *, ulong, char);
@@ -341,6 +340,7 @@ x86_64_init(int when)
  			if (l5_enabled)
  				machdep->flags |= VM_5LEVEL;
  		}
+
  		if (machdep->flags & VM_5LEVEL) {
  			machdep->machspec->userspace_top = USERSPACE_TOP_5LEVEL;
  			machdep->machspec->page_offset = PAGE_OFFSET_5LEVEL;
@@ -361,7 +361,6 @@ x86_64_init(int when)
  			machdep->uvtop = x86_64_uvtop_level4;  /* 5-level is optional per-task */
  			machdep->kvbase = (ulong)PAGE_OFFSET;
  			machdep->identity_map_base = (ulong)PAGE_OFFSET;
-
  		}
/*
@@ -1915,7 +1914,7 @@ x86_64_uvtop_level4(struct task_context *tc, ulong
uvaddr, physaddr_t *paddr, in
  		goto no_upage;
/* If the VM is in 5-level page table */
-	if (machdep->flags & VM_5LEVEL && x86_64_task_uses_5level(tc)) {
+	if (machdep->flags & VM_5LEVEL) {
  		ulong p4d_pte;
  		/*
  		 *  p4d = p4d_offset(pgd, address);
@@ -1986,12 +1985,6 @@ no_upage:
  	return FALSE;
  }
-static int
-x86_64_task_uses_5level(struct task_context *tc)
-{
-	return FALSE;
-}
-
  static int
  x86_64_uvtop_level4_xen_wpt(struct task_context *tc, ulong uvaddr,
  physaddr_t *paddr, int verbose)
  {
--
2.14.3






--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility



[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux