linux/mm/bounce.c
<<
<(this);opt vimg nput typ>2lhidden" nam>2lnavtargeonstion>2lopt vimg nput typ>2ltext" nam>2lrch" metid2lrch" mept vimgbutt/optyp>2l6O1 <0">Sch" m2lhidden" nam>2lajaxalookupetid2lajaxalookupettion>2lopt hreform t hrefodivass="lxrheadingbott/m/a>v odivaid2lfile_conten0s" <#L1etid2lL1etss="lxr_ineetnam>2lL1e>ref1orova class="lxrcommen0">/* nce.c" buffer hand_ing m block devicespa <#L2etid2lL2etss="lxr_ineetnam>2lL2e>ref2orova class="lxrcommen0"> *pa <#L3etid2lL3etss="lxr_ineetnam>2lL3e>ref3orova class="lxrcommen0"> * - Split from ht.pmem.cpa <#L4etid2lL4etss="lxr_ineetnam>2lL4e>ref4orova class="lxrcommen0"> */pa <#L5etid2lL5etss="lxr_ineetnam>2lL5e>ref5orov/<#L6etid2lL6etss="lxr_ineetnam>2lL6e>ref6orov#include <ux+v3/bo.horov;"><#L7etid2lL7etss="lxr_ineetnam>2lL7e>ref7orov#include <ux+v3/export.horov;"><#L8etid2lL8etss="lxr_ineetnam>2lL8e>ref8orov#include <ux+v3/swap.horov;"><#L9etid2lL9etss="lxr_ineetnam>2lL9e>ref9orov#include <ux+v3/gfp.horov;"><#L10etid2lL10etss="lxr_ineetnam>2lL10e>re.8.1ov#include <ux+v3/bio.horov;"><#L11etid2lL11etss="lxr_ineetnam>2lL11e>re11.1ov#include <ux+v3/pagemap.horov;"><#L12etid2lL12etss="lxr_ineetnam>2lL12e>re12orov#include <ux+v3/bempool.horov;"><#L13etid2lL13etss="lxr_ineetnam>2lL13e>re13.1ov#include <ux+v3/blkdev.horov;"><#L14etid2lL14etss="lxr_ineetnam>2lL14e>re14.1ov#include <ux+v3/init.horov;"><#L15etid2lL15etss="lxr_ineetnam>2lL15e>re15.1ov#include <ux+v3/hash.horov;"><#L16etid2lL16etss="lxr_ineetnam>2lL16e>re16orov#include <ux+v3/ht.pmem.horov;"><#L17etid2lL17etss="lxr_ineetnam>2lL17e>re17orov#include <ux+v3/bootmem.horov;"><#L18etid2lL18etss="lxr_ineetnam>2lL18e>re18orov#include <asm/tlbflush.horov;"><#L19etid2lL19etss="lxr_ineetnam>2lL19e>re19orov/<#L20etid2lL20etss="lxr_ineetnam>2lL20e>re28.1ov#include <trace/even0s/block.horov;"><#L21etid2lL21etss="lxr_ineetnam>2lL21e>re21orov/<#L22etid2lL22etss="lxr_ineetnam>2lL22e>re22orov#define POOL_SIZEorov href 64/<#L23etid2lL23etss="lxr_ineetnam>2lL23e>re23orov#define ISA_POOL_SIZEorov h16/<#L24etid2lL24etss="lxr_ineetnam>2lL24e>re24orov/<#L25etid2lL25etss="lxr_ineetnam>2lL25e>re25.1ovtic/gf bempool_torov *page_poolorov, *isa_page_poolorov<#L26etid2lL26etss="lxr_ineetnam>2lL26e>re26orov/<#L27etid2lL27etss="lxr_ineetnam>2lL27e>re27orov#if definedorov(CONFIG_HIGHMEMorov) || definedorov(CONFIG_NEED_BOUNCE_POOLorov)/<#L28etid2lL28etss="lxr_ineetnam>2lL28e>re28.1ovtic/gf __initorov int init_emergency_poolorov(void)/<#L29etid2lL29etss="lxr_ineetnam>2lL29e>re29orov{v<#L30etid2lL30etss="lxr_ineetnam>2lL30e>re30orov#if definedorov(CONFIG_HIGHMEMorov) && !definedorov(CONFIG_MEMORY_HOTPLUGorov)/<#L31etid2lL31etss="lxr_ineetnam>2lL31e>re31orov href if (baxapfnorov <= baxalowapfnorov)/<#L32etid2lL32etss="lxr_ineetnam>2lL32e>re32orov href e14.12"0<#L33etid2lL33etss="lxr_ineetnam>2lL33e>re33orov#endif/<#L34etid2lL34etss="lxr_ineetnam>2lL34e>re34orov/<#L35etid2lL35etss="lxr_ineetnam>2lL35e>re35orov href page_poolorov = bempool_create_page_poolorov(POOL_SIZEorov, 0)<#L36etid2lL36etss="lxr_ineetnam>2lL36e>re36orov href BUG_ONorov(!page_poolorov)<#L37etid2lL37etss="lxr_ineetnam>2lL37e>re37orov href printkorov(< class="lxrstring">"nce.c" pool size: %d pages\n"pa POOL_SIZEorov)<#L38etid2lL38etss="lxr_ineetnam>2lL38e>re38orov/<#L39etid2lL39etss="lxr_ineetnam>2lL39e>re39orov href e14.12"0<#L40etid2lL40etss="lxr_ineetnam>2lL40e>re40orov}/<#L41etid2lL41etss="lxr_ineetnam>2lL41e>re41orov/<#L42etid2lL42etss="lxr_ineetnam>2lL42e>re42orovaopf="../+code=__initcall"ass="lxrr=".">__initcallorov(init_emergency_poolorov)<#L43etid2lL43etss="lxr_ineetnam>2lL43e>re43orov#endif/<#L44etid2lL44etss="lxr_ineetnam>2lL44e>re44orov/<#L45etid2lL45etss="lxr_ineetnam>2lL45e>re45.1ov#ifdef CONFIG_HIGHMEMorov/<#L46etid2lL46etss="lxr_ineetnam>2lL46e>re46orova class="lxrcommen0">/*pa <#L47etid2lL47etss="lxr_ineetnam>2lL47e>re47orova class="lxrcommen0"> * ht.pmem version, map in to vecpa <#L48etid2lL48etss="lxr_ineetnam>2lL48e>re48orova class="lxrcommen0"> */pa <#L49etid2lL49etss="lxr_ineetnam>2lL49e>re49.1ovtic/gf void nce.c"_copy_vecorov(struct nio_vecorov *toorov, unsigned char *vfromorov)/<#L50etid2lL50etss="lxr_ineetnam>2lL50e>re50orov{v<#L51etid2lL51etss="lxr_ineetnam>2lL51e>re51orov href unsigned long flagsorov<#L52etid2lL52etss="lxr_ineetnam>2lL52e>re52orov href unsigned char *vtoorov<#L53etid2lL53etss="lxr_ineetnam>2lL53e>re53orov/<#L54etid2lL54etss="lxr_ineetnam>2lL54e>re54orov href local_irq_saveorov(flagsorov)<#L55etid2lL55etss="lxr_ineetnam>2lL55e>re55orov href vtoorov = kmap_atomicorov(toorov-;"><nv_pageorov)<#L56etid2lL56etss="lxr_ineetnam>2lL56e>re56orov href bemcpyorov(vtoorov + toorov-;"><bv_offsetorov, vfromorov, toorov-;"><bv_lenorov)<#L57etid2lL57etss="lxr_ineetnam>2lL57e>re57orov href kunmap_atomicorov(vtoorov)<#L58etid2lL58etss="lxr_ineetnam>2lL58e>re58orov href local_irq_restoreorov(flagsorov)<#L59etid2lL59etss="lxr_ineetnam>2lL59e>re59orov}/<#L60etid2lL60etss="lxr_ineetnam>2lL60e>re60orov/<#L61etid2lL61etss="lxr_ineetnam>2lL61e>re61.1ov#else a class="lxrcommen0">/* CONFIG_HIGHMEM */pa <#L62etid2lL62etss="lxr_ineetnam>2lL62e>re62orov/<#L63etid2lL63etss="lxr_ineetnam>2lL63e>re63orov#define nce.c"_copy_vecorov(toorov, vfromorov)href \/<#L64etid2lL64etss="lxr_ineetnam>2lL64e>re64orov href bemcpyorov(page_addressorov((toorov)-;"><nv_pageorov) + (toorov)-;"><bv_offsetorov, vfromorov, (toorov)-;"><bv_lenorov)/<#L65etid2lL65etss="lxr_ineetnam>2lL65e>re65orov/<#L66etid2lL66etss="lxr_ineetnam>2lL66e>re66orov#endif a class="lxrcommen0">/* CONFIG_HIGHMEM */pa <#L67etid2lL67etss="lxr_ineetnam>2lL67e>re67orov/<#L68etid2lL68etss="lxr_ineetnam>2lL68e>re68orova class="lxrcommen0">/*pa <#L69etid2lL69etss="lxr_ineetnam>2lL69e>re69orova class="lxrcommen0"> * allocate pages in the DMA reg<#L70etid2lL70etss="lxr_ineetnam>2lL70e>re70orova class="lxrcommen0"> */pa <#L71etid2lL71etss="lxr_ineetnam>2lL71e>re71.1ovtic/gf void *bempool_alloc_pages_isaorov(gfp_torov gfp_maskorov, void *dataorov)/<#L72etid2lL72etss="lxr_ineetnam>2lL72e>re72orov{v<#L73etid2lL73etss="lxr_ineetnam>2lL73e>re73orov href e14.12"bempool_alloc_pagesorov(gfp_maskorov | GFP_DMAorov, dataorov)<#L74etid2lL74etss="lxr_ineetnam>2lL74e>re74orov}/<#L75etid2lL75etss="lxr_ineetnam>2lL75e>re75orov/<#L76etid2lL76etss="lxr_ineetnam>2lL76e>re76orova class="lxrcommen0">/*pa <#L77etid2lL77etss="lxr_ineetnam>2lL77e>re77orova class="lxrcommen0"> * gets called "every" time someone init's a queue with BLK_BOUNCE_ISApa <#L78etid2lL78etss="lxr_ineetnam>2lL78e>re78orova class="lxrcommen0"> * as the max address, so check if the pool has already beelasreated.pa <#L79etid2lL79etss="lxr_ineetnam>2lL79e>re79orova class="lxrcommen0"> */pa <#L80etid2lL80etss="lxr_ineetnam>2lL80e>re80orovint init_emergency_isa_poolorov(void)/<#L81etid2lL81etss="lxr_ineetnam>2lL81e>re81orov{v<#L82etid2lL82etss="lxr_ineetnam>2lL82e>re82orov href if (isa_page_poolorov)/<#L83etid2lL83etss="lxr_ineetnam>2lL83e>re83orov href href e14.12"0<#L84etid2lL84etss="lxr_ineetnam>2lL84e>re84orov/<#L85etid2lL85etss="lxr_ineetnam>2lL85e>re85orov href isa_page_poolorov = bempool_createorov(ISA_POOL_SIZEorov, bempool_alloc_pages_isaorov,/<#L86etid2lL86etss="lxr_ineetnam>2lL86e>re86orov href href bempool_free_pagesorov, (void *) 0)<#L87etid2lL87etss="lxr_ineetnam>2lL87e>re87orov href BUG_ONorov(!isa_page_poolorov)<#L88etid2lL88etss="lxr_ineetnam>2lL88e>re88orov/<#L89etid2lL89etss="lxr_ineetnam>2lL89e>re89orov href printkorov(< class="lxrstring">"isa nce.c" pool size: %d pages\n"pa ISA_POOL_SIZEorov)<#L90etid2lL90etss="lxr_ineetnam>2lL90e>re90orov href e14.12"0<#L91etid2lL91etss="lxr_ineetnam>2lL91e>re91orov}/<#L92etid2lL92etss="lxr_ineetnam>2lL92e>re92orov/<#L93etid2lL93etss="lxr_ineetnam>2lL93e>re93orova class="lxrcommen0">/*pa <#L94etid2lL94etss="lxr_ineetnam>2lL94e>re94orova class="lxrcommen0"> * Simple nce.c" buffer supportpm ht.pmem pages. Depending on thepa <#L95etid2lL95etss="lxr_ineetnam>2lL95e>re95orova class="lxrcommen0"> * queue gfp mask set, *to may may not be a ht.pmem page. kmap itpa <#L96etid2lL96etss="lxr_ineetnam>2lL96e>re96orova class="lxrcommen0"> * always, it will do the Rt.pn Thingpa <#L97etid2lL97etss="lxr_ineetnam>2lL97e>re97orova class="lxrcommen0"> */pa <#L98etid2lL98etss="lxr_ineetnam>2lL98e>re98.1ovtic/gf void copy_to_ht.p_nio_irqorov(struct nioorov *toorov, struct nioorov *fromorov)/<#L99etid2lL99etss="lxr_ineetnam>2lL99e>re99orov{v<#L100etid2lL100etss="lxr_ineetnam>2lL100e>r100orov href unsigned char *vfromorov<#L101etid2lL101etss="lxr_ineetnam>2lL101e>r101orov href struct nio_vecorov *tovecorov, *fromvecorov<#L102etid2lL102etss="lxr_ineetnam>2lL102e>r102orov href int iorov<#L103etid2lL103etss="lxr_ineetnam>2lL103e>r103orov/<#L104etid2lL104etss="lxr_ineetnam>2lL104e>r104orov href __nio_m _each_segmen0orov(tovecorov, toorov, iorov, 0) {v<#L105etid2lL105etss="lxr_ineetnam>2lL105e>r105orov href href fromvecorov = fromorov-;"><ni_io_vecorov + iorov<#L106etid2lL106etss="lxr_ineetnam>2lL106e>r106orov/<#L107etid2lL107etss="lxr_ineetnam>2lL107e>r107orov href href < class="lxrcommen0">/*pa <#L108etid2lL108etss="lxr_ineetnam>2lL108e>r108orova class="lxrcommen0"> * not bce.c"dpa <#L109etid2lL109etss="lxr_ineetnam>2lL109e>r109orova class="lxrcommen0"> */pa <#L110etid2lL110etss="lxr_ineetnam>2lL110e>r110orov href href if (tovecorov-;"><nv_pageorov == fromvecorov-;"><nv_pageorov)v<#L111etid2lL111etss="lxr_ineetnam>2lL111e>r111orov href href continue<#L112etid2lL112etss="lxr_ineetnam>2lL112e>r112orov/<#L113etid2lL113etss="lxr_ineetnam>2lL113e>r113orov href href < class="lxrcommen0">/*pa <#L114etid2lL114etss="lxr_ineetnam>2lL114e>r114orova class="lxrcommen0"> * fromvec-;"><#L115etid2lL115etss="lxr_ineetnam>2lL115e>r115orova class="lxrcommen0"> * modified by the block layer, so use the original copy,pa <#L116etid2lL116etss="lxr_ineetnam>2lL116e>r116orova class="lxrcommen0"> * nce.c"_copy_vec already uses tovec-;"><#L117etid2lL117etss="lxr_ineetnam>2lL117e>r117orova class="lxrcommen0"> */pa <#L118etid2lL118etss="lxr_ineetnam>2lL118e>r118orov href href vfromorov = page_addressorov(fromvecorov-;"><nv_pageorov) + tovecorov-;"><bv_offsetorov<#L119etid2lL119etss="lxr_ineetnam>2lL119e>r119orov/<#L120etid2lL120etss="lxr_ineetnam>2lL120e>r120orov href href nce.c"_copy_vecorov(tovecorov, vfromorov)<#L121etid2lL121etss="lxr_ineetnam>2lL121e>r121orov href href flush_dcache_pageorov(tovecorov-;"><nv_pageorov)<#L122etid2lL122etss="lxr_ineetnam>2lL122e>r122orov href }/<#L123etid2lL123etss="lxr_ineetnam>2lL123e>r123orov}/<#L124etid2lL124etss="lxr_ineetnam>2lL124e>r124orov/<#L125etid2lL125etss="lxr_ineetnam>2lL125e>r125.1ovtic/gf void nce.c"_end_ioorov(struct nioorov *nioorov, bempool_torov *poolorov, int errorov)v<#L126etid2lL126etss="lxr_ineetnam>2lL126e>r126orov{v<#L127etid2lL127etss="lxr_ineetnam>2lL127e>r127orov href struct nioorov *nio_origorov = nioorov-;"><bi_privateorov<#L128etid2lL128etss="lxr_ineetnam>2lL128e>r128orov href struct nio_vecorov *nvecorov, *org_vecorov<#L129etid2lL129etss="lxr_ineetnam>2lL129e>r129orov href int iorov<#L130etid2lL130etss="lxr_ineetnam>2lL130e>r130orov/<#L131etid2lL131etss="lxr_ineetnam>2lL131e>r131orov href if (test_bitorov(BIO_EOPNOTSUPPorov, &nioorov-;"><bi_flagsorov))v<#L132etid2lL132etss="lxr_ineetnam>2lL132e>r132orov href set_bitorov(BIO_EOPNOTSUPPorov, &nio_origorov-;"><bi_flagsorov)<#L133etid2lL133etss="lxr_ineetnam>2lL133e>r133orov/<#L134etid2lL134etss="lxr_ineetnam>2lL134e>r134orov href < class="lxrcommen0">/*pa <#L135etid2lL135etss="lxr_ineetnam>2lL135e>r135orova class="lxrcommen0"> * free up nce.c" indirect pages usedpa <#L136etid2lL136etss="lxr_ineetnam>2lL136e>r136orova class="lxrcommen0"> */pa <#L137etid2lL137etss="lxr_ineetnam>2lL137e>r137orov href __nio_m _each_segmen0orov(nvecorov, nioorov, iorov, 0) {v<#L138etid2lL138etss="lxr_ineetnam>2lL138e>r138orov href href org_vecorov = nio_origorov-;"><ni_io_vecorov + iorov<#L139etid2lL139etss="lxr_ineetnam>2lL139e>r139orov href href if (nvecorov-;"><nv_pageorov == org_vecorov-;"><nv_pageorov)v<#L140etid2lL140etss="lxr_ineetnam>2lL140e>r140orov href href continue<#L141etid2lL141etss="lxr_ineetnam>2lL141e>r141orov/<#L142etid2lL142etss="lxr_ineetnam>2lL142e>r142orov href dec_zone_page_tic/eorov(nvecorov-;"><nv_pageorov, NR_BOUNCEorov)<#L143etid2lL143etss="lxr_ineetnam>2lL143e>r143orov href href bempool_freeorov(nvecorov-;"><nv_pageorov, poolorov)<#L144etid2lL144etss="lxr_ineetnam>2lL144e>r144orov href }/<#L145etid2lL145etss="lxr_ineetnam>2lL145e>r145orov/<#L146etid2lL146etss="lxr_ineetnam>2lL146e>r146orov href nio_endioorov(nio_origorov, errorov)<#L147etid2lL147etss="lxr_ineetnam>2lL147e>r147orov href bio_putorov(nioorov)<#L148etid2lL148etss="lxr_ineetnam>2lL148e>r148orov}/<#L149etid2lL149etss="lxr_ineetnam>2lL149e>r149orov/<#L150etid2lL150etss="lxr_ineetnam>2lL150e>r150orovtic/gf void bce.c"_end_io_writeorov(struct nioorov *nioorov, int errorov)v<#L151etid2lL151etss="lxr_ineetnam>2lL151e>r151orov{v<#L152etid2lL152etss="lxr_ineetnam>2lL152e>r152orov href nce.c"_end_ioorov(nioorov, page_poolorov, errorov)<#L153etid2lL153etss="lxr_ineetnam>2lL153e>r153orov}/<#L154etid2lL154etss="lxr_ineetnam>2lL154e>r154orov/<#L155etid2lL155etss="lxr_ineetnam>2lL155e>r155.1ovtic/gf void nce.c"_end_io_write_isaorov(struct nioorov *nioorov, int errorov)v<#L156etid2lL156etss="lxr_ineetnam>2lL156e>r156orov{v<#L157etid2lL157etss="lxr_ineetnam>2lL157e>r157orov/<#L158etid2lL158etss="lxr_ineetnam>2lL158e>r158orov href nce.c"_end_ioorov(nioorov, isa_page_poolorov, errorov)<#L159etid2lL159etss="lxr_ineetnam>2lL159e>r159orov}/<#L160etid2lL160etss="lxr_ineetnam>2lL160e>r160orov/<#L161etid2lL161etss="lxr_ineetnam>2lL161e>r161.1ovtic/gf void __nce.c"_end_io_readorov(struct nioorov *nioorov, bempool_torov *poolorov, int errorov)v<#L162etid2lL162etss="lxr_ineetnam>2lL162e>r162orov{v<#L163etid2lL163etss="lxr_ineetnam>2lL163e>r163orov href struct nioorov *nio_origorov = nioorov-;"><bi_privateorov<#L164etid2lL164etss="lxr_ineetnam>2lL164e>r164orov/<#L165etid2lL165etss="lxr_ineetnam>2lL165e>r165orov href if (test_bitorov(BIO_UPTODATEorov, &nioorov-;"><bi_flagsorov))v<#L166etid2lL166etss="lxr_ineetnam>2lL166e>r166orov href href copy_to_ht.p_nio_irqorov(nio_origorov, nioorov)<#L167etid2lL167etss="lxr_ineetnam>2lL167e>r167orov/<#L168etid2lL168etss="lxr_ineetnam>2lL168e>r168orov href nce.c"_end_ioorov(nioorov, poolorov, errorov)<#L169etid2lL169etss="lxr_ineetnam>2lL169e>r169orov}/<#L170etid2lL170etss="lxr_ineetnam>2lL170e>r170orov/<#L171etid2lL171etss="lxr_ineetnam>2lL171e>r171.1ovtic/gf void nce.c"_end_io_readorov(struct nioorov *nioorov, int errorov)v<#L172etid2lL172etss="lxr_ineetnam>2lL172e>r172orov{v<#L173etid2lL173etss="lxr_ineetnam>2lL173e>r173orov href __nce.c"_end_io_readorov(nioorov, page_poolorov, errorov)<#L174etid2lL174etss="lxr_ineetnam>2lL174e>r174orov}/<#L175etid2lL175etss="lxr_ineetnam>2lL175e>r175orov/<#L176etid2lL176etss="lxr_ineetnam>2lL176e>r176orovtic/gf void nce.c"_end_io_read_isaorov(struct nioorov *nioorov, int errorov)v<#L177etid2lL177etss="lxr_ineetnam>2lL177e>r177orov{v<#L178etid2lL178etss="lxr_ineetnam>2lL178e>r178orov href __nce.c"_end_io_readorov(nioorov, isa_page_poolorov, errorov)<#L179etid2lL179etss="lxr_ineetnam>2lL179e>r179orov}/<#L180etid2lL180etss="lxr_ineetnam>2lL180e>r180orov/<#L181etid2lL181etss="lxr_ineetnam>2lL181e>r181.1ovtic/gf void __nlk_queue_nce.c"orov(struct request_queueorov *qorov, struct nioorov **nio_origorov,/<#L182etid2lL182etss="lxr_ineetnam>2lL182e>r182orov href href href bempool_torov *poolorov)v<#L183etid2lL183etss="lxr_ineetnam>2lL183e>r183orov{v<#L184etid2lL184etss="lxr_ineetnam>2lL184e>r184orov href struct pageorov *pageorov<#L185etid2lL185etss="lxr_ineetnam>2lL185e>r185orov href struct nioorov *nioorov = NULLorov<#L186etid2lL186etss="lxr_ineetnam>2lL186e>r186orov href int iorov, rworov = bio_data_dirorov(*nio_origorov)<#L187etid2lL187etss="lxr_ineetnam>2lL187e>r187orov href struct nio_vecorov *toorov, *fromorov<#L188etid2lL188etss="lxr_ineetnam>2lL188e>r188orov/<#L189etid2lL189etss="lxr_ineetnam>2lL189e>r189orov href nio_m _each_segmen0orov(fromorov, *nio_origorov, iorov) {v<#L190etid2lL190etss="lxr_ineetnam>2lL190e>r190orov href href pageorov = fromorov-;"><nv_pageorov<#L191etid2lL191etss="lxr_ineetnam>2lL191e>r191orov/<#L192etid2lL192etss="lxr_ineetnam>2lL192e>r192orov href < class="lxrcommen0">/*pa <#L193etid2lL193etss="lxr_ineetnam>2lL193e>r193orova class="lxrcommen0"> href href * is destina2<#L194etid2lL194etss="lxr_ineetnam>2lL194e>r194orova class="lxrcommen0"> href href */pa <#L195etid2lL195etss="lxr_ineetnam>2lL195e>r195orov href href if (page_toapfnorov(pageorov) <= queue_nce.c"apfnorov(qorov))v<#L196etid2lL196etss="lxr_ineetnam>2lL196e>r196orov href href continue<#L197etid2lL197etss="lxr_ineetnam>2lL197e>r197orov/<#L198etid2lL198etss="lxr_ineetnam>2lL198e>r198orov href href < class="lxrcommen0">/*pa <#L199etid2lL199etss="lxr_ineetnam>2lL199e>r199orova class="lxrcommen0"> * irk, nce.c" itpa <#L200etid2lL200etss="lxr_ineetnam>2lL200e>r200orova class="lxrcommen0"> href href */pa <#L201etid2lL201etss="lxr_ineetnam>2lL201e>r201orov href href if (!nioorov) {v<#L202etid2lL202etss="lxr_ineetnam>2lL202e>r202orov href href unsigned int cn0orov = (*nio_origorov)-;"><bi_vcn0orov<#L203etid2lL203etss="lxr_ineetnam>2lL203e>r203orov/<#L204etid2lL204etss="lxr_ineetnam>2lL204e>r204orov href href href nioorov = nio_allocorov(GFP_NOIOorov, cn0orov)<#L205etid2lL205etss="lxr_ineetnam>2lL205e>r205orov href href href bemsetorov(nioorov-;"><ni_io_vecorov, 0, cn0orov * sizeof(struct nio_vecorov))<#L206etid2lL206etss="lxr_ineetnam>2lL206e>r206orov href href }/<#L207etid2lL207etss="lxr_ineetnam>2lL207e>r207orov href href /<#L208etid2lL208etss="lxr_ineetnam>2lL208e>r208orov/<#L209etid2lL209etss="lxr_ineetnam>2lL209e>r209orov href href toorov = nioorov-;"><ni_io_vecorov + iorov<#L210etid2lL210etss="lxr_ineetnam>2lL210e>r210orov/<#L211etid2lL211etss="lxr_ineetnam>2lL211e>r211orov href href toorov-;"><nv_pageorov = bempool_allocorov(poolorov, qorov-;"><nce.c"_gfporov)<#L212etid2lL212etss="lxr_ineetnam>2lL212e>r212orov href toorov-;"><bv_lenorov = fromorov-;"><bv_lenorov<#L213etid2lL213etss="lxr_ineetnam>2lL213e>r213orov href href toorov-;"><bv_offsetorov = fromorov-;"><bv_offsetorov<#L214etid2lL214etss="lxr_ineetnam>2lL214e>r214orov href href inc_zone_page_tic/eorov(toorov-;"><nv_pageorov, NR_BOUNCEorov)<#L215etid2lL215etss="lxr_ineetnam>2lL215e>r215orov/<#L216etid2lL216etss="lxr_ineetnam>2lL216e>r216orov href href if (rworov == WRITEorov) {v<#L217etid2lL217etss="lxr_ineetnam>2lL217e>r217orov href href char *vtoorov, *vfromorov<#L218etid2lL218etss="lxr_ineetnam>2lL218e>r218orov/<#L219etid2lL219etss="lxr_ineetnam>2lL219e>r219orov href href href flush_dcache_pageorov(fromorov-;"><nv_pageorov)<#L220etid2lL220etss="lxr_ineetnam>2lL220e>r220orov href href href vtoorov = page_addressorov(toorov-;"><nv_pageorov) + toorov-;"><bv_offsetorov<#L221etid2lL221etss="lxr_ineetnam>2lL221e>r221orov href href href vfromorov = kmaporov(fromorov-;"><nv_pageorov) + fromorov-;"><bv_offsetorov<#L222etid2lL222etss="lxr_ineetnam>2lL222e>r222orov href href bemcpyorov(vtoorov, vfromorov, toorov-;"><bv_lenorov)<#L223etid2lL223etss="lxr_ineetnam>2lL223e>r223orov href href href kunmaporov(fromorov-;"><nv_pageorov)<#L224etid2lL224etss="lxr_ineetnam>2lL224e>r224orov href href }/<#L225etid2lL225etss="lxr_ineetnam>2lL225e>r225orov href }/<#L226etid2lL226etss="lxr_ineetnam>2lL226e>r226orov/<#L227etid2lL227etss="lxr_ineetnam>2lL227e>r227orov href < class="lxrcommen0">/*pa <#L228etid2lL228etss="lxr_ineetnam>2lL228e>r228orova class="lxrcommen0"> * no pages nce.c"dpa <#L229etid2lL229etss="lxr_ineetnam>2lL229e>r229orova class="lxrcommen0"> */pa <#L230etid2lL230etss="lxr_ineetnam>2lL230e>r230orov href if (!nioorov)v<#L231etid2lL231etss="lxr_ineetnam>2lL231e>r231orov href href e14.12<#L232etid2lL232etss="lxr_ineetnam>2lL232e>r232orov/<#L233etid2lL233etss="lxr_ineetnam>2lL233e>r233orov href trac"_block_nio_nce.c"orov(qorov, *nio_origorov)<#L234etid2lL234etss="lxr_ineetnam>2lL234e>r234orov/<#L235etid2lL235etss="lxr_ineetnam>2lL235e>r235orov href < class="lxrcommen0">/*pa <#L236etid2lL236etss="lxr_ineetnam>2lL236e>r236orova class="lxrcommen0"> * at least one page was nce.c"d, fill in possible non-ht.pmempa <#L237etid2lL237etss="lxr_ineetnam>2lL237e>r237orova class="lxrcommen0"> * pagesor <#L238etid2lL238etss="lxr_ineetnam>2lL238e>r238orova class="lxrcommen0"> */pa <#L239etid2lL239etss="lxr_ineetnam>2lL239e>r239orov href __nio_m _each_segmen0orov(fromorov, *nio_origorov, iorov, 0) {v<#L240etid2lL240etss="lxr_ineetnam>2lL240e>r240orov href href toorov = nio_iovec_idxorov(nioorov, iorov)<#L241etid2lL241etss="lxr_ineetnam>2lL241e>r241orov href href if (!toorov-;"><nv_pageorov) {v<#L242etid2lL242etss="lxr_ineetnam>2lL242e>r242orov href href toorov-;"><nv_pageorov = fromorov-;"><nv_pageorov<#L243etid2lL243etss="lxr_ineetnam>2lL243e>r243orov href href href toorov-;"><bv_lenorov = fromorov-;"><bv_lenorov<#L244etid2lL244etss="lxr_ineetnam>2lL244e>r244orov href href href toorov-;"><bv_offsetorov = fromorov-;"><bv_offsetorov<#L245etid2lL245etss="lxr_ineetnam>2lL245e>r245orov href href }/<#L246etid2lL246etss="lxr_ineetnam>2lL246e>r246orov href }/<#L247etid2lL247etss="lxr_ineetnam>2lL247e>r247orov/<#L248etid2lL248etss="lxr_ineetnam>2lL248e>r248orov href nioorov-;"><ni_bdevorov = (*nio_origorov)-;"><ni_bdevorov<#L249etid2lL249etss="lxr_ineetnam>2lL249e>r249orov href nioorov-;"><bi_flagsorov |= (1 << BIO_BOUNCEDorov)<#L250etid2lL250etss="lxr_ineetnam>2lL250e>r250orov href nioorov-;"><bi_sectororov = (*nio_origorov)-;"><bi_sectororov<#L251etid2lL251etss="lxr_ineetnam>2lL251e>r251orov href nioorov-;"><bi_rworov = (*nio_origorov)-;"><bi_rworov<#L252etid2lL252etss="lxr_ineetnam>2lL252e>r252orov/<#L253etid2lL253etss="lxr_ineetnam>2lL253e>r253orov href nioorov-;"><bi_vcn0orov = (*nio_origorov)-;"><bi_vcn0orov<#L254etid2lL254etss="lxr_ineetnam>2lL254e>r254orov href nioorov-;"><ni_idxorov = (*nio_origorov)-;"><ni_idxorov<#L255etid2lL255etss="lxr_ineetnam>2lL255e>r255orov href nioorov-;"><ni_sizeorov = (*nio_origorov)-;"><ni_sizeorov<#L256etid2lL256etss="lxr_ineetnam>2lL256e>r256orov/<#L257etid2lL257etss="lxr_ineetnam>2lL257e>r257orov href if (poolorov == page_poolorov) {v<#L258etid2lL258etss="lxr_ineetnam>2lL258e>r258orov href href nioorov-;"><ni_end_ioorov = bce.c"_end_io_writeorov<#L259etid2lL259etss="lxr_ineetnam>2lL259e>r259orov href href if (rworov == READorov)v<#L260etid2lL260etss="lxr_ineetnam>2lL260e>r260orov href href href nioorov-;"><ni_end_ioorov = nce.c"_end_io_readorov<#L261etid2lL261etss="lxr_ineetnam>2lL261e>r261orov href } else {v<#L262etid2lL262etss="lxr_ineetnam>2lL262e>r262orov href nioorov-;"><ni_end_ioorov = nce.c"_end_io_write_isaorov<#L263etid2lL263etss="lxr_ineetnam>2lL263e>r263orov href href if (rworov == READorov)v<#L264etid2lL264etss="lxr_ineetnam>2lL264e>r264orov href href href nioorov-;"><ni_end_ioorov = nce.c"_end_io_read_isaorov<#L265etid2lL265etss="lxr_ineetnam>2lL265e>r265orov href }/<#L266etid2lL266etss="lxr_ineetnam>2lL266e>r266orov/<#L267etid2lL267etss="lxr_ineetnam>2lL267e>r267orov href nioorov-;"><bi_privateorov = *nio_origorov<#L268etid2lL268etss="lxr_ineetnam>2lL268e>r268orov href *nio_origorov = nioorov<#L269etid2lL269etss="lxr_ineetnam>2lL269e>r269orov}/<#L270etid2lL270etss="lxr_ineetnam>2lL270e>r270orov/<#L271etid2lL271etss="lxr_ineetnam>2lL271e>r271.1ovvoid nlk_queue_nce.c"orov(struct request_queueorov *qorov, struct nioorov **nio_origorov)v<#L272etid2lL272etss="lxr_ineetnam>2lL272e>r272orov{v<#L273etid2lL273etss="lxr_ineetnam>2lL273e>r273orov href bempool_torov *poolorov<#L274etid2lL274etss="lxr_ineetnam>2lL274e>r274orov/<#L275etid2lL275etss="lxr_ineetnam>2lL275e>r275orov href < class="lxrcommen0">/*pa <#L276etid2lL276etss="lxr_ineetnam>2lL276e>r276orova class="lxrcommen0"> * Data-less nio, nothing to nce.c"or <#L277etid2lL277etss="lxr_ineetnam>2lL277e>r277orova class="lxrcommen0"> */pa <#L278etid2lL278etss="lxr_ineetnam>2lL278e>r278orov href if (!nio_has_dataorov(*nio_origorov))v<#L279etid2lL279etss="lxr_ineetnam>2lL279e>r279orov href href e14.12<#L280etid2lL280etss="lxr_ineetnam>2lL280e>r280orov/<#L281etid2lL281etss="lxr_ineetnam>2lL281e>r281orov href < class="lxrcommen0">/*pa <#L282etid2lL282etss="lxr_ineetnam>2lL282e>r282orova class="lxrcommen0"> * for non-isa nce.c" case, just check if the bce.c" pfn is equalpa <#L283etid2lL283etss="lxr_ineetnam>2lL283e>r283orova class="lxrcommen0"> href * to or bigger thclathe ht.pest pfn ilathe system -- ilathat case,pa <#L284etid2lL284etss="lxr_ineetnam>2lL284e>r284orova class="lxrcommen0"> href * don't waste tim" iterating over bio segmen0sor <#L285etid2lL285etss="lxr_ineetnam>2lL285e>r285orova class="lxrcommen0"> */pa <#L286etid2lL286etss="lxr_ineetnam>2lL286e>r286orov href if (!(qorov-;"><nce.c"_gfporov & GFP_DMAorov)) {v<#L287etid2lL287etss="lxr_ineetnam>2lL287e>r287orov href href if (queue_nce.c"apfnorov(qorov) ;"><= blk_maxapfnorov)v<#L288etid2lL288etss="lxr_ineetnam>2lL288e>r288orov href href href e14.12<#L289etid2lL289etss="lxr_ineetnam>2lL289e>r289orov href href poolorov = page_poolorov<#L290etid2lL290etss="lxr_ineetnam>2lL290e>r290orov href } else {v<#L291etid2lL291etss="lxr_ineetnam>2lL291e>r291orov href href BUG_ONorov(!isa_page_poolorov)<#L292etid2lL292etss="lxr_ineetnam>2lL292e>r292orov href poolorov = isa_page_poolorov<#L293etid2lL293etss="lxr_ineetnam>2lL293e>r293orov href }/<#L294etid2lL294etss="lxr_ineetnam>2lL294e>r294orov/<#L295etid2lL295etss="lxr_ineetnam>2lL295e>r295orov href < class="lxrcommen0">/*pa <#L296etid2lL296etss="lxr_ineetnam>2lL296e>r296orova class="lxrcommen0"> * slow pathpa <#L297etid2lL297etss="lxr_ineetnam>2lL297e>r297orova class="lxrcommen0"> */pa <#L298etid2lL298etss="lxr_ineetnam>2lL298e>r298orov href __nlk_queue_nce.c"orov(qorov, nio_origorov, poolorov)<#L299etid2lL299etss="lxr_ineetnam>2lL299e>r299orov}/<#L300etid2lL300etss="lxr_ineetnam>2lL300e>r300orov/<#L301etid2lL301etss="lxr_ineetnam>2lL301e>r301orovEXPORT_SYMBOLorov(nlk_queue_nce.c"orov)<#L302etid2lL302etss="lxr_ineetnam>2lL302e>r302orov
The original LXR software by the LXR communityorov, this experimen0al verslxr@_inux.noorov.
lxr._inux.no kindly hostedpby Redpill Linpro ASorov, provider of Linux consulting and operations services si.c" 1995.