All of lore.kernel.org
 help / color / mirror / Atom feed
* rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic
@ 2004-10-17  7:36 Norbert Preining
  2004-10-17  9:30 ` William Lee Irwin III
  0 siblings, 1 reply; 7+ messages in thread
From: Norbert Preining @ 2004-10-17  7:36 UTC (permalink / raw)
  To: linux-kernel, luc, Andrew Morton

Hi Luc, hi Andrew, hi list!

I tried to get the unofficial pwc modules from
http://www.saillard.org:8080/pwc/ to work with 2.6.9-rc4-mm1. After
fixing the following two things:
--- pwc-if.c.orig       2004-09-27 01:31:42.000000000 +0200
+++ pwc-if.c    2004-10-17 09:28:26.000000000 +0200
@@ -932,7 +932,7 @@
                if (urb != 0) {
                        if (pdev->iso_init) {
                                Trace(TRACE_MEMORY, "Unlinking URB %p\n", urb);
-                               usb_unlink_urb(urb);
+                               usb_kill_urb(urb);
                        }
                        Trace(TRACE_MEMORY, "Freeing URB\n");
                        usb_free_urb(urb);
@@ -1618,7 +1618,7 @@
        pos = (unsigned long)pdev->image_data;
        while (size > 0) {
                page = kvirt_to_pa(pos);
-               if (remap_page_range(vma, start, page, PAGE_SIZE,
                PAGE_SHARED))
+               if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
                        return -EAGAIN;
 
                start += PAGE_SIZE;

the module compiled and loaded without problem, but when starting
gnomemeeting I get the following kernel BUG and scheduling while atomic:

pwc Philips webcam module version 9.0.2-unofficial loaded.
pwc Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.
pwc Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,
pwc the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.
pwc Philips PCVC680K (Vesta Pro) USB webcam detected.
pwc Registered as /dev/video0.
usbcore: registered new driver Philips webcam
pwc type = 680
pwc type = 680
pwc set_video_mode(176x144 @ 10, palette 15).
pwc decode_size = 2.
pwc type = 680
pwc type = 680
pwc set_video_mode(176x144 @ 10, palette 15).
pwc decode_size = 2.
pwc type = 680
pwc type = 680
pwc set_video_mode(176x144 @ 10, palette 15).
pwc decode_size = 2.
pwc type = 680
pwc type = 680
pwc set_video_mode(176x144 @ 10, palette 15).
pwc decode_size = 2.
pwc type = 680
pwc type = 680
pwc set_video_mode(176x144 @ 10, palette 15).
pwc decode_size = 2.
------------[ cut here ]------------
kernel BUG at mm/rmap.c:468!
invalid operand: 0000 [#1]
PREEMPT 
Modules linked in: pwc snd_usb_audio snd_usb_lib nvidia snd_emu10k1 snd_rawmidi snd_seq_device snd_ac97_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc snd_util_mem snd_hwdep snd soundcore via686a adm1021 i2c_sensor i2c_isa i2c_viapro i2c_core parport_pc lp parport
CPU:    0
EIP:    0060:[<c0145897>]    Tainted: P      VLI
EFLAGS: 00210286   (2.6.9-rc4-mm1) 
EIP is at page_remove_rmap+0x27/0x40
eax: ffffffff   ebx: 00001000   ecx: b4588000   edx: c12a0000
esi: df902624   edi: c12a0000   ebp: 00008000   esp: de18beb4
ds: 007b   es: 007b   ss: 0068
Process gnomemeeting (pid: 11671, threadinfo=de18a000 task=e40bc0c0)
Stack: c013f588 cc027080 00000000 e40bc0c0 c0116090 15000027 b4588000 c041d558 
       b4988000 cc027b48 b4590000 c041d558 c013f6cf 00008000 00000000 00000065 
       3b9a9e6f b4588000 cc027b48 b4590000 c041d558 c013f72d 00008000 00000000 
Call Trace:
 [<c013f588>] zap_pte_range+0x128/0x230
 [<c0116090>] default_wake_function+0x0/0x10
 [<c013f6cf>] zap_pmd_range+0x3f/0x60
 [<c013f72d>] unmap_page_range+0x3d/0x70
 [<c013f84e>] unmap_vmas+0xee/0x200
 [<c0143652>] unmap_region+0x72/0xe0
 [<c01438fd>] do_munmap+0xfd/0x150
 [<c0143990>] sys_munmap+0x40/0x70
 [<c0103fc9>] sysenter_past_esp+0x52/0x71
Code: 00 00 00 00 89 c2 8b 00 f6 c4 08 75 28 83 42 08 ff 0f 98 c0 84 c0 74 11 8b 42 08 40 78 0d 9c 58 fa ff 0d 30 1c 43 c0 50 9d 90 c3 <0f> 0b d4 01 21 f9 31 c0 eb e9 0f 0b d1 01 21 f9 31 c0 eb ce 90 
 <6>note: gnomemeeting[11671] exited with preempt_count 1
scheduling while atomic: gnomemeeting/0x00000001/11671
 [<c03076dd>] schedule+0x4dd/0x4f0
 [<c03080cd>] rwsem_down_read_failed+0x8d/0x190
 [<c012c78b>] .text.lock.futex+0x7/0xbc
 [<c012c64e>] do_futex+0x4e/0x80
 [<c012c760>] sys_futex+0xe0/0xf0
 [<c0119854>] release_console_sem+0xd4/0xe0
 [<c0117388>] mm_release+0x98/0xb0
 [<c011b2ca>] do_exit+0x7a/0x3f0
 [<c01051c0>] do_divide_error+0x0/0x120
 [<c0105520>] do_invalid_op+0x0/0xf0
 [<c0128c61>] search_exception_tables+0x21/0x30
 [<c0105520>] do_invalid_op+0x0/0xf0
 [<c010560b>] do_invalid_op+0xeb/0xf0
 [<c0145897>] page_remove_rmap+0x27/0x40
 [<f0e361a8>] pwc_decompress+0x228/0x2b0 [pwc]
 [<c0307499>] schedule+0x299/0x4f0
 [<c0104a49>] error_code+0x2d/0x38
 [<c0145897>] page_remove_rmap+0x27/0x40
 [<c013f588>] zap_pte_range+0x128/0x230
 [<c0116090>] default_wake_function+0x0/0x10
 [<c013f6cf>] zap_pmd_range+0x3f/0x60
 [<c013f72d>] unmap_page_range+0x3d/0x70
 [<c013f84e>] unmap_vmas+0xee/0x200
 [<c0143652>] unmap_region+0x72/0xe0
 [<c01438fd>] do_munmap+0xfd/0x150
 [<c0143990>] sys_munmap+0x40/0x70
 [<c0103fc9>] sysenter_past_esp+0x52/0x71

Thanks a lot for any information to fix this!

Best wishes

Norbert

-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at>         Technische Universität Wien
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SLUBBERY (n.)
The gooey drips of wax that dribble down the sides of a candle so
beloved by Italian restaurants with Chianti bottles instead of
wallpaper.
			--- Douglas Adams, The Meaning of Liff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic
  2004-10-17  7:36 rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic Norbert Preining
@ 2004-10-17  9:30 ` William Lee Irwin III
  2004-10-17 18:22   ` William Lee Irwin III
  2004-10-17 18:35   ` rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic [u] Martin Schlemmer [c]
  0 siblings, 2 replies; 7+ messages in thread
