Skip to content

Commit

Permalink
Merge pull request #1717 from ghaerr/cache
Browse files Browse the repository at this point in the history
[kernel] Disable track caching for hard drives
  • Loading branch information
ghaerr authored Sep 13, 2023
2 parents 1d0c86e + 7760347 commit f90cfc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions elks/arch/i86/drivers/block/bioshd.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,12 @@ static void do_bioshd_request(void)

buf = req->rq_buffer;
while (count > 0) {
int num_sectors;
int num_sectors = 0;
#ifdef CONFIG_TRACK_CACHE
/* first try reading track cache*/
num_sectors = do_cache_read(drivep, start, buf, req->rq_seg, req->rq_cmd);
if (drivep - drive_info >= DRIVE_FD0) {
/* first try reading track cache*/
num_sectors = do_cache_read(drivep, start, buf, req->rq_seg, req->rq_cmd);
}
if (!num_sectors)
#endif
/* then fallback with retries if required*/
Expand Down
2 changes: 1 addition & 1 deletion elks/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static void INITPROC kernel_banner(seg_t start, seg_t end, seg_t init, seg_t ext
#endif

printk("syscaps %x, %uK base ram\n", sys_caps, SETUP_MEM_KBYTES);
printk("ELKS kernel %s (%u text, %u ftext, %u data, %u bss, %u heap)\n",
printk("ELKS %s (%u text, %u ftext, %u data, %u bss, %u heap)\n",
system_utsname.release,
(unsigned)_endtext, (unsigned)_endftext, (unsigned)_enddata,
(unsigned)_endbss - (unsigned)_enddata, heapsize);
Expand Down

0 comments on commit f90cfc5

Please sign in to comment.