Changeset 5f9b4d9a in mainline


Ignore:
Timestamp:
2006-10-16T21:09:25Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fc46884
Parents:
2b017ba
Message:

For the sake of clarity, get rid of negative INR for virtual interrupts.
This way, the code can hurt performance on systems where the non-negative klog INR overlaps
with a frequently used INR such as system clock on amd64 and ia32.

Location:
kernel/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ipc/irq.h

    r2b017ba r5f9b4d9a  
    3838/** Maximum length of IPC IRQ program */
    3939#define IRQ_MAX_PROG_SIZE 10
    40 
    41 #define VIRT_INR_KLOG           -2
    42 #define VIRT_INR_KBDRESTART     -3
    4340
    4441typedef enum {
  • kernel/generic/src/console/klog.c

    r2b017ba r5f9b4d9a  
    4141#include <ipc/irq.h>
    4242
     43/*
     44 * For now, we use 0 as INR.
     45 * However, on some architectures 0 is the clock interrupt (e.g. amd64 and ia32).
     46 * It is therefore desirable to have architecture specific definition of KLOG_VIRT_INR
     47 * in the future.
     48 */
     49#define KLOG_VIRT_INR   0
     50
    4351/* Order of frame to be allocated for klog communication */
    4452#define KLOG_ORDER      0
     
    7583        sysinfo_set_item_val("klog.pages", NULL, 1 << KLOG_ORDER);
    7684        sysinfo_set_item_val("klog.devno", NULL, devno);
    77         sysinfo_set_item_val("klog.inr", NULL, VIRT_INR_KLOG);
     85        sysinfo_set_item_val("klog.inr", NULL, KLOG_VIRT_INR);
    7886
    7987        irq_initialize(&klog_irq);
    8088        klog_irq.devno = devno;
    81         klog_irq.inr = VIRT_INR_KLOG;
     89        klog_irq.inr = KLOG_VIRT_INR;
    8290        klog_irq.claim = klog_claim;
    8391        irq_register(&klog_irq);
Note: See TracChangeset for help on using the changeset viewer.