lkml.org 
[lkml]   [2002]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectBIO Usage Error or Conflicting Designs

    Jens,

    Below is a single sector read using ACB.
    If I do not use the code inside "#ifdef USEBIO" and run UP/SMP but no
    highmem, it runs and works like a charm. It is also 100% unchanged code
    from what is in 2.4 patches. The attached oops is generate under
    SMP without highmem and running the USEBIO code.

    CONFIG_NOHIGHMEM=y
    # CONFIG_HIGHMEM4G is not set
    # CONFIG_HIGHMEM64G is not set

    Regards,

    Andre Hedrick
    Linux Disk Certification Project Linux ATA Development


    /*
    * Handler for command with PIO data-in phase
    */
    ide_startstop_t task_in_intr (ide_drive_t *drive)
    {
    byte stat = GET_STAT();
    byte io_32bit = drive->io_32bit;
    struct request *rq = HWGROUP(drive)->rq;
    char *pBuf = NULL;

    if (!OK_STAT(stat,DATA_READY,BAD_R_STAT)) {
    if (stat & (ERR_STAT|DRQ_STAT)) {
    return ide_error(drive, "task_in_intr", stat);
    }
    if (!(stat & BUSY_STAT)) {
    DTF("task_in_intr to Soon wait for next interrupt\n");
    ide_set_handler(drive, &task_in_intr, WAIT_CMD, NULL);
    return ide_started;
    }
    }
    drive->io_32bit = 0;
    DTF("stat: %02x\n", stat);
    #ifdef USEBIO
    if (rq->flags & REQ_CMD) {
    pBuf = ide_map_buffer(rq, &flags);
    } else {
    pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
    }
    #else
    pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
    #endif
    DTF("Read: %p, rq->current_nr_sectors: %d\n", pBuf, (int) rq->current_nr_sectors);
    taskfile_input_data(drive, pBuf, SECTOR_WORDS);
    #ifdef USEBIO
    if (rq->flags & REQ_CMD)
    ide_unmap_buffer(pBuf, &flags);
    rq->sector++;
    rq->errors = 0;
    #endif
    drive->io_32bit = io_32bit;
    if (--rq->current_nr_sectors <= 0) {
    /* (hs): swapped next 2 lines */
    DTF("Request Ended stat: %02x\n", GET_STAT());
    ide_end_request(1, HWGROUP(drive));
    } else {
    ide_set_handler(drive, &task_in_intr, WAIT_CMD, NULL);
    return ide_started;
    }
    return ide_stopped;
    }

    ksymoops 2.3.5 on i686 2.5.2-pre11. Options used
    -V (default)
    -k /proc/ksyms (default)
    -l /proc/modules (default)
    -o /lib/modules/2.5.2-pre11/ (default)
    -m /usr/src/linux/System.map (specified)

    No modules in ksyms, skipping objects
    Warning (read_lsmod): no symbols in lsmod, is /proc/modules a valid lsmod file?
    cpu: 0, clocks: 2659849, slice: 886616
    cpu: 1, clocks: 2659849, slice: 886616
    invalid operand: 0000
    CPU: 0
    EIP: 0010:[<c0136dd9>] Not tainted
    Using defaults from ksymoops -t elf32-i386 -a i386
    EFLAGS: 00010283
    eax: 00038000 ebx: 00000070 ecx: f70e4980 edx: f70e4980
    esi: c0402084 edi: 00038000 ebp: f70e4980 esp: f6a01df4
    ds: 0018 es: 0018 ss: 0018
    Process hdparm (pid: 822, stackpage=f6a01000)
    Stack: 00000000 c0402084 00000002 f70e4980 00001000 00000001 00000000 00000217
    00000000 00000000 00000000 00000000 c01fcafe 00038000 00000070 f6a01e68
    00000000 f7d10640 c0402084 f70e4980 00000002 00000000 00000000 00000002
    Call Trace: [<c01fcafe>] [<c01fd036>] [<c01fd14c>] [<c01fd1f9>] [<c013be3b>]
    [<c013f00f>] [<c013ef70>] [<c012b7ce>] [<c012bc82>] [<c012bb90>] [<c01390ce>]
    [<c0108c7f>]
    Code: 0f 0b c7 44 24 24 70 00 00 00 8b 1d 68 08 3e c0 89 5c 24 20

    >>EIP; c0136dd9 <create_bounce+49/2c0> <=====
    Trace; c01fcafe <__make_request+5e/470>
    Trace; c01fd036 <generic_make_request+126/1b0>
    Trace; c01fd14c <submit_bio+4c/60>
    Trace; c01fd1f9 <submit_bh+99/a0>
    Trace; c013be3b <block_read_full_page+1db/1f0>
    Trace; c013f00f <blkdev_readpage+f/20>
    Trace; c013ef70 <blkdev_get_block+0/40>
    Trace; c012b7ce <do_generic_file_read+2de/460>
    Trace; c012bc82 <generic_file_read+92/190>
    Trace; c012bb90 <file_read_actor+0/60>
    Trace; c01390ce <sys_read+8e/d0>
    Trace; c0108c7f <system_call+33/38>
    Code; c0136dd9 <create_bounce+49/2c0>
    00000000 <_EIP>:
    Code; c0136dd9 <create_bounce+49/2c0> <=====
    0: 0f 0b ud2a <=====
    Code; c0136ddb <create_bounce+4b/2c0>
    2: c7 44 24 24 70 00 00 movl $0x70,0x24(%esp,1)
    Code; c0136de2 <create_bounce+52/2c0>
    9: 00
    Code; c0136de3 <create_bounce+53/2c0>
    a: 8b 1d 68 08 3e c0 mov 0xc03e0868,%ebx
    Code; c0136de9 <create_bounce+59/2c0>
    10: 89 5c 24 20 mov %ebx,0x20(%esp,1)


    1 warning issued. Results may not be reliable.
    \
     
     \ /
      Last update: 2005-03-22 13:15    [W:0.026 / U:0.500 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site