Commit bd24b20b authored by AlmAck's avatar AlmAck

linux: second batch group update (missing lib32 pkgs)

- updated nvidia, nvidia-340 and nvidia-304 drivers to the latest stable version
- new nvidia-utils pkgbuild! read the .manifest file to auto populate the pkg
- removed gcc49, no more needed to build catalyst
parent 8ac4c485
#
# Core Packages for Chakra, part of chakraos.org
_extramodules=extramodules-4.2-CHAKRA
_extramodules=extramodules-4.5-CHAKRA
_kver="$(cat /usr/lib/modules/${_extramodules}/version)"
_kernelver=4.2.6
_kernelver=4.5
pkgname=acpi_call
_pkgname=acpi_call
pkgver=1.1.0
pkgrel=26
pkgrel=27
pkgdesc="A kernel module that enables you to call parameterless ACPI methods by writing the method name to /proc/acpi/call, e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus)."
arch=('x86_64')
url=("http://github.com/mkottman/acpi_call")
......
# maintainer tetris4@gmail.com
# contributions from: https://www.archlinux.org/packages/community/x86_64/bbswitch/
_extramodules=extramodules-4.2-CHAKRA
_extramodules=extramodules-4.5-CHAKRA
_kver="$(cat /usr/lib/modules/${_extramodules}/version)"
_kernelver=4.2.6
_kernelver=4.5
_rootOfSourceTree=/usr/lib/modules/${_kver}/build
pkgname=bbswitch
pkgver=0.8
pkgrel=20
pkgrel=21
pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('x86_64')
url=("http://github.com/Bumblebee-Project/bbswitch")
......@@ -25,7 +26,7 @@ prepare() {
build() {
cd ${srcdir}/${pkgname}-${pkgver}
make KDIR=/usr/src/linux-${_kver}
make KDIR=${_rootOfSourceTree}
}
package() {
......
#maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
_extramodules=extramodules-4.2-CHAKRA
_extramodules=extramodules-4.5-CHAKRA
_kver="$(cat /usr/lib/modules/${_extramodules}/version)"
_kernelver=4.2.6
_kernelver=4.5
pkgname=broadcom-wl
pkgver=6.30.223.271
pkgrel=1
pkgrel=2
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
url='http://www.broadcom.com/support/802.11/linux_sta.php'
arch=('x86_64')
......
diff -uNr 15.12/common/lib/modules/fglrx//build_mod/firegl_public.c 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c
--- 15.12/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-09-09 00:57:14.000000000 +0200
+++ 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-11-21 00:35:38.000000000 +0100
@@ -191,9 +191,17 @@
#include <linux/string.h>
#include <linux/gfp.h>
#include <linux/swap.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
#include "asm/i387.h"
+#else
+#include <asm/fpu/api.h>
+#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
#include <asm/fpu-internal.h>
+#else
+#include <asm/fpu/internal.h>
+#endif
#endif
#include "firegl_public.h"
@@ -1742,7 +1750,11 @@
unsigned long new, int size)
{
#ifndef __HAVE_ARCH_CMPXCHG
+#if defined(__i386__)
return __fgl_cmpxchg(ptr,old,new,size);
+#elif defined(__x86_64__)
+ return cmpxchg((unsigned long*)ptr,old,new);
+#endif
#else
/* On kernel version 2.6.34 passing a variable or unsupported size
* argument to the __cmpxchg macro causes the default-clause of a
@@ -3503,10 +3515,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)),
+ ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),
+#else
+ ((useMSI) ? (0x0) : (IRQF_SHARED)),
#endif
dev_name,
context);
@@ -5031,7 +5045,7 @@
orig_level = kasSetExecutionLevel(kasContext.exec_level_ih);
ret = kasContext.callback_wrapper_ret(ih_routine, ih_context);
- KCL_DEBUG1(FN_FIREGL_KAS,"Interrupt handler returned 0x%08X\n", ret);
+ KCL_DEBUG1(FN_FIREGL_KAS,"Interrupt handler returned 0x%08X\n", ret);
kasSetExecutionLevel(orig_level);
spin_unlock(&kasContext.lock_ih);
@@ -6436,21 +6450,36 @@
struct fpu *fpu = &tsk->thread.fpu;
if(static_cpu_has(X86_FEATURE_XSAVE)) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
fpu_xsave(fpu);
if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
- return 1;
+#else
+ copy_xregs_to_kernel(&fpu->state.xsave);
+ if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
+#endif
+ return 1;
} else if (static_cpu_has(X86_FEATURE_FXSR)) {
- fpu_fxsave(fpu);
- } else {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ fpu_fxsave(fpu);
+#else
+ copy_fxregs_to_kernel(fpu);
+#endif
+} else {
asm volatile("fnsave %[fx]; fwait"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
: [fx] "=m" (fpu->state->fsave));
- return 0;
+#else
+ : [fx] "=m" (fpu->state.fsave));
+#endif
+ return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
if (unlikely(fpu->state->fxsave.swd & X87_FSW_ES)) {
- asm volatile("fnclex");
- return 0;
+ asm volatile("fnclex");
+ return 0;
}
+#endif
return 1;
}
#endif
@@ -6462,8 +6491,13 @@
void ATI_API_CALL KCL_fpu_begin(void)
{
#ifdef CONFIG_X86_64
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
kernel_fpu_begin();
#else
+ preempt_disable();
+ __kernel_fpu_begin();
+#endif
+#else
#ifdef TS_USEDFPU
struct thread_info *cur_thread = current_thread_info();
struct task_struct *cur_task = get_current();
@@ -6487,8 +6521,12 @@
/* The thread structure is changed with the commit below for kernel 3.3:
* https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
if (cur_task->thread.fpu.has_fpu)
#else
+ if (cur_task->thread.fpu.fpregs_active)
+#endif
+#else
if (cur_task->thread.has_fpu)
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
@@ -6508,7 +6546,12 @@
*/
void ATI_API_CALL KCL_fpu_end(void)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
kernel_fpu_end();
+#else
+ __kernel_fpu_end();
+ preempt_enable();
+#endif
}
/** Create new directory entry under "/proc/...."
diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.c 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.c
--- 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.c 2015-09-09 00:57:14.000000000 +0200
+++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.c 2015-11-21 00:35:38.000000000 +0100
@@ -35,10 +35,10 @@
#include <linux/kernel.h>
#include <linux/sysrq.h>
#include <linux/thread_info.h>
-
+#include "firegl_public.h"
#include "kcl_debug.h"
-extern void* ATI_API_CALL KCL_MEM_SmallBufferAllocAtomic(unsigned long size);
+extern void* ATI_API_CALL KCL_MEM_SmallBufferAllocAtomic(kcl_size_t size);
extern void ATI_API_CALL KCL_MEM_SmallBufferFree(void* p);
extern int ATI_API_CALL firegl_debug_dump(void);
@@ -156,6 +156,47 @@
KCL_MEM_SmallBufferFree(buffer);
}
+/** \brief Print debug information to the OS debug console according to traceMask and debugMask
+ * \param traceMask Bit mask of enabled trace function
+ * \param debugMask Bit mask of enabled debug level. 0-7 total
+ * \param name function name
+ * \param line line number inside the file
+ * \param the print parameter
+ * \param fmt printf-like formatting string
+ * \param ... printf-like parameters
+ */
+void ATI_API_CALL KCL_DEBUG_Print_Trace(unsigned int traceMask, unsigned int debugMask, void* name, int line, long param, const char* fmt, ...)
+{
+ int print = firegl_trace(traceMask, debugMask, name, line, param);
+ if(print)
+ {
+ int len;
+ char* buffer=KCL_MEM_SmallBufferAllocAtomic(MAX_STRING_LENGTH);
+ if(buffer==NULL)
+ return;
+ if(fmt == NULL)
+ {
+ buffer[0] = '\n';
+ buffer[1] = '\0';
+ }
+ else
+ {
+ va_list marker;
+ va_start(marker, fmt);
+ kcl_vsnprintf(buffer,255,fmt, marker);
+ va_end(marker);
+ len = strlen(buffer);
+ if(buffer[len-1] != '\n')
+ {
+ buffer[len]='\n';
+ buffer[len+1]='\0';
+ }
+ }
+ KCL_DEBUG_Print("[fglrx] %s:%d %s", (char*)name, line, buffer);
+ KCL_MEM_SmallBufferFree(buffer);
+ }
+}
+
/** \brief Register keyboard handler to dump module internal state
* \param enable 1 to register the handler, 0 to unregister it
* \return 0
diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.h 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.h
--- 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.h 2015-09-09 00:57:14.000000000 +0200
+++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.h 2015-11-21 00:35:38.000000000 +0100
@@ -64,17 +64,22 @@
FN_GENERIC_MAXIMUM = 0x3f
} FN_TRACE;
-extern void ATI_API_CALL firegl_trace(unsigned int traceMask,
+extern int ATI_API_CALL firegl_trace(unsigned int traceMask,
unsigned int debugMask,
void* name,
int line,
- long param,
- const char* fmt,
- ...);
+ long param);
#define MAX_STRING_LENGTH 512
void ATI_API_CALL KCL_DEBUG_Print(const char* fmt, ...);
+void ATI_API_CALL KCL_DEBUG_Print_Trace(unsigned int traceMask,
+ unsigned int debugMask,
+ void* name,
+ int line,
+ long param,
+ const char* fmt,
+ ...);
int ATI_API_CALL KCL_DEBUG_RegKbdHandler(int enable);
int ATI_API_CALL KCL_DEBUG_RegKbdDumpHandler(int enable);
void ATI_API_CALL KCL_DEBUG_OsDump(void);
@@ -211,102 +216,106 @@
KCL_DEBUG_Print("<6>[fglrx] " fmt, ##arg)
-#define KCL_DEBUG_TRACE(m, p, fmt, arg...) \
- do \
- { \
- firegl_trace(m, \
- FN_DEBUG_TRACE, \
- (void*)__FUNCTION__, \
- (int)(__LINE__), \
- (long)(p), \
- fmt, \
- ##arg); \
+#define KCL_DEBUG_TRACE(m, p, fmt, arg...) \
+ do \
+ { \
+ KCL_DEBUG_Print_Trace(m, \
+ FN_DEBUG_TRACE, \
+ (void*)__FUNCTION__, \
+ (int)(__LINE__), \
+ (long)(p), \
+ fmt, \
+ ##arg); \
} while (0)
#define KCL_DEBUG_TRACEIN KCL_DEBUG_TRACE
-#define KCL_DEBUG_TRACEOUT(m, p, fmt, arg...) \
- do \
- { \
- firegl_trace(m, \
- FN_DEBUG_TRACEOUT, \
- (void*)__FUNCTION__, \
- (int)(__LINE__), \
- (long)(p), \
- fmt, \
- ##arg); \
- } while (0)
-
-#define KCL_DEBUG1(m, fmt, arg...) \
- do \
- { \
- firegl_trace(m, \
- FN_DEBUG_LEVEL1, \
- (void*)__FUNCTION__, \
- (int)__LINE__, \
- 0, \
- fmt, \
- ##arg); \
- } while (0)
-
-#define KCL_DEBUG2(m, fmt, arg...) \
- do \
- { \
- firegl_trace(m, \
- FN_DEBUG_LEVEL2, \
- (void*)__FUNCTION__, \
- (int)__LINE__, \
- 0, \
- fmt, \
- ##arg); \
- } while (0)
-
-#define KCL_DEBUG3(m, fmt, arg...) \
- do \
- { \
- firegl_trace(m, \
- FN_DEBUG_LEVEL3, \
- (void*)__FUNCTION__, \
- (int)__LINE__, \
- 0, \
- fmt, \
- ##arg); \
- } while (0)
-
-#define KCL_DEBUG4(m, fmt, arg...) \
- do \
- { \
- firegl_trace(m, \
- FN_DEBUG_LEVEL4, \
- (void*)__FUNCTION__, \
- (int)__LINE__, \
- 0, \
- fmt, \
- ##arg); \
- } while (0)
-
-#define KCL_DEBUG5(m, fmt, arg...) \
- do \
- { \
- firegl_trace(m, \
- FN_DEBUG_LEVEL5, \
- (void*)__FUNCTION__, \
- (int)__LINE__, \
- 0, \
- fmt, \
- ##arg); \
- } while (0)
-
-#define KCL_DEBUG6(m, fmt, arg...) \
- do \
- { \
- firegl_trace(m, \
- FN_DEBUG_LEVEL6, \
- (void*)__FUNCTION__, \
- (int)__LINE__, \
- 0, \
- fmt, \
- ##arg); \
+#define KCL_DEBUG_TRACEOUT(m, p, fmt, arg...) \
+ do \
+ { \
+ KCL_DEBUG_Print_Trace(m, \
+ FN_DEBUG_TRACEOUT, \
+ (void*)__FUNCTION__, \
+ (int)(__LINE__), \
+ (long)(p), \
+ fmt, \
+ ##arg); \
+ } while (0)
+
+
+#define KCL_DEBUG1(m, fmt, arg...) \
+ do \
+ { \
+ KCL_DEBUG_Print_Trace(m, \
+ FN_DEBUG_LEVEL1, \
+ (void*)__FUNCTION__, \
+ (int)(__LINE__), \
+ 0, \
+ fmt, \
+ ##arg); \
+ } while (0)
+
+#define KCL_DEBUG2(m, fmt, arg...) \
+ do \
+ { \
+ KCL_DEBUG_Print_Trace(m, \
+ FN_DEBUG_LEVEL2, \
+ (void*)__FUNCTION__, \
+ (int)(__LINE__), \
+ 0, \
+ fmt, \
+ ##arg); \
+ } while (0)
+
+#define KCL_DEBUG3(m, fmt, arg...) \
+ do \
+ { \
+ KCL_DEBUG_Print_Trace(m, \
+ FN_DEBUG_LEVEL3, \
+ (void*)__FUNCTION__, \
+ (int)(__LINE__), \
+ 0, \
+ fmt, \
+ ##arg); \
+ } while (0)
+
+
+#define KCL_DEBUG4(m, fmt, arg...) \
+ do \
+ { \
+ KCL_DEBUG_Print_Trace(m, \
+ FN_DEBUG_LEVEL4, \
+ (void*)__FUNCTION__, \
+ (int)(__LINE__), \
+ 0, \
+ fmt, \
+ ##arg); \
+ } while (0)
+
+
+#define KCL_DEBUG5(m, fmt, arg...) \
+ do \
+ { \
+ KCL_DEBUG_Print_Trace(m, \
+ FN_DEBUG_LEVEL5, \
+ (void*)__FUNCTION__, \
+ (int)(__LINE__), \
+ 0, \
+ fmt, \
+ ##arg); \
+ } while (0)
+
+
+#define KCL_DEBUG6(m, fmt, arg...) \
+ do \
+ { \
+ KCL_DEBUG_Print_Trace(m, \
+ FN_DEBUG_LEVEL6, \
+ (void*)__FUNCTION__, \
+ (int)(__LINE__), \
+ 0, \
+ fmt, \
+ ##arg); \
} while (0)
#endif
diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_str.c 15.12b/common/lib/modules/fglrx//build_mod/kcl_str.c
--- 15.12/common/lib/modules/fglrx//build_mod/kcl_str.c 2015-09-09 00:57:14.000000000 +0200
+++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_str.c 2015-11-21 00:35:38.000000000 +0100
@@ -42,6 +42,10 @@
#include "kcl_type.h"
#include "kcl_str.h"
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
+#define strnicmp strncasecmp
+#endif
+
/** \brief Fill memory with a constant byte
* \param s Pointer to memory
* \param c Initializing value
--- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-07-04 16:31:23.000000000 +0200
+++ 15.7b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-08-21 15:26:44.860536831 +0200
@@ -6475,6 +6475,7 @@
*/
struct task_struct *cur_task = current;
preempt_disable();
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
/* The thread structure is changed with the commit below for kernel 3.3:
* https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8
@@ -6483,6 +6484,9 @@
#else
if (cur_task->thread.has_fpu)
#endif
+#else
+ if (cur_task->thread.fpu.fpregs_active)
+#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
KCL_fpu_save_init(cur_task);
#else
--- 15.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-20 18:29:19.488890309 +0200
+++ 15.9b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-20 14:20:51.000000000 +0200
@@ -6505,11 +6505,15 @@
struct task_struct *cur_task = get_current();
preempt_disable();
if (cur_thread->status & TS_USEDFPU)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+ copy_fpregs_to_fpstate(&cur_task->thread.fpu);
+#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
KCL_fpu_save_init(cur_task);
#else
__save_init_fpu(cur_task);
#endif
+#endif
else
clts();
@@ -6531,11 +6535,15 @@
#else
if (cur_task->thread.fpu.fpregs_active)
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+ copy_fpregs_to_fpstate(&cur_task->thread.fpu);
+#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
KCL_fpu_save_init(cur_task);
#else
__save_init_fpu(cur_task);
#endif
+#endif
else
clts();
#endif
--- 15.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-09 00:57:14.000000000 +0200
+++ 15.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-11-03 19:00:09.121884973 +0100
@@ -3412,7 +3412,11 @@
int ATI_API_CALL KCL_MEM_MTRR_AddRegionWc(unsigned long base, unsigned long size)
{
#ifdef CONFIG_MTRR
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
+ return arch_phys_wc_add(base, size);
+#else
return mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
+#endif
#else /* !CONFIG_MTRR */
return -EPERM;
#endif /* !CONFIG_MTRR */
@@ -3421,7 +3425,12 @@
int ATI_API_CALL KCL_MEM_MTRR_DeleteRegion(int reg, unsigned long base, unsigned long size)
{
#ifdef CONFIG_MTRR
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
+ arch_phys_wc_del(reg);
+ return reg;
+#else
return mtrr_del(reg, base, size);
+#endif
#else /* !CONFIG_MTRR */
return -EPERM;
#endif /* !CONFIG_MTRR */
--- 15.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-09 00:57:14.000000000 +0200
+++ 15.9b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-11-02 21:02:06.124639919 +0100
@@ -623,8 +623,13 @@
len = snprintf(buf, request, "%d\n", major);
#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
+ seq_printf(m, "%d\n", major);
+ len = 0;
+#else
len = seq_printf(m, "%d\n", major);
#endif
+#endif
KCL_DEBUG1(FN_FIREGL_PROC, "return len=%i\n",len);
--- 15.12/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-18 19:47:41.000000000 +0100
+++ 15.12b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-19 20:48:13.223261632 +0100
@@ -6450,12 +6450,15 @@
struct fpu *fpu = &tsk->thread.fpu;
if(static_cpu_has(X86_FEATURE_XSAVE)) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- fpu_xsave(fpu);
- if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
-#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
+ copy_xregs_to_kernel(&fpu->state.xsave);