Skip to content

Instantly share code, notes, and snippets.

Herb Miller Jr. herbmillerjr

Block or report user

Report or block herbmillerjr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@herbmillerjr
herbmillerjr / broadcom-sta-6.30.223.271-r5-linux-5.6.patch
Created Apr 21, 2020
Make proprietary Broadcom wireless drivers compile against Linux kernel 5.6 on Gentoo
View broadcom-sta-6.30.223.271-r5-linux-5.6.patch
diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
index 6157d18..8237ec7 100644
--- a/src/shared/linux_osl.c
+++ b/src/shared/linux_osl.c
@@ -942,7 +942,7 @@ osl_getcycles(void)
void *
osl_reg_map(uint32 pa, uint size)
{
- return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
+ return (ioremap((unsigned long)pa, (unsigned long)size));
@herbmillerjr
herbmillerjr / 30_day_03_maximum_subarray.cpp
Created Apr 3, 2020
LeetCode - #53 Maximum Subarray: Passed
View 30_day_03_maximum_subarray.cpp
#include <vector>
#include <algorithm>
struct SubArray
{
std::vector<int>::iterator low;
std::vector<int>::iterator high;
int sum;
};
@herbmillerjr
herbmillerjr / 30_day_03_maximum_subarray.cpp
Last active Apr 3, 2020
LeetCode - #53 Maximum Subarray: Failed
View 30_day_03_maximum_subarray.cpp
#include <vector>
#include <numeric>
class Solution {
public:
int summize(std::vector<int> nums)
{
int result=std::accumulate(nums.begin(),nums.end(),0);
if (nums.size() == 2)
{
@herbmillerjr
herbmillerjr / nvidia-390.77-drm_no_mode.patch
Created Aug 21, 2018
nvidia drivers 390.77 vs linux kernel 4.18+
View nvidia-390.77-drm_no_mode.patch
diff --git a/kernel/nvidia-drm/nvidia-drm-connector.c b/kernel/nvidia-drm/nvidia-drm-connector.c
index dbda66d..5cc1eca 100644
--- a/kernel/nvidia-drm/nvidia-drm-connector.c
+++ b/kernel/nvidia-drm/nvidia-drm-connector.c
@@ -226,7 +226,7 @@ static int nv_drm_connector_get_modes(struct drm_connector *connector)
if (nv_connector->edid != NULL) {
- drm_mode_connector_update_edid_property(
+ drm_connector_update_edid_property(
View nvidia-390.67-drm_control_allow.patch
diff --git a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c
index 9a8f9f6..22ec88b 100644
--- a/kernel/nvidia-drm/nvidia-drm-drv.c
+++ b/kernel/nvidia-drm/nvidia-drm-drv.c
@@ -634,26 +634,26 @@ static const struct drm_ioctl_desc nv_drm_ioctls[] = {
#if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IMPORT_NVKMS_MEMORY,
nv_drm_gem_import_nvkms_memory_ioctl,
- DRM_CONTROL_ALLOW|DRM_UNLOCKED),
+ DRM_UNLOCKED),
@herbmillerjr
herbmillerjr / virtualbox-modules-5.2.10-pci-bus-slot.patch
Created Apr 22, 2018
virtualbox-modules-5.2.10 vs. kernel 4.17-rc1+
View virtualbox-modules-5.2.10-pci-bus-slot.patch
diff --git a/vboxpci/linux/VBoxPci-linux.c b/vboxpci/linux/VBoxPci-linux.c
index 4484496..a460d5b 100644
--- a/vboxpci/linux/VBoxPci-linux.c
+++ b/vboxpci/linux/VBoxPci-linux.c
@@ -89,7 +89,7 @@ MODULE_VERSION(VBOX_VERSION_STRING " r" RT_XSTR(VBOX_SVN_REV));
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
# define PCI_DEV_GET(v,d,p) pci_get_device(v,d,p)
# define PCI_DEV_PUT(x) pci_dev_put(x)
-# define PCI_DEV_GET_SLOT(bus, devfn) pci_get_bus_and_slot(bus, devfn)
+# define PCI_DEV_GET_SLOT(bus, devfn) pci_get_domain_bus_and_slot(0, bus, devfn)
@herbmillerjr
herbmillerjr / nvidia-390.48-memory-map.patch
Created Apr 22, 2018
nvidia drivers 390.48 vs kernel 4.17
View nvidia-390.48-memory-map.patch
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index fece57566d45..64fc24c4d4c6 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -591,6 +591,7 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,
return tlb_addr;
}
+EXPORT_SYMBOL_GPL(swiotlb_tbl_map_single);
@herbmillerjr
herbmillerjr / virtualbox-modules-5.0.40-page-table.patch
Created Jan 16, 2018
virtualbox-modules-5.0.40 vs. kernel 4.14 release
View virtualbox-modules-5.0.40-page-table.patch
diff --git work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c b/work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
index c9feddf..1acf6de 100644
--- work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
+++ work/vboxdrv/r0drv/linux/memobj-r0drv-linux.c
@@ -901,6 +901,9 @@ static struct page *rtR0MemObjLinuxVirtToPage(void *pv)
union
{
pgd_t Global;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+ p4d_t Four;
@herbmillerjr
herbmillerjr / nvidia-task-stack.patch
Created Nov 24, 2017
Fix missing task_stack definition
View nvidia-task-stack.patch
diff --git a/kernel/common/inc/nv-lock.h b/kernel/common/inc/nv-lock.h
index f2ef557..2880faf 100644
--- a/kernel/common/inc/nv-lock.h
+++ b/kernel/common/inc/nv-lock.h
@@ -13,7 +13,11 @@
#include "conftest.h"
+#include <linux/version.h>
#include <linux/spinlock.h>
@herbmillerjr
herbmillerjr / virtualbox-modules-5.1.30-timer-setup.patch
Created Nov 23, 2017
virtualbox-modules-5.1.30 init_timer_pinned patch for Gentoo
View virtualbox-modules-5.1.30-timer-setup.patch
diff --git a/work/vboxdrv/r0drv/linux/timer-r0drv-linux.c b/work/vboxdrv/r0drv/linux/timer-r0drv-linux.c
index 2bb2bfb..3b4a508 100644
--- work/vboxdrv/r0drv/linux/timer-r0drv-linux.c
+++ work/vboxdrv/r0drv/linux/timer-r0drv-linux.c
@@ -720,9 +720,9 @@ static enum hrtimer_restart rtTimerLinuxHrCallback(struct hrtimer *pHrTimer)
*
* @param ulUser Address of the sub-timer structure.
*/
-static void rtTimerLinuxStdCallback(unsigned long ulUser)
+static void rtTimerLinuxStdCallback(struct timer_list *t)
You can’t perform that action at this time.