+ x86-kdebugfs-do-not-use-__va-for-getting-setup_data-virt-addr.patch added to -mm tree
Subject: + x86-kdebugfs-do-not-use-__va-for-getting-setup_data-virt-addr.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 10 Dec 2013 15:23:30 -0800
The patch titled
Subject: x86: kdebugfs do not use __va for getting setup_data virt addr
has been added to the -mm tree. Its filename is
x86-kdebugfs-do-not-use-__va-for-getting-setup_data-virt-addr.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/x86-kdebugfs-do-not-use-__va-for-getting-setup_data-virt-addr.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/x86-kdebugfs-do-not-use-__va-for-getting-setup_data-virt-addr.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/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Dave Young <[email protected]>
Subject: x86: kdebugfs do not use __va for getting setup_data virt addr
kdump kernel will use memmap=exactmap kernel cmdline, but __va does not work in case memmap=exactmap, so let's always use ioremap_cache.
---
arch/x86/kernel/kdebugfs.c | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-)
arch/x86/kernel/kdebugfs.c renamed from arch/x86/kernel/kdebugfs.c~x86-kdebugfs-do-not-use-__va-for-getting-setup_data-virt-addr +11 -24
@@ -33,7 +33,6 @@ static ssize_t setup_data_read(struct fistruct setup_data_node *node = file->private_data;unsigned long remain;loff_t pos = *ppos; -struct page *pg;void *p;u64 pa;
@@ -47,18 +46,12 @@ static ssize_t setup_data_read(struct fi count = node->len - pos; pa = node->paddr +sizeof (struct setup_data ) + pos; - pg =pfn_to_page ((pa + count -1 ) >>PAGE_SHIFT ); -if (PageHighMem (pg)) { - p =ioremap_cache (pa, count); -if (!p) -return -ENXIO ; - }else - p =__va (pa); + p =ioremap_cache (pa, count); +if (!p) +return -ENXIO ; remain =copy_to_user (user_buf, p, count); - -if (PageHighMem (pg)) -iounmap (p); +iounmap (p);if (remain)return -EFAULT ;
@@ -109,7 +102,6 @@ static int __init create_setup_data_nodestruct setup_data *data;int error;struct dentry *d; -struct page *pg;u64 pa_data;int no =0 ;
@@ -126,16 +118,12 @@ static int __init create_setup_data_node goto err_dir; } - pg =pfn_to_page ((pa_data+sizeof (*data)-1 ) >>PAGE_SHIFT ); -if (PageHighMem (pg)) { - data =ioremap_cache (pa_data,sizeof (*data)); -if (!data) { -kfree (node); - error = -ENXIO ; - goto err_dir; - } - }else - data =__va (pa_data); + data =ioremap_cache (pa_data,sizeof (*data)); +if (!data) { +kfree (node); + error = -ENXIO ; + goto err_dir; + } node->paddr = pa_data; node->type = data->type;
@@ -143,8 +131,7 @@ static int __init create_setup_data_node error =create_setup_data_node (d, no, node); pa_data = data->next; -if (PageHighMem (pg)) -iounmap (data); +iounmap (data);if (error) goto err_dir; no++;
_
Patches currently in -mm which might be from [email protected] are
kexec-migrate-to-reboot-cpu.patch x86-mm-sparse-warning-fix-for-early_memremap.patch efi-use-early_memremap-and-early_memunmap.patch efi-remove-unused-variables-in-__map_region.patch efi-add-a-wrapper-function-efi_map_region_fixed.patch efi-reserve-boot-service-fix.patch efi-cleanup-efi_enter_virtual_mode-function.patch efi-export-more-efi-table-variable-to-sysfs.patch efi-export-efi-runtime-memory-mapping-to-sysfs.patch efi-pass-kexec-necessary-efi-data-via-setup_data.patch efi-only-print-saved-efi-runtime-maps-instead-of-all-memmap-ranges-for-kexec.patch x86-add-xloadflags-bit-for-efi-runtime-support-on-kexec.patch x86-export-x86-boot_params-to-sysfs.patch x86-reserve-setup_data-ranges-late-after-parsing-memmap-cmdline.patch x86-kdebugfs-do-not-use-__va-for-getting-setup_data-virt-addr.patch