Lines Matching refs:rd_idx
738 u32 rd_idx) in octeon_console_free_bytes() argument
740 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in octeon_console_free_bytes()
743 return ((buffer_size - 1) - (wr_idx - rd_idx)) % buffer_size; in octeon_console_free_bytes()
748 u32 rd_idx) in octeon_console_avail_bytes() argument
750 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in octeon_console_avail_bytes()
754 octeon_console_free_bytes(buffer_size, wr_idx, rd_idx); in octeon_console_avail_bytes()
761 u32 rd_idx, wr_idx; in octeon_console_read() local
775 rd_idx = octeon_read_device_mem32(oct, console->addr + in octeon_console_read()
781 wr_idx, rd_idx); in octeon_console_read()
790 if (rd_idx + bytes_to_read >= console->buffer_size) in octeon_console_read()
791 bytes_to_read = console->buffer_size - rd_idx; in octeon_console_read()
793 octeon_pci_read_core_mem(oct, console->output_base_addr + rd_idx, in octeon_console_read()
798 (rd_idx + bytes_to_read) % in octeon_console_read()