rpms/kernel/devel linux-2.6-crash-driver.patch, 1.14, 1.15 config-generic, 1.276, 1.277 config-x86-generic, 1.77, 1.78 config-x86_64-generic, 1.77, 1.78 kernel.spec, 1.1508, 1.1509
Dave Jones
davej at fedoraproject.org
Thu Apr 9 14:04:42 UTC 2009
- Previous message (by thread): rpms/openldap/devel openldap-2.4.12-options.patch, NONE, 1.1 openldap-2.2.13-setugid.patch, 1.3, 1.4 openldap.spec, 1.140, 1.141 openldap-2.4.15-file-option.patch, 1.1, NONE
- Next message (by thread): rpms/grid-packaging-tools/F-10 grid-packaging-tools-wrong-url.patch, NONE, 1.1 grid-packaging-tools.spec, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20358
Modified Files:
config-generic config-x86-generic config-x86_64-generic
kernel.spec
Added Files:
linux-2.6-crash-driver.patch
Log Message:
Bring back the /dev/crash driver. (#492803)
linux-2.6-crash-driver.patch:
Index: linux-2.6-crash-driver.patch
===================================================================
RCS file: linux-2.6-crash-driver.patch
diff -N linux-2.6-crash-driver.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ linux-2.6-crash-driver.patch 9 Apr 2009 14:04:41 -0000 1.15
@@ -0,0 +1,363 @@
+diff --git a/arch/ia64/include/asm/crash.h b/arch/ia64/include/asm/crash.h
+new file mode 100644
+index 0000000..541af84
+--- /dev/null
++++ b/arch/ia64/include/asm/crash.h
+@@ -0,0 +1,90 @@
++#ifndef _ASM_IA64_CRASH_H
++#define _ASM_IA64_CRASH_H
++
++/*
++ * linux/include/asm-ia64/crash.h
++ *
++ * Copyright (c) 2004 Red Hat, Inc. All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++#ifdef __KERNEL__
++
++#include <linux/efi.h>
++#include <linux/mm.h>
++#include <asm/mmzone.h>
++
++static inline void *
++map_virtual(u64 offset, struct page **pp)
++{
++ struct page *page;
++ unsigned long pfn;
++ u32 type;
++
++ if (REGION_NUMBER(offset) == 5) {
++ char byte;
++
++ if (__get_user(byte, (char *)offset) == 0)
++ return (void *)offset;
++ else
++ return NULL;
++ }
++
++ switch (type = efi_mem_type(offset))
++ {
++ case EFI_LOADER_CODE:
++ case EFI_LOADER_DATA:
++ case EFI_BOOT_SERVICES_CODE:
++ case EFI_BOOT_SERVICES_DATA:
++ case EFI_CONVENTIONAL_MEMORY:
++ break;
++
++ default:
++ printk(KERN_INFO
++ "crash memory driver: invalid memory type for %lx: %d\n",
++ offset, type);
++ return NULL;
++ }
++
++ pfn = offset >> PAGE_SHIFT;
++
++ if (!pfn_valid(pfn)) {
++ printk(KERN_INFO
++ "crash memory driver: invalid pfn: %lx )\n", pfn);
++ return NULL;
++ }
++
++ page = pfn_to_page(pfn);
++
++ if (!page->virtual) {
++ printk(KERN_INFO
++ "crash memory driver: offset: %lx page: %lx page->virtual: NULL\n",
++ offset, (unsigned long)page);
++ return NULL;
++ }
++
++ return (page->virtual + (offset & (PAGE_SIZE-1)));
++}
++
++static inline void unmap_virtual(struct page *page)
++{
++ return;
++}
++
++#endif /* __KERNEL__ */
++
++#endif /* _ASM_IA64_CRASH_H */
+diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
+index 6da1f20..2984fb3 100644
+--- a/arch/ia64/kernel/ia64_ksyms.c
++++ b/arch/ia64/kernel/ia64_ksyms.c
+@@ -86,6 +86,9 @@ EXPORT_SYMBOL(ia64_save_scratch_fpregs);
+ #include <asm/unwind.h>
+ EXPORT_SYMBOL(unw_init_running);
+
++#include <linux/efi.h>
++EXPORT_SYMBOL_GPL(efi_mem_type);
++
+ #ifdef ASM_SUPPORTED
+ # ifdef CONFIG_SMP
+ # if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
+diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
+index d4c4307..d1c968f 100644
+--- a/arch/x86/mm/ioremap.c
++++ b/arch/x86/mm/ioremap.c
+@@ -133,6 +133,7 @@ int page_is_ram(unsigned long pagenr)
+ }
+ return 0;
+ }
++EXPORT_SYMBOL_GPL(page_is_ram);
+
+ /*
+ * Fix up the linear direct mapping of the kernel to avoid cache attribute
+diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
+index 43d6ba8..0d81c9a 100644
+--- a/drivers/char/Kconfig
++++ b/drivers/char/Kconfig
+@@ -460,6 +460,8 @@ config LEGACY_PTYS
+ security. This option enables these legacy devices; on most
+ systems, it is safe to say N.
+
++config CRASH
++ tristate "Crash Utility memory driver"
+
+ config LEGACY_PTY_COUNT
+ int "Maximum number of legacy PTY in use"
+diff --git a/drivers/char/Makefile b/drivers/char/Makefile
+index 438f713..1b7767b 100644
+--- a/drivers/char/Makefile
++++ b/drivers/char/Makefile
+@@ -109,6 +109,8 @@ obj-$(CONFIG_PS3_FLASH) += ps3flash.o
+ obj-$(CONFIG_JS_RTC) += js-rtc.o
+ js-rtc-y = rtc.o
+
++obj-$(CONFIG_CRASH) += crash.o
++
+ # Files generated that shall be removed upon make clean
+ clean-files := consolemap_deftbl.c defkeymap.c
+
+diff --git a/drivers/char/crash.c b/drivers/char/crash.c
+new file mode 100644
+index 0000000..e5437de
+--- /dev/null
++++ b/drivers/char/crash.c
+@@ -0,0 +1,128 @@
++/*
++ * linux/drivers/char/crash.c
++ *
++ * Copyright (C) 2004 Dave Anderson <anderson at redhat.com>
++ * Copyright (C) 2004 Red Hat, Inc.
++ */
++
++/******************************************************************************
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ *****************************************************************************/
++
++#include <linux/module.h>
++#include <linux/types.h>
++#include <linux/miscdevice.h>
++#include <linux/init.h>
++#include <asm/io.h>
++#include <asm/uaccess.h>
++#include <asm/types.h>
++#include <asm/crash.h>
++
++#define CRASH_VERSION "1.0"
++
++/*
++ * These are the file operation functions that allow crash utility
++ * access to physical memory.
++ */
++
++static loff_t
++crash_llseek(struct file * file, loff_t offset, int orig)
++{
++ switch (orig) {
++ case 0:
++ file->f_pos = offset;
++ return file->f_pos;
++ case 1:
++ file->f_pos += offset;
++ return file->f_pos;
++ default:
++ return -EINVAL;
++ }
++}
++
++/*
++ * Determine the page address for an address offset value,
++ * get a virtual address for it, and copy it out.
++ * Accesses must fit within a page.
++ */
++static ssize_t
++crash_read(struct file *file, char *buf, size_t count, loff_t *poff)
++{
++ void *vaddr;
++ struct page *page;
++ u64 offset;
++ ssize_t read;
++
++ offset = *poff;
++ if (offset >> PAGE_SHIFT != (offset+count-1) >> PAGE_SHIFT)
++ return -EINVAL;
++
++ vaddr = map_virtual(offset, &page);
++ if (!vaddr)
++ return -EFAULT;
++
++ if (copy_to_user(buf, vaddr, count)) {
++ unmap_virtual(page);
++ return -EFAULT;
++ }
++ unmap_virtual(page);
++
++ read = count;
++ *poff += read;
++ return read;
++}
++
++static struct file_operations crash_fops = {
++ .owner = THIS_MODULE,
++ .llseek = crash_llseek,
++ .read = crash_read,
++};
++
++static struct miscdevice crash_dev = {
++ MISC_DYNAMIC_MINOR,
++ "crash",
++ &crash_fops
++};
++
++static int __init
++crash_init(void)
++{
++ int ret;
++
++ ret = misc_register(&crash_dev);
++ if (ret) {
++ printk(KERN_ERR
++ "crash memory driver: cannot misc_register (MISC_DYNAMIC_MINOR)\n");
++ goto out;
++ }
++
++ ret = 0;
++ printk(KERN_INFO "crash memory driver: version %s\n", CRASH_VERSION);
++out:
++ return ret;
++}
++
++static void __exit
++crash_cleanup_module(void)
++{
++ misc_deregister(&crash_dev);
++}
++
++module_init(crash_init);
++module_exit(crash_cleanup_module);
++
++MODULE_LICENSE("GPL");
+diff --git a/include/asm-x86/crash.h b/include/asm-x86/crash.h
+new file mode 100644
+index 0000000..dfcc006
+--- /dev/null
++++ b/include/asm-x86/crash.h
+@@ -0,0 +1,75 @@
++#ifndef _ASM_I386_CRASH_H
++#define _ASM_I386_CRASH_H
++
++/*
++ * linux/include/asm-i386/crash.h
++ *
++ * Copyright (c) 2004 Red Hat, Inc. All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++#ifdef __KERNEL__
++
++#include <linux/mm.h>
++#include <linux/highmem.h>
++#include <asm/mmzone.h>
++
++extern int page_is_ram(unsigned long);
++
++static inline void *
++map_virtual(u64 offset, struct page **pp)
++{
++ struct page *page;
++ unsigned long pfn;
++ void *vaddr;
++
++ pfn = (unsigned long)(offset >> PAGE_SHIFT);
++
++ if (!page_is_ram(pfn)) {
++ printk(KERN_INFO
++ "crash memory driver: !page_is_ram(pfn: %lx)\n", pfn);
++ return NULL;
++ }
++
++ if (!pfn_valid(pfn)) {
++ printk(KERN_INFO
++ "crash memory driver: invalid pfn: %lx )\n", pfn);
++ return NULL;
++ }
++
++ page = pfn_to_page(pfn);
++
++ vaddr = kmap(page);
++ if (!vaddr) {
++ printk(KERN_INFO
++ "crash memory driver: pfn: %lx kmap(page: %lx) failed\n",
++ pfn, (unsigned long)page);
++ return NULL;
++ }
++
++ *pp = page;
++ return (vaddr + (offset & (PAGE_SIZE-1)));
++}
++
++static inline void unmap_virtual(struct page *page)
++{
++ kunmap(page);
++}
++
++#endif /* __KERNEL__ */
++
++#endif /* _ASM_I386_CRASH_H */
Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.276
retrieving revision 1.277
diff -u -r1.276 -r1.277
--- config-generic 8 Apr 2009 05:16:24 -0000 1.276
+++ config-generic 9 Apr 2009 14:04:41 -0000 1.277
@@ -5,7 +5,7 @@
CONFIG_SMP=y
CONFIG_HOTPLUG_CPU=y
CONFIG_LOCALVERSION=""
-# CONFIG_CRASH_DUMP is not set
+
#
# Code maturity level options
#
@@ -2309,6 +2309,7 @@
#
CONFIG_DVB_CAPTURE_DRIVERS=y
CONFIG_DVB_CORE=m
+CONFIG_DVB_DYNAMIC_MINORS=y
# CONFIG_DVB_FE_CUSTOMISE is not set
@@ -2373,6 +2374,7 @@
CONFIG_DVB_USB_GP8PSK=m
CONFIG_DVB_USB_M920X=m
CONFIG_DVB_USB_NOVA_T_USB2=m
+CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_USB_OPERA1=m
CONFIG_DVB_USB_TTUSB2=m
CONFIG_DVB_USB_UMT_010=m
@@ -2382,7 +2384,6 @@
CONFIG_VIDEO_SAA7146=m
CONFIG_VIDEO_SAA7146_VV=m
CONFIG_VIDEO_TUNER=m
-CONFIG_DVB_USB_CE6230=m
# CONFIG_VIDEO_TUNER_CUSTOMISE is not set
CONFIG_VIDEO_BTCX=m
CONFIG_VIDEO_PVRUSB2=m
@@ -3934,8 +3935,6 @@
CONFIG_FCOE=m
# CONFIG_SCSI_LPFC_DEBUG_FS is not set
-CONFIG_DVB_DYNAMIC_MINORS=y
-
CONFIG_NOP_USB_XCEIV=m
# CONFIG_IMA is not set
@@ -3943,3 +3942,7 @@
# CONFIG_PAGE_POISONING is not set
CONFIG_SLOW_WORK=y
+
+# CONFIG_CRASH_DUMP is not set
+# CONFIG_CRASH is not set
+
Index: config-x86-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-x86-generic,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- config-x86-generic 8 Apr 2009 15:39:51 -0000 1.77
+++ config-x86-generic 9 Apr 2009 14:04:41 -0000 1.78
@@ -347,6 +347,7 @@
CONFIG_CRASH_DUMP=y
# CONFIG_KEXEC_JUMP is not set
CONFIG_PROC_VMCORE=y
+CONFIG_CRASH=m
CONFIG_CRYPTO_DEV_GEODE=m
Index: config-x86_64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-x86_64-generic,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- config-x86_64-generic 8 Apr 2009 15:39:51 -0000 1.77
+++ config-x86_64-generic 9 Apr 2009 14:04:41 -0000 1.78
@@ -258,6 +258,7 @@
CONFIG_CRASH_DUMP=y
CONFIG_PHYSICAL_START=0x1000000
CONFIG_PROC_VMCORE=y
+CONFIG_CRASH=m
CONFIG_DMIID=y
CONFIG_ISCSI_IBFT_FIND=y
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1508
retrieving revision 1.1509
diff -u -r1.1508 -r1.1509
--- kernel.spec 8 Apr 2009 20:51:24 -0000 1.1508
+++ kernel.spec 9 Apr 2009 14:04:41 -0000 1.1509
@@ -637,6 +637,8 @@
Patch681: linux-2.6-mac80211-age-scan-results-on-resume.patch
Patch684: at76-netdev_ops.patch
+Patch800: linux-2.6-crash-driver.patch
+
Patch1515: linux-2.6.29-lirc.patch
# Fix the return code CD accesses when the CDROM drive door is closed
@@ -1183,6 +1185,9 @@
#ApplyPatch linux-2.6-mac80211-age-scan-results-on-resume.patch
ApplyPatch at76-netdev_ops.patch
+# /dev/crash driver.
+ApplyPatch linux-2.6-crash-driver.patch
+
# http://www.lirc.org/
ApplyPatch linux-2.6.29-lirc.patch
@@ -1819,6 +1824,9 @@
# ||----w |
# || ||
%changelog
+* Thu Apr 09 2009 Dave Jones <davej at redhat.com>
+- Bring back the /dev/crash driver. (#492803)
+
* Wed Apr 08 2009 Dave Jones <davej at redhat.com>
- disable MMIOTRACE in non-debug builds (#494584)
- Previous message (by thread): rpms/openldap/devel openldap-2.4.12-options.patch, NONE, 1.1 openldap-2.2.13-setugid.patch, 1.3, 1.4 openldap.spec, 1.140, 1.141 openldap-2.4.15-file-option.patch, 1.1, NONE
- Next message (by thread): rpms/grid-packaging-tools/F-10 grid-packaging-tools-wrong-url.patch, NONE, 1.1 grid-packaging-tools.spec, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list