Changeset 28
- Timestamp:
- 06/06/06 11:44:35 (6 years ago)
- Files:
-
- arch/i386/kernel/callgate.c (modified) (13 diffs)
- arch/i386/kernel/cpu/common.c (modified) (2 diffs)
- arch/i386/kernel/process.c (modified) (3 diffs)
- arch/i386/kernel/traps.c (modified) (3 diffs)
- .config (modified) (1 diff)
- .config.old (modified) (1 diff)
- fs/open.c (modified) (2 diffs)
- fs/read_write.c (modified) (1 diff)
- include/asm-i386/callgate.h (modified) (3 diffs)
- include/asm-i386/dapi.h (modified) (6 diffs)
- include/asm-i386/processor.h (modified) (2 diffs)
- include/asm-i386/uaccess.h (modified) (1 diff)
- include/config/net/tulip.h (modified) (1 diff)
- include/linux/autoconf.h (modified) (1 diff)
- kernel/exit.c (modified) (3 diffs)
- kernel/fork.c (modified) (2 diffs)
- kernel/module.c (modified) (9 diffs)
- kernel/params.c (modified) (1 diff)
- kernel/sched.c (modified) (1 diff)
- kernel/signal.c (modified) (1 diff)
- kernel/timer.c (modified) (1 diff)
- mm/vmalloc.c (modified) (2 diffs)
- scripts/basic/docproc (modified) (previous)
- scripts/basic/fixdep (modified) (previous)
- scripts/basic/split-include (modified) (previous)
- scripts/bin2c (modified) (previous)
- scripts/conmakehash (modified) (previous)
- scripts/kallsyms (modified) (previous)
- scripts/kconfig/libkconfig.so (modified) (previous)
- scripts/kconfig/mconf (modified) (previous)
- scripts/lxdialog/lxdialog (modified) (previous)
- scripts/mk_elfconfig (modified) (previous)
- scripts/modpost (modified) (previous)
- scripts/pnmtologo (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
arch/i386/kernel/callgate.c
r27 r28 3 3 * 4 4 * Copyright (C) 2005 David Kaplan 5 * Please read thesis and Documentation/DAPI.txt for details 5 6 * 7 * This file implements calldriver() and various helper routines 8 * for dealing with driver threads 6 9 */ 7 10 … … 110 113 unsigned long map_pages(void *virt_addr, unsigned long count, int ring, void **origmem); 111 114 115 116 //Data structions used 117 //This structure tracks a usage of a mapping 112 118 struct driver_usage { 113 void *driver_id; 114 struct driver_usage *next; 119 void *driver_id; //Mod pointer of the module using this mapping 120 struct driver_usage *next; //Next usage 115 121 }; 116 122 123 //This structure tracks an actual mapping 117 124 struct ring_page_map { 118 125 unsigned long pa; //Physical address of page (page aligned) 119 int num_pages; //Number of consecutive pages in this mapping120 unsigned long vaddr; //Virtual address of page in driver space121 void *origaddr; //Virtual address for vunmap122 struct driver_usage *refs; //Head of linked list of drivers using this mapping123 struct ring_page_map *next; //Next mapping126 int num_pages; //Number of consecutive pages in this mapping 127 unsigned long vaddr; //Virtual address of page in driver space 128 void *origaddr; //Virtual address for vunmap 129 struct driver_usage *refs; //Head of linked list of drivers using this mapping 130 struct ring_page_map *next; //Next mapping 124 131 }; 125 132 133 ///Head pointers 126 134 struct ring_page_map *ring1_head; 127 135 struct ring_page_map *ring2_head; 128 136 129 137 //New way to get current 138 //Notice that the mapping is cahces, so it must only go through map_struct once 130 139 struct task_struct *mod_get_current(void) { 131 140 struct task_struct *tsk=current; … … 135 144 if (!tsk->ring) 136 145 return current; 137 tsk->currentaddr=(struct task_struct*) map_struct( tsk, sizeof(*tsk), tsk->ring, 1, tsk->driver_id);146 tsk->currentaddr=(struct task_struct*) map_struct((unsigned long) tsk, sizeof(*tsk), tsk->ring, 1, tsk->driver_id); 138 147 tsk->currentmapped=1; 139 148 return tsk->currentaddr; 140 149 } 150 151 //Call this when a module is being unloaded, and its mappings are no longer needed 152 //Simply goes through the list and removes this driver from any usage lists 153 //If usage lists are now empty, free the mapping 154 void put_module(void *id) { 155 struct ring_page_map *ptr, **lptr; 156 if ((unsigned long) id & (1 << 29)) //Clever test for ring 1 vs 2 157 lptr=&ring1_head; 158 else 159 lptr=&ring2_head; 160 ptr=*lptr; 161 while (ptr) { 162 struct driver_usage *driverptr, **lastptr; 163 lastptr=&ptr->refs; 164 driverptr=ptr->refs; 165 while (driverptr) { 166 if (driverptr->driver_id == id) { 167 *lastptr=driverptr->next; 168 kfree(driverptr); 169 break; 170 } 171 lastptr=&driverptr->next; 172 driverptr=driverptr->next; 173 } 174 if (!ptr->refs) { 175 //Last one, so remove mapping 176 vunmap(ptr->origaddr); 177 *lptr=ptr->next; 178 kfree(ptr); 179 } else 180 lptr=&ptr->next; 181 182 ptr=*lptr; 183 184 } 185 } 186 187 /* CALLGATE ENTRY ROUTINES 188 * 189 * These are all jump tables 190 * Notice the saving/restoring of segment registers, and lret at the end 191 */ 141 192 142 193 __asm__("callgate_entry2:" … … 310 361 extern void driver_thread_helper(void); 311 362 extern void end_of_driver_thread_helper(void); 363 //Wrapper routine for calling driver specific function, then returning exit code 312 364 __asm__ (".section .text\n" 313 365 ".align 4\n" … … 328 380 __asm__("ring_nop : ret \n\t" 329 381 "end_of_nop:ud2\n\t"); 382 383 //Copies helpers into address space of rings and creates callgates 330 384 void create_driver_helpers(void) 331 385 { … … 356 410 } 357 411 412 358 413 //Cannot call from no context (ie interrupt handler) 414 //See thesis for details 415 //Parameters: 416 // addr -- Address of driver function to call 417 // argv -- Pointer to array of arguments to pass 418 // sizes -- Pointer to array of sizes of each argument 419 // argc -- Number of arguments 420 // mm -- mm_struct to use (usually current) 421 // ptrbitmap -- Bitmask of which arguments are kernel pointers 422 // flags -- Extra flags (such as NO_WAIT) 423 //Returns the return value of the driver 424 //This function WILL SLEEP unless the NO_WAIT flag is passed 359 425 int calldriver(unsigned long addr, void **argv, unsigned int *sizes, int argc, struct mm_struct *mm, unsigned long ptrbitmap, unsigned long flags) 360 426 { … … 429 495 if (ptrbitmap & (1 << (argc))) { 430 496 //this is a ptr, so map it in 431 addrs[argc]=map_struct((unsigned long) argv[argc], sizes[argc], tsk->ring, 0, NULL);497 addrs[argc]=map_struct((unsigned long) argv[argc], sizes[argc], tsk->ring, 1, tsk->driver_id); 432 498 // addrs[argc]=0; 433 499 *(unsigned long*)(regs->esp)=addrs[argc]; … … 447 513 for (i=0; i<argc; i++) { 448 514 if (addrs[i]) { 515 449 516 // ClearPageReserved(pfn_to_page(__pa(argv[i]) >> PAGE_SHIFT)); 450 517 // ClearPageReserved(pfn_to_page((__pa(argv[i]) >> PAGE_SHIFT) + 1)); … … 461 528 } 462 529 530 /* The name for this is a bit of a misnomer since it does not always create a mapping 531 * Parameters: 532 * kernel_struct -- Pointer to kernel structure to map/get mapping for 533 * size -- size of structure 534 * ring -- ring the structure must be mapped into 535 * update_reg -- boolean of whether to update reference lists 536 * driver_id -- ID of driver to put in reference lists 537 * Returns the pointer to pass to driver thread so it can access the structure 538 */ 463 539 unsigned long map_struct(unsigned long kernel_struct, unsigned long size, int ring, int update_ref, void *driver_id) 464 540 { … … 488 564 } 489 565 } 566 //If we found the page, just compute the offset and return 490 567 return (ptr->vaddr + (kernel_struct - PAGE_OF(kernel_struct))); 491 568 } … … 493 570 } 494 571 //Not found 572 //Create a new mapping for either 1 page or 2 pages if the structure spans the page boundary 495 573 ptr=(struct ring_page_map*) kmalloc(sizeof(struct ring_page_map), GFP_KERNEL); 496 574 ptr->pa=__pa(PAGE_OF(kernel_struct)); … … 552 630 553 631 vma->vm_mm=&init_mm; 632 633 //The reason for this mess is that remap_page_range silently fails if the pages 634 //are not marked as reserved 554 635 res1=PageReserved(pfn_to_page(__pa(virt_addr) >> PAGE_SHIFT)); 555 636 res2=PageReserved(pfn_to_page(__pa(virt_addr) >> PAGE_SHIFT)+1); … … 572 653 asm("lcall_nop:lret"); 573 654 655 //Used for some benchmarking 574 656 void do_benchmark(unsigned long lo, unsigned long hi) { 575 657 unsigned long long endval, startval; arch/i386/kernel/cpu/common.c
r6 r28 582 582 mxcsr_feature_mask_init(); 583 583 } 584 584 /* NEW for RingCycle 585 * This function creates a callgate at the next availalbe entry in the GDT 586 * Parameters: 587 * addr -- Address function starts at 588 * dpl -- DPL to be used for gate (probably 2) 589 * params -- Number of 4-byte parameters the function takes 590 */ 585 591 void create_callgate(unsigned long addr, unsigned int dpl, unsigned int params) 586 592 { … … 594 600 BUG(); 595 601 memset(&cpu_gdt_table[cpu][(call_gates_used + GDT_CALLGATE_START)], 0, 8); 602 //See Intel/AMD manual for format specification 596 603 cpu_gdt_table[cpu][(call_gates_used + GDT_CALLGATE_START)].a=__KERNEL_CS << 16 | (addr & 0xffff); 597 604 cpu_gdt_table[cpu][(call_gates_used + GDT_CALLGATE_START)].b=(addr & 0xffff0000) | 1 << 15 | dpl << 13 | 3 << 10 | params; arch/i386/kernel/process.c
r24 r28 351 351 extern void *ring1_nop; 352 352 extern void *ring2_nop; 353 354 /* NEW for RingCycle 355 * 356 * Creates a new driver thread for use at the specified ring 357 */ 353 358 int create_driver_thread(unsigned long flags, int ring) 354 359 { … … 362 367 // regs.edx = (unsigned long) arg; 363 368 369 //Helpers are little wrappers that call driver_exit when done 364 370 if (!ring1_driver_helper) 365 371 create_driver_helpers(); 372 //Create a stack and set segment registers 366 373 if (ring == 1) 367 374 { … … 401 408 tsk->available=0; 402 409 tsk->currentmapped=0; 410 //Mark as high priority 403 411 set_user_nice(tsk, -20); 404 412 return pid; arch/i386/kernel/traps.c
r24 r28 59 59 60 60 //Enable to treat driver gp faults like kernel ones 61 #define DEBUG_DRIVER 61 //If this is turned on, stack traces are given for driver faults 62 //#define DEBUG_DRIVER 62 63 63 64 … … 443 444 DO_ERROR(12, SIGBUS, "stack segment", stack_segment) 444 445 DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, get_cr2()) 446 //This routine unloads a module 447 //Must be seperate because it is run throuhg keventd 445 448 void do_unload_module(void *myaddr) { 446 449 char *name; … … 463 466 goto gp_in_kernel; 464 467 465 printk("data at 67: %x\n%x\n", *(((unsigned long*)idt_table)+2*67),*(((unsigned long*)idt_table)+2*67+1));466 set_system_gate(67, &benchmark_handler);468 //printk("data at 67: %x\n%x\n", *(((unsigned long*)idt_table)+2*67),*(((unsigned long*)idt_table)+2*67+1)); 469 //set_system_gate(67, &benchmark_handler); 467 470 if ((regs->xcs & 3)!=3) { 468 471 //driver thread .config
r24 r28 471 471 # Tulip family network device support 472 472 # 473 # CONFIG_NET_TULIP is not set 473 CONFIG_NET_TULIP=y 474 # CONFIG_DE2104X is not set 475 # CONFIG_TULIP is not set 476 # CONFIG_DE4X5 is not set 477 # CONFIG_WINBOND_840 is not set 478 # CONFIG_DM9102 is not set 474 479 # CONFIG_HP100 is not set 475 480 CONFIG_NET_PCI=y .config.old
r24 r28 506 506 # CONFIG_R8169 is not set 507 507 # CONFIG_SK98LIN is not set 508 # CONFIG_TIGON3 is not set 508 CONFIG_TIGON3=y 509 509 510 510 # fs/open.c
r27 r28 996 996 { 997 997 int retval; 998 998 struct task_struct *tsk; 999 999 /* Report and clear outstanding errors */ 1000 1000 retval = filp->f_error; … … 1008 1008 1009 1009 if (filp->f_op && filp->f_op->flush) { 1010 int err = filp->f_op->flush(filp); 1010 int err; 1011 if ((unsigned long) filp->f_op->flush > PAGE_OFFSET) 1012 err = filp->f_op->flush(filp); 1013 else { 1014 unsigned int size=sizeof(*filp); 1015 void *args[1]={filp}; 1016 err=calldriver((unsigned long) filp->f_op->flush, args, &size, 1, current->mm, 1, 0); 1017 } 1011 1018 if (!retval) 1012 1019 retval = err; 1013 1020 } 1021 if (filp->f_op && (unsigned long) filp->f_op < PAGE_OFFSET) { 1022 tsk=find_worker_thread((unsigned long) filp->f_op, 0); 1023 tsk->available=1; 1024 put_module(tsk->driver_id); 1025 } 1014 1026 1015 1027 dnotify_flush(filp, id); fs/read_write.c
r27 r28 227 227 else { 228 228 CALLDRIVER_PREP4(read, file, buf, count, pos) 229 read_sizes[0]=sizeof(*file); 230 read_sizes[3]=sizeof(*pos); 229 231 ret = calldriver((unsigned long) file->f_op->read, read_args, read_sizes, 4, current->mm, 9, 0); 230 232 } include/asm-i386/callgate.h
r27 r28 1 /* include/asm-i386/callgate.h 2 * NEW for RingCycle 3 * 4 * Defines macros and flags used in arch/i386/kernel/callgate.c 5 * 6 * Written by David Kaplan, 2006 */ 1 7 #ifndef CALLGATE_H 2 8 #define CALLGATE_H … … 26 32 27 33 extern unsigned long map_struct(unsigned long kernel_struct, unsigned long size, int ring, int update_ref, void *driver_id); 34 extern void put_module(void *id); 28 35 //Macros for helping create structures for calldriver 29 36 #define CALLDRIVER_PREP2(name, param1, param2) \ … … 47 54 #define NO_WAIT 0x00000001 48 55 #define USE_RESERVED 0x00000002 56 #define NOUNMAP_PARAM1 0x20000000 57 #define NOUNMAP_PARAM2 0x10000000 49 58 #endif include/asm-i386/dapi.h
r24 r28 1 /* include/asm-i386/dapi.h 2 * NEW for RingCycle 3 * 4 * Defines the Driver API that drivers must be compiled against 5 * to use the new callgates defined in the RingCycle 6 * 7 * This is a bunch of nested macros, so please read comments carefully 8 * Also see Documentation/DAPI.txt for details on how to add stuff 9 * 10 * Written by David Kaplan, 2006 11 */ 1 12 #ifndef ASM_DAPI_H 2 13 #define ASM_DAPI_H … … 56 67 #define CALLGATE_sprintf "pushl $1\n\t" 57 68 58 69 //Callee saved registers (eax is implied since used for return value) 59 70 #define CALLEE "ecx", "edx" 71 72 60 73 #define make_wrap0(func, ret) \ 61 74 static inline ret func ( void ) { \ … … 174 187 : : "g"(param4), "g"(param3), "g"(param2), "g"(param1):CALLEE); \ 175 188 } 189 190 //Notice not inline anymore 176 191 #define make_wrap10(func, ret, type1, ... ) \ 177 192 static ret func (type1 param1, ... ) { \ … … 228 243 #define LCALL5 "lcall $0x130,$0\n\t" 229 244 #define LCALL15 "lcall $0x138,$0\n\t" 230 #define LCALL_NOP "lcall $0x140,$0\n\t" 245 #define LCALL_NOP "lcall $0x140,$0\n\t" //Used for benchmarking 231 246 #ifdef MODULE 232 247 //forward declarations … … 274 289 make_void_wrap2(do_benchmark, unsigned long, unsigned long); 275 290 291 //this must be done using the old method 292 //It's complicated, but basically so the registers are where they should be 293 //on the stack 276 294 static inline void schedule(void) { 277 295 asm("movl $286, %eax\n\t" … … 279 297 ); 280 298 } 299 300 //Self-documenting 281 301 static inline void arediculouslylongnamesoitwontconflictiwthanythingbutgccwontcomplainaboutsprintf(void) { 282 302 sprintf(NULL, NULL, NULL); include/asm-i386/processor.h
r14 r28 115 115 #define X86_EFLAGS_OF 0x00000800 /* Overflow Flag */ 116 116 #define X86_EFLAGS_IOPL 0x00003000 /* IOPL mask */ 117 #define X86_EFLAGS_IOPL1 0x00001000 118 #define X86_EFLAGS_IOPL2 0x00002000 117 #define X86_EFLAGS_IOPL1 0x00001000 /* IOPL=1*/ 118 #define X86_EFLAGS_IOPL2 0x00002000 /*IOPL=2*/ 119 119 #define X86_EFLAGS_NT 0x00004000 /* Nested Task */ 120 120 #define X86_EFLAGS_RF 0x00010000 /* Resume Flag */ … … 299 299 */ 300 300 //#define TASK_SIZE (PAGE_OFFSET) 301 //For RingCycle, userspace is 2GB 301 302 #define TASK_SIZE (0x80000000) 302 303 include/asm-i386/uaccess.h
r20 r28 27 27 28 28 #define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFFUL) 29 //Changed. This was PAGE_OFFSET which is just wrong 29 30 #define USER_DS MAKE_MM_SEG(TASK_SIZE) 30 31 include/config/net/tulip.h
r1 r28 1 # undef CONFIG_NET_TULIP1 #define CONFIG_NET_TULIP 1 include/linux/autoconf.h
r24 r28 472 472 * Tulip family network device support 473 473 */ 474 #undef CONFIG_NET_TULIP 474 #define CONFIG_NET_TULIP 1 475 #undef CONFIG_DE2104X 476 #undef CONFIG_TULIP 477 #undef CONFIG_DE4X5 478 #undef CONFIG_WINBOND_840 479 #undef CONFIG_DM9102 475 480 #undef CONFIG_HP100 476 481 #define CONFIG_NET_PCI 1 kernel/exit.c
r22 r28 833 833 EXPORT_SYMBOL(complete_and_exit); 834 834 835 /* RingCycle 836 * This function is called when a driver thread routine finishes 837 * It pops parameters off the stack if needed 838 * It marks the thread as available 839 * It wakes up people sleeping on this thread 840 * At the end it calls schedule() to run a different thread 841 * 842 * Freeing of page tables used by the thread should be added here 843 * Will need testing to make sure the tables won't be needed again 844 * if the driver thread is used in a place where the context is not valid 845 * 846 */ 835 847 asmlinkage void driver_exit(long exit_code) 836 848 { … … 838 850 struct task_struct *tsk=current; 839 851 int irq; 852 853 //Copy exit code 840 854 tsk->exit_code=exit_code; 855 856 //Mark thread as not runnable 841 857 tsk->state=TASK_UNINTERRUPTIBLE; 858 859 //Freeing of current mapping is not done here anymore 860 //It should be done somewhere, probably when the module is unloaded 842 861 /*if (tsk->currentmapped) { 843 862 ClearPageReserved(pfn_to_page(__pa(tsk) >> PAGE_SHIFT)); … … 846 865 tsk->currentmapped=0; 847 866 }*/ 867 868 //Pop bytes off stack 848 869 irq=tsk->bytes_to_pop; 849 870 task_pt_regs(tsk)->esp+=tsk->bytes_to_pop; 850 871 tsk->bytes_to_pop=0; 872 tsk->currentmapped=0; 873 874 //Mark as availalbe and wake up 851 875 tsk->available=1; 852 876 wake_up(&tsk->wait_driverfinish); 853 877 schedule(); 854 //BUG();855 //for (;;) ;856 878 857 879 } kernel/fork.c
r22 r28 945 945 INIT_LIST_HEAD(&p->sibling); 946 946 init_waitqueue_head(&p->wait_chldexit); 947 948 /* Added for RingCycle 949 * Initialize wait queue that is used when this is a driver thread 950 */ 947 951 init_waitqueue_head(&p->wait_driverfinish); 948 952 p->caller=p; … … 1166 1170 * It copies the process, and if successful kick-starts 1167 1171 * it and waits for it to finish using the VM if required. 1172 * 1173 * RingCycle Note: CLONE_STOPPED is broken, do not use it 1168 1174 */ 1169 1175 long do_fork(unsigned long clone_flags, kernel/module.c
r27 r28 628 628 // mod->exit(); 629 629 testargs=31415926; 630 631 //If this module is running in ring 1 or 2, call the exit routine using the reserved thread 630 632 if (mod->ring) { 631 633 if (mod->exit) … … 633 635 down(&module_mutex); 634 636 //NEW: get rid of threads 637 //Get rid of threads by sending them a SIGKILL 635 638 for (i=0; i<NR_DRIVERTHREADS; i++) { 636 639 //zap_other_threads(mod->worker_threads[i]); … … 648 651 649 652 free_module(mod); 650 print_modules();653 //print_modules(); 651 654 down(¬ify_mutex); 652 655 notifier_call_chain(&module_notify_list, MODULE_STATE_GONE, … … 1890 1893 printk("Driver thread finished with code %d", ret);*/ 1891 1894 //FIXME: Figure out what ring to load module in (how?) 1895 1896 1897 /* Ring the ring argument to determine which ring to load this in*/ 1892 1898 mod->ring=find_ring_arg(mod->args); 1893 printk("Ring we got was %d\n", mod->ring);1899 //printk("Ring we got was %d\n", mod->ring); 1894 1900 if (mod->ring < 0 || mod->ring > 2) 1895 1901 { … … 1899 1905 if (mod->ring!=0) { 1900 1906 spin_lock_init(&mod->threads_lock); 1907 1908 //Create driver threads 1901 1909 for (i=0; i<NR_DRIVERTHREADS; i++) { 1902 1910 pid=create_driver_thread(0, mod->ring); … … 1915 1923 } 1916 1924 schedule(); 1917 printk("mod pointer is %x, per cpu is %d\n", mod, mod->percpu);1918 printk("Invoking init method...\n");1925 1926 //Call the init method on one of the threads 1919 1927 ret=calldriver((unsigned long) mod->init, NULL, NULL, 0, NULL, 0, 0); 1920 1928 } else { … … 1961 1969 } 1962 1970 1971 /* New for RingCycle 1972 * 1973 * Finds a worker thread for the module that uses the given address 1974 * If use_reserved is true, it may use the reserved thread if necessary 1975 */ 1963 1976 struct task_struct *find_worker_thread(unsigned long addr, int use_reserved) 1964 1977 { … … 1977 1990 while (i < (NR_DRIVERTHREADS-1+use_reserved)) { 1978 1991 if (mod->worker_threads[i]->available) { 1992 //If we find one, mark as unavilable and return it 1979 1993 mod->worker_threads[i]->available=0; 1980 1994 tsk=mod->worker_threads[i]; … … 1992 2006 } 1993 2007 2008 //Returns the name of the module that uses the given address 1994 2009 char *find_module_by_thread(unsigned long addr) 1995 2010 { kernel/params.c
r24 r28 60 60 } 61 61 } 62 63 //New for RingCycle, this allows loading the specified module 64 //into a ring of choice (0, 1, or 2) 62 65 if (parameq(param, "ring")) { 63 66 ring=val; kernel/sched.c
r24 r28 4069 4069 #endif /* defined(CONFIG_SMP) && defined(CONFIG_PREEMPT) */ 4070 4070 4071 /* Ringcycle 4072 * This function needs to be fixed 4073 * It should return true if either the caller or the current thread 4074 * has a signal pending. 4075 * That code is here, but has not been tested yet 4076 */ 4071 4077 int mod_signal_pending(struct task_struct *p) { 4078 //return (signal_pending(p->caller) | signal_pending(p)); 4072 4079 return signal_pending(p->caller); 4073 } 4080 4081 } kernel/signal.c
r15 r28 1868 1868 * Death signals, no core dump. 1869 1869 */ 1870 //For RingCycle driver threads 1870 1871 if ((regs->xcs & 3)==1 || (regs->xcs & 3)==2) { 1871 1872 do_exit(-ENODEV); kernel/timer.c
r27 r28 455 455 timer->base = NULL; 456 456 spin_unlock_irq(&base->lock); 457 //If this is a driver thread, use calldriver 457 458 if ((unsigned long) fn > PAGE_OFFSET) 458 459 fn(data); mm/vmalloc.c
r14 r28 245 245 struct vm_struct *get_vm_area(unsigned long size, unsigned long flags) 246 246 { 247 //If this is a request for driver addresses, we start and end using the appropriate constants 248 //Constants are defined in include/asm-i386/pgtable.h 247 249 if (flags & VMALLOC_RING1) 248 250 return __get_vm_area(size, flags, VMALLOC_START_RING1, VMALLOC_END_RING1); … … 391 393 * @gfp_mask: flags for the page level allocator 392 394 * @prot: protection mask for the allocated pages 395 * @flags: NEW FOR RINGCYCLe, specifies region to get vaddress is 393 396 * 394 397 * Allocate enough pages to cover @size from the page level
