BUG: using smp_processor_id() in preemptible [00000000] code: Xorg/1157

Bug #560571 reported by mm-iv
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
fglrx-installer (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Sorry, I do not know.

ProblemType: KernelOops
DistroRelease: Ubuntu 10.04
Package: linux-image-2.6.32-19-preempt 2.6.32-19.28
Regression: No
Reproducible: No
ProcVersionSignature: Ubuntu 2.6.32-19.28-preempt 2.6.32.10+drm33.1
Uname: Linux 2.6.32-19-preempt x86_64
NonfreeKernelModules: fglrx
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Annotation: Your system might become unstable now and might need to be restarted.
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: iv 1294 F.... pulseaudio
 /dev/snd/pcmC0D0p: iv 1294 F...m pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfc500000 irq 22'
   Mixer name : 'IDT 92HD73C1X5'
   Components : 'HDA:111d7675,1028029f,00100103'
   Controls : 16
   Simple ctrls : 10
Card1.Amixer.info:
 Card hw:1 'HDMI'/'HDA ATI HDMI at 0xfc010000 irq 17'
   Mixer name : 'ATI R6xx HDMI'
   Components : 'HDA:1002aa01,00aa0100,00100000'
   Controls : 4
   Simple ctrls : 1
Card1.Amixer.values:
 Simple mixer control 'IEC958',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
Date: Fri Apr 9 22:14:26 2010
Failure: oops
Frequency: Once a day.
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta amd64 (20100318)
MachineType: Dell Inc. Studio 1537
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-19-preempt root=UUID=41966431-d8b1-4025-8d7d-6ab3f465760e ro vga=771 quiet splash
RelatedPackageVersions: linux-firmware 1.33
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
Title: BUG: using smp_processor_id() in preemptible [00000000] code: Xorg/1157
dmi.bios.date: 05/27/2009
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A09
dmi.board.name: 0P132H
dmi.board.vendor: Dell Inc.
dmi.board.version: A09
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: A09
dmi.modalias: dmi:bvnDellInc.:bvrA09:bd05/27/2009:svnDellInc.:pnStudio1537:pvrA09:rvnDellInc.:rn0P132H:rvrA09:cvnDellInc.:ct8:cvrA09:
dmi.product.name: Studio 1537
dmi.product.version: A09
dmi.sys.vendor: Dell Inc.

Revision history for this message
mm-iv (mm-iv) wrote :
Revision history for this message
Robert Hooker (sarvatt) wrote :

This is a fglrx bug, kas_spin_lock and KAS_GetExecutionLevel are totally not preempt safe. Unfortunately this is most likely hurting your GPU performance and you would be better off using the -generic kernel. I see you are on a laptop as well, and the preempt kernel very negatively impacts your battery life if that is an issue so that's could be another reason to use the standard kernel.

affects: linux (Ubuntu) → fglrx-installer (Ubuntu)
Changed in fglrx-installer (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
iMac (imac-netstatz) wrote :

Guess I'll be switching to -generic until this is resolved.. battery aside, I prefer preempt for desktop responsiveness.

Revision history for this message
fs (masta2) wrote :

Hi there!

A little bit late!
SOLUTION:

--- firegl_public.c.modified 2017-06-09 16:41:29.334991812 +0200
+++ firegl_public.c 2017-06-08 18:25:25.835817920 +0200
@@ -4273,8 +4273,8 @@
 {
     unsigned long orig_level;

- orig_level = __get_cpu_var(kasExecutionLevel);
- __get_cpu_var(kasExecutionLevel) = level;
+ orig_level = __raw_get_cpu_var(kasExecutionLevel);
+ __raw_get_cpu_var(kasExecutionLevel) = level;

     return orig_level;
 }
@@ -4286,7 +4286,7 @@
  */
 static unsigned long kas_GetExecutionLevel(void)
 {
- return __get_cpu_var(kasExecutionLevel);
+ return __raw_get_cpu_var(kasExecutionLevel);
 }

 /** \brief Type definition for kas_spin_lock() parameter */
@@ -4440,7 +4440,7 @@
     KCL_DEBUG5(FN_FIREGL_KAS,"0x%08X, 0x%08X\n", ih_routine, ih_context);

     //Prevent simultaneous entry on some SMP systems.
- if (test_and_set_bit(0, (void *)&(kasContext.in_interrupts[smp_processor_id()])))
+ if (test_and_set_bit(0, (void *)&(kasContext.in_interrupts[raw_smp_processor_id()])))
     {
         KCL_DEBUG1(FN_FIREGL_KAS, "The processor is handling the interrupt\n");
         return IRQ_NONE;
@@ -4455,7 +4455,7 @@
     kasSetExecutionLevel(orig_level);
     spin_unlock(&kasContext.lock_ih);

- clear_bit(0, (void *)&(kasContext.in_interrupts[smp_processor_id()]));
+ clear_bit(0, (void *)&(kasContext.in_interrupts[raw_smp_processor_id()]));
     KCL_DEBUG5(FN_FIREGL_KAS,"%d\n", ret);

     return ret;

bye
masta

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.