mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 11:13:30 +00:00
d7443ffb89
I'm not sure precisely in what micro-version the API change was made, so the check for 3.18.0 and above may not be quite correct. But it's at least sufficient for every version currently included in NixOS.
100 lines
3.0 KiB
Diff
100 lines
3.0 KiB
Diff
diff -Nru 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c
|
|
--- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-07-04 10:31:23.000000000 -0400
|
|
+++ 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-08-03 21:21:13.893211082 -0400
|
|
@@ -242,6 +242,14 @@
|
|
#endif
|
|
|
|
// ============================================================
|
|
+
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
|
|
+#define __read_cr4 read_cr4
|
|
+#define __write_cr4 write_cr4
|
|
+#endif
|
|
+
|
|
+// ============================================================
|
|
+
|
|
/* globals */
|
|
|
|
char* firegl = NULL;
|
|
@@ -3495,10 +3503,12 @@
|
|
KCL_PUB_InterruptHandlerWrap,
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
|
|
((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)),
|
|
-#else
|
|
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
|
|
//when MSI enabled. keep irq disabled when calling the action handler,
|
|
//exclude this IRQ from irq balancing (only on one CPU)
|
|
((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),
|
|
+#else
|
|
+ ((useMSI) ? 0 : IRQF_SHARED),
|
|
#endif
|
|
dev_name,
|
|
context);
|
|
@@ -4498,8 +4508,8 @@
|
|
|
|
if (cpu_has_pge)
|
|
{
|
|
- cr4 = read_cr4();
|
|
- write_cr4(cr4 & ~X86_CR4_PGE);
|
|
+ cr4 = __read_cr4();
|
|
+ __write_cr4(cr4 & ~X86_CR4_PGE);
|
|
}
|
|
__flush_tlb();
|
|
|
|
@@ -4512,7 +4522,7 @@
|
|
write_cr0(cr0 & 0xbfffffff);
|
|
if (cpu_has_pge)
|
|
{
|
|
- write_cr4(cr4);
|
|
+ __write_cr4(cr4);
|
|
}
|
|
local_irq_restore(flags);
|
|
|
|
@@ -4539,8 +4549,8 @@
|
|
|
|
if (cpu_has_pge)
|
|
{
|
|
- cr4 = read_cr4();
|
|
- write_cr4(cr4 & ~X86_CR4_PGE);
|
|
+ cr4 = __read_cr4();
|
|
+ __write_cr4(cr4 & ~X86_CR4_PGE);
|
|
}
|
|
__flush_tlb();
|
|
|
|
@@ -4552,7 +4562,7 @@
|
|
write_cr0(cr0 & 0xbfffffff);
|
|
if (cpu_has_pge)
|
|
{
|
|
- write_cr4(cr4);
|
|
+ __write_cr4(cr4);
|
|
}
|
|
local_irq_restore(flags);
|
|
|
|
diff -Nru 15.7/common/lib/modules/fglrx/build_mod/kcl_acpi.c 15.7.new/common/lib/modules/fglrx/build_mod/kcl_acpi.c
|
|
--- 15.7/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2015-07-04 10:31:23.000000000 -0400
|
|
+++ 15.7.new/common/lib/modules/fglrx/build_mod/kcl_acpi.c 2015-08-02 19:59:54.797911610 -0400
|
|
@@ -861,7 +861,10 @@
|
|
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
|
|
if(pdev)
|
|
{
|
|
- pci_ignore_hotplug(pdev);
|
|
+ struct pci_dev *bridge = pdev->bus->self;
|
|
+
|
|
+ pdev->ignore_hotplug = 1;
|
|
+ if(bridge) bridge->ignore_hotplug = 1;
|
|
}
|
|
#endif
|
|
}
|
|
diff -Nru 15.7/common/lib/modules/fglrx/build_mod/kcl_str.c 15.7.new/common/lib/modules/fglrx/build_mod/kcl_str.c
|
|
--- 15.7/common/lib/modules/fglrx/build_mod/kcl_str.c 2015-07-04 10:31:23.000000000 -0400
|
|
+++ 15.7.new/common/lib/modules/fglrx/build_mod/kcl_str.c 2015-08-03 00:35:25.938410435 -0400
|
|
@@ -169,7 +169,7 @@
|
|
const char* s2,
|
|
KCL_TYPE_SizeSigned count)
|
|
{
|
|
- return strnicmp(s1, s2, count);
|
|
+ return strncasecmp(s1, s2, count);
|
|
}
|
|
|
|
/** \brief Locate character in string
|