From: William Lee Irwin III @ 2004-10-17  9:30 UTC (permalink / raw)
  To: Norbert Preining; +Cc: linux-kernel, luc, Andrew Morton

On Sun, Oct 17, 2004 at 09:36:14AM +0200, Norbert Preining wrote:
> @@ -1618,7 +1618,7 @@
>         pos = (unsigned long)pdev->image_data;
>         while (size > 0) {
>                 page = kvirt_to_pa(pos);
> -               if (remap_page_range(vma, start, page, PAGE_SIZE,
>                 PAGE_SHARED))
> +               if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
>                         return -EAGAIN;
>  
>                 start += PAGE_SIZE;
> the module compiled and loaded without problem, but when starting
> gnomemeeting I get the following kernel BUG and scheduling while atomic:

You need to right shift the argument by PAGE_SHIFT.


-- wli

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic
  2004-10-17  9:30 ` William Lee Irwin III
@ 2004-10-17 18:22   ` William Lee Irwin III
  2004-10-17 18:35   ` rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic [u] Martin Schlemmer [c]
  1 sibling, 0 replies; 7+ messages in thread
From: William Lee Irwin III @ 2004-10-17 18:22 UTC (permalink / raw)
  To: Norbert Preining; +Cc: linux-kernel, luc, Andrew Morton

On Sun, Oct 17, 2004 at 09:36:14AM +0200, Norbert Preining wrote:
>> the module compiled and loaded without problem, but when starting
>> gnomemeeting I get the following kernel BUG and scheduling while atomic:

On Sun, Oct 17, 2004 at 02:30:18AM -0700, William Lee Irwin III wrote:
> You need to right shift the argument by PAGE_SHIFT.

We have handled this further in private email and Norbert now has
a working port of his driver.


-- wli

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic [u]
  2004-10-17  9:30 ` William Lee Irwin III
  2004-10-17 18:22   ` William Lee Irwin III
@ 2004-10-17 18:35   ` Martin Schlemmer [c]
  2004-10-17 19:00     ` William Lee Irwin III
  1 sibling, 1 reply; 7+ messages in thread
From: Martin Schlemmer [c] @ 2004-10-17 18:35 UTC (permalink / raw)
  To: William Lee Irwin III; +Cc: Norbert Preining, linux-kernel, luc, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

On Sun, 2004-10-17 at 02:30 -0700, William Lee Irwin III wrote:
> On Sun, Oct 17, 2004 at 09:36:14AM +0200, Norbert Preining wrote:
> > @@ -1618,7 +1618,7 @@
> >         pos = (unsigned long)pdev->image_data;
> >         while (size > 0) {
> >                 page = kvirt_to_pa(pos);
> > -               if (remap_page_range(vma, start, page, PAGE_SIZE,
> >                 PAGE_SHARED))
> > +               if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
> >                         return -EAGAIN;
> >  
> >                 start += PAGE_SIZE;
> > the module compiled and loaded without problem, but when starting
> > gnomemeeting I get the following kernel BUG and scheduling while atomic:
> 
> You need to right shift the argument by PAGE_SHIFT.
> 

I am trying to get vesafb-tng to work with rc4-mm1, but are not sure
when to shift the argument by PAGE_SHIFT, and when not to.  The patches
from you in rc4-mm1 sometimes shifts the second arg, other times the
third, and other times not at all.  Is there a easy way for a mostly
clueless person to figure out when to shift what argument and when not?


Thanks,

-- 
Martin Schlemmer


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic [u]
  2004-10-17 18:35   ` rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic [u] Martin Schlemmer [c]
@ 2004-10-17 19:00     ` William Lee Irwin III
  2004-10-17 19:57       ` Martin Schlemmer [c]
  0 siblings, 1 reply; 7+ messages in thread
From: William Lee Irwin III @ 2004-10-17 19:00 UTC (permalink / raw)
  To: Martin Schlemmer [c]; +Cc: Norbert Preining, linux-kernel, luc, Andrew Morton

On Sun, 2004-10-17 at 02:30 -0700, William Lee Irwin III wrote:
>> You need to right shift the argument by PAGE_SHIFT.

On Sun, Oct 17, 2004 at 08:35:31PM +0200, Martin Schlemmer [c] wrote:
> I am trying to get vesafb-tng to work with rc4-mm1, but are not sure
> when to shift the argument by PAGE_SHIFT, and when not to.  The patches
> from you in rc4-mm1 sometimes shifts the second arg, other times the
> third, and other times not at all.  Is there a easy way for a mostly
> clueless person to figure out when to shift what argument and when not?

Please point out where these inconsistencies occur and I will repair
them.

Only the third argument changed, from a physical address to a pfn.


-- wli

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic [u]
  2004-10-17 19:00     ` William Lee Irwin III
@ 2004-10-17 19:57       ` Martin Schlemmer [c]
  2004-10-17 20:13         ` William Lee Irwin III
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Schlemmer [c] @ 2004-10-17 19:57 UTC (permalink / raw)
  To: William Lee Irwin III; +Cc: Norbert Preining, linux-kernel, luc, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]

On Sun, 2004-10-17 at 12:00 -0700, William Lee Irwin III wrote:
> On Sun, 2004-10-17 at 02:30 -0700, William Lee Irwin III wrote:
> >> You need to right shift the argument by PAGE_SHIFT.
> 
> On Sun, Oct 17, 2004 at 08:35:31PM +0200, Martin Schlemmer [c] wrote:
> > I am trying to get vesafb-tng to work with rc4-mm1, but are not sure
> > when to shift the argument by PAGE_SHIFT, and when not to.  The patches
> > from you in rc4-mm1 sometimes shifts the second arg, other times the
> > third, and other times not at all.  Is there a easy way for a mostly
> > clueless person to figure out when to shift what argument and when not?
> 
> Please point out where these inconsistencies occur and I will repair
> them.
> 
> Only the third argument changed, from a physical address to a pfn.
> 

Its the vesafb-tng patch
(http://dev.gentoo.org/~spock/projects/vesafb-tng/)
Relevant part:

----
        vma.vm_mm = current->active_mm;
        vma.vm_page_prot.pgprot = PROT_READ | PROT_EXEC | PROT_WRITE;

        ret = remap_page_range(&vma, 0x000000, __pa(mem), REAL_MEM_SIZE, vma.vm_page_prot);
        ret += remap_page_range(&vma, 0x0a0000, 0x0a0000, 0x100000 - 0x0a0000, vma.vm_page_prot);
----

I did it as:

----
        vma.vm_mm = current->active_mm;
        vma.vm_page_prot.pgprot = PROT_READ | PROT_EXEC | PROT_WRITE;

        ret = remap_pfn_range(&vma, 0x000000, __pa(mem) >> PAGE_SHIFT, REAL_MEM_SIZE, vma.vm_page_prot);
        ret += remap_pfn_range(&vma, 0x0a0000, 0x0a0000, 0x100000 - 0x0a0000, vma.vm_page_prot);
----


Thanks,
-- 
Martin Schlemmer


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic [u]
  2004-10-17 19:57       ` Martin Schlemmer [c]
@ 2004-10-17 20:13         ` William Lee Irwin III
  0 siblings, 0 replies; 7+ messages in thread
From: William Lee Irwin III @ 2004-10-17 20:13 UTC (permalink / raw)
  To: Martin Schlemmer [c]; +Cc: Norbert Preining, linux-kernel, luc, Andrew Morton

On Sun, 2004-10-17 at 12:00 -0700, William Lee Irwin III wrote:
>> Only the third argument changed, from a physical address to a pfn.

On Sun, Oct 17, 2004 at 09:57:45PM +0200, Martin Schlemmer [c] wrote:
> Its the vesafb-tng patch
> (http://dev.gentoo.org/~spock/projects/vesafb-tng/)
> I did it as:
> 
> ----
>         vma.vm_mm = current->active_mm;
>         vma.vm_page_prot.pgprot = PROT_READ | PROT_EXEC | PROT_WRITE;
> 
>         ret = remap_pfn_range(&vma, 0x000000, __pa(mem) >> PAGE_SHIFT, REAL_MEM_SIZE, vma.vm_page_prot);
>         ret += remap_pfn_range(&vma, 0x0a0000, 0x0a0000, 0x100000 - 0x0a0000, vma.vm_page_prot);

You probably have to shift the physical address in the second call also.


-- wli

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-10-17 20:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-17  7:36 rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic Norbert Preining
2004-10-17  9:30 ` William Lee Irwin III
2004-10-17 18:22   ` William Lee Irwin III
2004-10-17 18:35   ` rc4-mm1 and pwc-unofficial: kernel BUG and scheduling while atomic [u] Martin Schlemmer [c]
2004-10-17 19:00     ` William Lee Irwin III
2004-10-17 19:57       ` Martin Schlemmer [c]
2004-10-17 20:13         ` William Lee Irwin III

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.