Skip to content

Commit

Permalink
Rename fpu_save_init() to copy_fpregs_to_fpstate()
Browse files Browse the repository at this point in the history
  • Loading branch information
kolasa committed Sep 19, 2015
1 parent 34ff623 commit 9271cb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firegl_public.c
Expand Up @@ -6516,7 +6516,7 @@ void ATI_API_CALL KCL_fpu_begin(void)
KCL_fpu_save_init(cur_task);
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
fpu_save_init(&cur_task->thread.fpu);
copy_fpregs_to_fpstate(&cur_task->thread.fpu);
#else
__save_init_fpu(cur_task);
#endif
Expand Down Expand Up @@ -6547,7 +6547,7 @@ void ATI_API_CALL KCL_fpu_begin(void)
KCL_fpu_save_init(cur_task);
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
fpu_save_init(&cur_task->thread.fpu);
copy_fpregs_to_fpstate(&cur_task->thread.fpu);
#else
__save_init_fpu(cur_task);
#endif
Expand Down

2 comments on commit 9271cb8

@Vi0L0
Copy link

@Vi0L0 Vi0L0 commented on 9271cb8 Sep 20, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great finding! It's fixing module crash on load! 👍
May I ask how did you find it? :-)

Now I got other problem, with desktop managers and enviroments, but I will write about it @ https://github.com/kolasa/fglrx-core-15.201

I believe there's a little mistake in this patch, probably typo, cuz I don't see how the check for 4.2 kernel could be applied if it fits 1st check: #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0) (...) #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)

imho you meant:

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

Anyhow great work 👍

@Vi0L0
Copy link

@Vi0L0 Vi0L0 commented on 9271cb8 Sep 20, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah sorry, was wrong, it still crashes on init :-/
Krzysztof is your Radeon working fine with these 4.2 patches?

[ 2.802695] <6>[fglrx] Maximum main memory to use for locked dma buffers: 15626 MBytes.
[ 2.802829] <6>[fglrx] vendor: 1002 device: 67b0 revision: 0 count: 1
[ 2.803044] <6>[fglrx] ioport: bar 4, base 0xe000, size: 0x100
[ 2.803194] general protection fault: 0000 [#1] PREEMPT SMP
[ 2.803234] Modules linked in: e1000e(+) snd mei_me soundcore mei ie31200_edac ptp pps_core edac_core shpchp thermal fan tpm_infineon wmi fglrx(O+) tpm_tis battery tpm video acpi_cpufreq(-) processor evdev mac_hid button amd_iommu_v2 ip_tables x_tables uvesafb sd_mod hid_generic usbhid hid atkbd libps2 ahci libahci libata firewire_ohci xhci_pci ehci_pci firewire_core ehci_hcd xhci_hcd crc_itu_t scsi_mod usbcore usb_common i8042 serio crc32c_generic crc32c_intel btrfs xor raid6_pq
[ 2.803518] CPU: 4 PID: 250 Comm: systemd-modules Tainted: G O 4.2.0-4-ARCH #1
[ 2.803547] Hardware name: MSI MS-7751/Z77A-GD65 (MS-7751), BIOS V10.10 07/23/2013
[ 2.803574] task: ffff88040b719b80 ti: ffff88040b5e8000 task.ti: ffff88040b5e8000
[ 2.803605] RIP: 0010:[] [] firegl_trace+0x61/0x1e0 [fglrx]
[ 2.803703] RSP: 0018:ffff88040b5eba58 EFLAGS: 00010286
[ 2.803726] RAX: 0000000000000001 RBX: ffff88040b5ebb37 RCX: 00000000000012cb
[ 2.803751] RDX: ffffffffa0561430 RSI: ffffffffa03652d1 RDI: 0000000000000004
[ 2.803781] RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffffa05ca440
[ 2.803811] R10: ffffffffa0370270 R11: ffffffffa0370230 R12: 000000000000000d
[ 2.803835] R13: 0000000000000000 R14: 0000000000000000 R15: ffffffffa05ca440
[ 2.803866] FS: 00007f3455f08740(0000) GS:ffff88041ed00000(0000) knlGS:0000000000000000
[ 2.803899] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2.803924] CR2: 00007f48a29ddb30 CR3: 000000040adf7000 CR4: 00000000001406e0
[ 2.803948] Stack:
[ 2.803957] 000012cb0bc62098 ffffffffa0561430 ffff88040b5ebaa8 0000000000000092
[ 2.803992] ffff88040b5ebab8 ffffffff8144f73c ffff88040b5ebb2e ffff88040c2fd800
[ 2.804026] ffff88040b5ebb3e 0000000000000292 0000000000000000 ffffffff811b2ece
[ 2.804062] Call Trace:
[ 2.804075] [] ? pci_conf1_read+0xbc/0x100
[ 2.804098] [] ? __kmalloc+0x2e/0x270
[ 2.804148] [] ? KCL_MEM_SmallBufferAlloc+0x13/0x20 [fglrx]
[ 2.804225] [] ? KCL_STR_Memcpy+0xe/0x10 [fglrx]
[ 2.804249] [] ? klist_next+0xb8/0x110
[ 2.804308] [] ? asyncioSvcInitContext+0x30/0x30 [fglrx]
[ 2.804326] [] ? pci_do_find_bus+0x60/0x60
[ 2.804367] [] ? KAS_Initialize+0x133/0x1d0 [fglrx]
[ 2.804412] [] ? firegl_init+0xe2/0xf0 [fglrx]
[ 2.804458] [] ? firegl_find_interrupt_by_sourceid+0x50/0x50 [fglrx]
[ 2.804510] [] ? IRQMGR_CallbackWrapper+0x20/0x20 [fglrx]
[ 2.804547] [] ? firegl_init_module+0x27e/0x1000 [fglrx]
[ 2.804563] [] ? 0xffffffffa0fd8000
[ 2.804577] [] ? do_one_initcall+0xb3/0x200
[ 2.804591] [] ? __vunmap+0x95/0xf0
[ 2.804604] [] ? kfree+0x14f/0x160
[ 2.804618] [] ? do_init_module+0x60/0x1e7
[ 2.804633] [] ? load_module+0x2206/0x2850
[ 2.804647] [] ? symbol_put_addr+0x40/0x40
[ 2.804661] [] ? SyS_init_module+0x154/0x1a0
[ 2.805205] [] ? entry_SYSCALL_64_fastpath+0x12/0x71
[ 2.805736] Code: df 00 00 00 48 89 54 24 08 89 4c 24 04 ff e6 0f 29 7b f1 0f 29 73 e1 0f 29 6b d1 0f 29 63 c1 0f 29 5b b1 0f 29 53 a1 0f 29 4b 91 <0f> 29 43 81 e8 76 96 fc ff 48 89 c7 e8 5e ae fd ff 44 89 e1 c1
[ 2.807005] RIP [] firegl_trace+0x61/0x1e0 [fglrx]

Please sign in to comment.