From: Adrian M. <ad...@ne...> - 2007-11-10 14:41:42
|
I am investigating this further, but what seems like a perfectly good command: insw(GDROM_DATA_REG, &sense, 10); Where GDROM_DATA_REG is 0xA5F7080, sense is an array of 5 shorts, is oopsing after what looks like an odd translation of the port address - anybody know more or do I need to parch? (Or have I got this all wrong). / # cat /dev/gdrom [ 29.824304] gdrom_bdops_open [ 29.826695] GDROM open [ 29.832088] Completed: wait_clrbusy [ 29.835477] Completed: gdrom_wait_busy_sleeps [ 29.839529] gdrom_getsense [ 29.842306] Completed: wait_clrbusy [ 29.846006] gdrom_spicommand [ 29.848773] Completed: wait_clrbusy [ 29.852479] Unable to handle kernel paging request at virtual address 405f7080 [ 29.859919] pc = 8c00349c [ 29.862935] *pde = 00000000 [ 29.865463] Oops: 0000 [#1] [ 29.868263] Modules linked in: gdrom cdrom [ 29.872483] [ 29.874015] Pid : 1059, Comm: cat [ 29.878973] PC is at generic_insw+0x1c/0x40 [ 29.883273] PC : 8c00349c SP : 8c5c9cd0 SR : 40008000 TEA : 405f7080 Not tainted [ 29.891449] R0 : 405f7080 R1 : 8c2d9030 R2 : 00000000 R3 : a05f7080 [ 29.898276] R4 : a05f7080 R5 : 8c5c9ce2 R6 : 0000000a R7 : a05f7018 [ 29.905102] R8 : 0000000a R9 : 8c5c9ce2 R10 : 8c017a40 R11 : c0023370 [ 29.911926] R12 : 8cac0780 R13 : c0050728 R14 : 8c5c9cd0 [ 29.917406] MACH: 0000043e MACL: 00000668 GBR : 00000000 PR : 8c003494 [ 29.924221] [ 29.924234] Call trace: [ 29.928358] [<c00223e2>] gdrom_open+0x62/0x260 [gdrom] [ 29.933661] [<c004d2e8>] cdrom_open+0x308/0xb60 [cdrom] [ 29.939050] [<c004d32a>] cdrom_open+0x34a/0xb60 [cdrom] [ 29.944443] [<8c21aeca>] _spin_unlock+0xa/0x60 [ 29.949017] [<8c21aed0>] _spin_unlock+0x10/0x60 [ 29.953689] [<8c02cc54>] __rcu_process_callbacks+0x1d4/0x2c0 [ 29.959527] [<8c02cd58>] rcu_process_callbacks+0x18/0x40 [ 29.965008] [<8c02ca80>] __rcu_process_callbacks+0x0/0x2c0 [ 29.970663] [<8c01d696>] tasklet_action+0x76/0xe0 [ 29.975516] [<8c01d3da>] __do_softirq+0x7a/0x140 [ 29.980274] [<8c01d304>] _local_bh_enable+0x24/0x80 [ 29.985305] [<8c01d40e>] __do_softirq+0xae/0x140 [ 29.990066] [<8c01d526>] do_softirq+0x86/0xa0 [ 29.994563] [<8c01da18>] irq_exit+0x58/0x80 [ 29.998867] [<8c01da1c>] irq_exit+0x5c/0x80 [ 30.003180] [<8c003884>] do_IRQ+0x44/0xa0 [ 30.007313] [<8c0080e4>] ret_from_irq+0x0/0x18 [ 30.011893] [<8c016b00>] emit_log_char+0x0/0x80 [ 30.016562] [<8c003840>] do_IRQ+0x0/0xa0 [ 30.020615] [<8c016b00>] emit_log_char+0x0/0x80 [ 30.025277] [<8c00dccc>] __do_page_fault+0xcc/0x180 [ 30.030309] [<8c008024>] call_dpf+0x10/0x30 [ 30.034620] [<8c0080dc>] ret_from_exception+0x0/0x8 [ 30.039649] [<c004cfe0>] cdrom_open+0x0/0xb60 [cdrom] [ 30.044873] [<c00222e2>] gdrom_bdops_open+0x22/0x60 [gdrom] [ 30.050612] [<c00222e2>] gdrom_bdops_open+0x22/0x60 [gdrom] [ 30.056361] [<8c0a761e>] do_open+0x7e/0x400 [ 30.060672] [<8c0a7cae>] blkdev_open+0x2e/0xa0 [ 30.065247] [<8c0a7c80>] blkdev_open+0x0/0xa0 [ 30.069742] [<8c071ab0>] __dentry_open+0xf0/0x300 [ 30.074594] [<8c071dac>] nameidata_to_filp+0x4c/0x80 [ 30.079715] [<8c071e28>] do_filp_open+0x48/0x60 [ 30.084382] [<8c21b286>] _spin_lock_irqsave+0x26/0x40 [ 30.089588] [<8c21abd6>] _spin_lock+0x16/0x40 [ 30.094083] [<8c1272a0>] find_next_zero_bit+0x0/0xa0 [ 30.099198] [<8c21aeca>] _spin_unlock+0xa/0x60 [ 30.103780] [<8c21aed0>] _spin_unlock+0x10/0x60 [ 30.108452] [<8c071912>] get_unused_fd_flags+0xb2/0x140 [ 30.113843] [<8c071e70>] do_sys_open+0x30/0xc0 [ 30.118424] [<8c071e84>] do_sys_open+0x44/0xc0 [ 30.123005] [<8c071f34>] sys_open+0x14/0x20 [ 30.127319] [<8c071f20>] sys_open+0x0/0x20 [ 30.131534] [<8c008238>] syscall_call+0xc/0x10 [ 30.136135] [ 30.137647] Process: cat (pid: 1059, stack limit = 8c5c8001) [ 30.143485] Stack: (0x8c5c9cd0 to 0x8c5ca000) [ 30.147970] 9cc0: c00223e2 8c5c9ce0 8c5817e0 ffffff85 [ 30.156503] 9ce0: c004d2e8 8c5c9d00 c0050728 c004d32a 8c5c9d00 c0050728 8c492180 ffffff85 [ 30.165036] 9d00: 8c2df760 8c802094 8c2e0a48 8c21aeca 8c21aed0 8c5c9d18 8c02cc54 8c5c9d20 [ 30.173569] 9d20: 8c02cd58 8c5c9d34 8c2df784 00000000 8c02ca80 8c01d696 8c5c9d40 ffffff0f [ 30.182102] 9d40: 8c01d3da 8c01d304 8c5c9d4c 8c01d40e 8c5c9d54 8c01d526 8c5c9d74 00000023 [ 30.190635] 9d60: 00000012 8c2db2ac 00000000 8c2e4b00 000000f0 8c01da18 8c01da1c 8c5c9d80 [ 30.199168] 9d80: 8c003884 8c5c9d8c 0000001d 8c0080e4 8c5c9e00 8c016b00 8c003840 ffffffff [ 30.207701] 9da0: 00000000 00000000 40008000 8c4bbf70 00000001 8c280e68 00000000 00000001 [ 30.216235] 9dc0: 8c2db6a0 8c2a69bc 8c016b00 8c2db2ac 00000012 8c00dccc 8c5c9de8 8ca40140 [ 30.224768] 9de0: c0050728 0ca4953e 8c008024 8c5c9e88 c0050728 8cac0780 8c96a1b4 8c0080dc [ 30.233301] 9e00: c0050728 00000000 c004cfe0 00000168 8c5c8000 8c4bbf70 8c492180 8c802094 [ 30.241834] 9e20: 8cac0780 00000001 8c802094 8c492180 8c6ca160 8c96a1b4 00000000 00000000 [ 30.250367] 9e40: 00000000 00000000 00000000 c00222e2 40008001 00000000 00001bc7 32978c21 [ 30.258900] 9e60: ffffffff 00000040 c00222e2 8c5c9e88 8c80200c 8c802040 8c96a1b4 8c6ca160 [ 30.267433] 9e80: 8cac0780 8c802094 8c0a761e 8c5c9e98 8c802000 8cac0780 8c80207c 00000000 [ 30.275966] 9ea0: c00233e0 00000000 8c0a7cae 8c5c9ec8 8c0a7c80 00000018 8c96a1b4 fffffff4 [ 30.284499] 9ec0: 8c802000 8cac0780 8c071ab0 8c5c9edc 8c40cca0 00000000 8cac0780 8cac079c [ 30.293033] 9ee0: 8cac07fc 8c96dc94 8c071dac 8c5c9f0c fffff000 00000018 ffffff9c 8c98a000 [ 30.301566] 9f00: 8c5c9f18 8cac0780 00000000 8c071e28 8c5c9f18 00008000 8c96dc94 8c40cca0 [ 30.310099] 9f20: 8c21b286 8c21abd6 8c5c9f44 00000101 00000001 00000000 8c1272a0 8c21aeca [ 30.318632] 9f40: 8c21aed0 8c5c9f48 8c071912 8c5c9f50 00008000 8c4182e4 8c071e70 00008001 [ 30.327165] 9f60: 00000000 8cac0780 8c071e84 8c5c9f78 00000003 00008000 8c071f34 8c5c9f98 [ 30.335698] 9f80: 7bc60f95 00489964 ffffff0f 00000001 8c5c9ff8 8c071f20 8c008238 7bc60d78 [ 30.344231] 9fa0: 00000005 fffffffa 00000018 00000005 7bc60f95 00008000 00000018 004779e4 [ 30.352764] 9fc0: 7bc60dac 004a7008 00000002 fffffffe 00489964 7bc60f95 7bc60d78 7bc60d78 [ 30.361297] 9fe0: 00448158 00451da2 00008001 00000000 0000003d 0000006c 0000004c 00000160 Segmentation fault |
From: Paul M. <le...@li...> - 2007-11-10 15:22:38
|
On Sat, Nov 10, 2007 at 02:41:15PM +0000, Adrian McMenamin wrote: > I am investigating this further, but what seems like a perfectly good > command: > > insw(GDROM_DATA_REG, &sense, 10); > > Where GDROM_DATA_REG is 0xA5F7080, sense is an array of 5 shorts, is > oopsing after what looks like an odd translation of the port address - > anybody know more or do I need to parch? (Or have I got this all wrong). > That's your problem, insw goes through ioport_map(), which in the generic path wraps to the generic_io_base, which the Dreamcast sets to P2. The bogus address you're hitting is a result of the address wrapping around. So I suggest you change your DATA_REG to 0x05f7080 and see how that goes. |
From: Adrian M. <ad...@ne...> - 2007-11-10 15:25:47
|
On Sun, 2007-11-11 at 00:21 +0900, Paul Mundt wrote: > > The bogus address you're hitting is a result of the address wrapping > around. So I suggest you change your DATA_REG to 0x05f7080 and see how > that goes. I'm just going to write my own functions for this based on the SH64 ones - or at least the ones that were in SH64 |
From: Paul M. <le...@li...> - 2007-11-10 15:30:23
|
On Sat, Nov 10, 2007 at 03:25:08PM +0000, Adrian McMenamin wrote: > On Sun, 2007-11-11 at 00:21 +0900, Paul Mundt wrote: > > The bogus address you're hitting is a result of the address wrapping > > around. So I suggest you change your DATA_REG to 0x05f7080 and see how > > that goes. > > I'm just going to write my own functions for this based on the SH64 ones > - or at least the ones that were in SH64 What on earth for? You should be letting ioport_map() take care of the segment offset for you, rather than trying to hack around it. Fix your register addresses, don't hack around them with bogus I/O routines. The SH64 ones are in the progress of switching over to the stock SH ones, primarily because of this reason (and the fact that P1/P2 assumptions are just bogus on quite a number of CPUs at this point, so having the generic routines do the right thing is the only portable way to go).. |