Hi,
ich habe ein Problem die hdshm-Quellen für den den Kernel-2.6.38-15 anzupassen.
vielleicht hat jemand eine Idee bzw. ein Lösung zu diesem Problem.
Ich nutzer diese Patches für die hdshm-Quellen
hdshm.c.diff
Code
/*****************************************************************************/
#include <linux/version.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
#include <linux/autoconf.h>
+#else
+#include <generated/autoconf.h>
+#endif
+
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/string.h>
@@ -127,11 +132,19 @@
return -1;
hdd.hd_pci=hd_pci;
- hdd.bar1=(void*)pci_resource_start(hd_pci,1);
+ hdd.bar1=(void*)pci_resource_start(hd_pci,1);
hdd.start_phys= hdd.bar1+0x02000000+MAP_START;
- hdd.start=ioremap((long)hdd.start_phys,MAP_SIZE);
- hdd.start_nc=ioremap_nocache((long)hdd.start_phys,MAP_SIZE);
- hdd.event_count=0;
+ u64 addr64=(u64) hdd.start_phys & 0xFFFFFFFF;
+ hdd.start=ioremap(addr64,MAP_SIZE);
+ hdd.start_nc=ioremap_nocache(addr64,MAP_SIZE);
+ hdd.event_count=0;
+
+ if (!hdd.start)
+ {
+ printk("hdshm_init_struct: error, hdd.start is NULL while hdd.start_phys=%lx (%llx)\n", hdd.start_phys, addr64);
+ return -1;
+ }
+
printk("hdshm_init_struct: Phys start %p, start %p, nc-start %p\n", hdd.start_phys, hdd.start, hdd.start_nc);
sema_init(&hdd.table_sem,1);
@@ -493,8 +506,12 @@
}
#endif
/* --------------------------------------------------------------------- */
-static int hdshm_ioctl (struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
+static int hdshm_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+#else
+static long hdshm_ioctl (struct file *file, unsigned int cmd, unsigned long arg)
+#endif
{
int ret=0;
struct hdshm_file *bsf=(struct hdshm_file*)file->private_data;
@@ -664,10 +681,14 @@
static struct file_operations hdshm_fops =
{
owner: THIS_MODULE,
- ioctl: hdshm_ioctl,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
+ ioctl: hdshm_ioctl,
+ #else
+ unlocked_ioctl: hdshm_ioctl,
+ #endif
open: hdshm_open,
// read: hdshm_read,
- mmap: hdshm_mmap,
+ mmap: hdshm_mmap,
release: hdshm_release,
};
Display More
hdshm.h.diff
hdshm_gen.h.diff
Code
#ifndef _HDSHM_GEN_H
#define _HDSHM_GEN_H
+#define __x86_64
/* --------------------------------------------------------------------- */
// Needs lock
Die Kerneltreiber "hdshm.ko" wird erstellt aber leider nach dem kopieren nach ../video und ein
leider nicht geladen. Es geht nur bis zum Bootscreen und es wird kein eHD gefunden???
Fehlt hier noch was?
Als Quellen nutze ich den aktuellen Stand aus dem SVN und andere Quellen wurden nicht geändert.
Grüße
TVIA