s = pjx_load_fra2perl tic/c>LXR /htm/l4/loo/htmbody class="fax." var us ra2perl varclass="l4/liatic/gfx/rl varclass="l4/liattop" sr va> /gfx/rl spx Iclass="te4_tic/cic/ spx Iclass="te4_logo" sage/png"> ">LXR<+ de/spx c/ spx Iid="currax[_purlic/ rl age/png"> dr){ rs/<+ deage/png"dr){ rs/pci/">pci/<+ deage/png"dr){ rs/pci/bus.c">bus.c<+ d/ /spx c/ !-- Hisrayy --c/gfx/rlrl spx Iid="te4_prix[l/gfx/rlrls ra rl "Con adom()="+prix[=dr){ rs/pci/bus.c".target="on/x"Iid="prix[_"Conic/ rlhtmbutt();); ;} submix"Iclass="prix[lc/gfx/rl x/rlrl img / rlhtm/spa)c/ htm/formc/ htma / rlht href="../linux+v3.7.9/drivers/pci/bus.c">/ rlhtmimg src="../.static/gfx/right.png" alt=">>">/ m/spa)c// mspa) class="lxr_search">/ rl
/ rlhtminput typ |"hidden" nam |"navtarget" rea' |"">/ rlhtminput typ |"text" nam |"search" id|"search">/ rlhtmbutt();typ |"submit">Search/ rlhtPrefs/ htm/a>/ m/spa)c/rlht tm/divc/rlht tmform acom()="ajax+*" method="post" onsubmit="return falsturn falsturn falstrd2P.6.32.34".5<4pa)1refsspa)c// mspa)commen |"/*htm/a>/ pa)2refsspa)c// mspa)commen |" *m/spa)?return=drivers/phtm/a>/ pa)3refsspa)c// mspa)commen |" *htm/a>/ pa)4refsspa)c// mspa)commen |" *mFrom submp-res.c, by:htm/a>/ pa)5refsspa)c// mspa)commen |" *m/spa)Dave Rus ing (david.rus ing@reo.mts.dec.com)htm/a>/ pa)6refsspa)c// mspa)commen |" *m/spa)David Mosbe |"r (davidm@cs.arizona.edu)htm/a>/ pa)7refsspa)c// mspa)commen |" *m/spa)David Mill"r (davem@redhat.com)htm/a>/ pa)8refsspa)c// mspa)commen |" *m/spa)Iv)c/Kokshaysky (ink@jurmspic.park.msu.ru)htm/a>/ pa)9refsspa)c// mspa)commen |" */htm/a>/ pav2.6a>#i/ rude <ref="/module.h.6a>lt=" pa11.6a>#i/ rude <ref="/kernel.h.6a>lt=" pa12.6a>#i/ rude <ref="/dri.h.6a>lt=" pa13.6a>#i/ rude <ref="/errno.h.6a>lt=" pa14.6a>#i/ rude <ref="/ioport.h.6a>lt=" pa15.6a>#i/ rude <ref="/droc_fs.h.6a>lt=" pa16.6a>#i/ rude <ref="/init.h.6a>lt=" pa17.6a>#i/ rude <ref="/slab.h.6a>lt=" pa18refs pa19.6a>#i/ rude "dri.h.6a>lquot; pa20refs pa21.6a>void fs"c/ htmacode=dri_add_resource_offs"nav/ mspa)c/ h">dri_add_resource_offs"n.6a>(struct fs"c/ htmacode=list_headav/ mspa)c/ h">list_head.6a> *hs"c/ htmacode=resourcesav/ mspa)c/ h">resources.6a>, struct fs"c/ htmacode=resourceav/ mspa)c/ h">resource.6a> *hs"c/ htmacode=resav/ mspa)c/ h">res.6a>, pa22.6a> fs"c/ htmacode=resource_size_nav/ mspa)c/ h">resource_size_n.6a> fs"c/ htmacode=offs"nav/ mspa)c/ h">offs"n.6a>) pa23.6a>{ pa24.6a> struct fs"c/ htmacode=dri_heth_bridge_windowav/ mspa)c/ h">dri_heth_bridge_window.6a> *hs"c/ htmacode=windowav/ mspa)c/ h">window.6a>; pa25refs pa26.6a> hs"c/ htmacode=windowav/ mspa)c/ h">window.6a> = hs"c/ htmacode=kzallocav/ mspa)c/ h">kzalloc.6a>(sizeof(struct fs"c/ htmacode=dri_heth_bridge_windowav/ mspa)c/ h">dri_heth_bridge_window.6a>), fs"c/ htmacode=GFP_KERNELav/ mspa)c/ h">GFP_KERNEL.6a>); pa27.6a> if (!hs"c/ htmacode=windowav/ mspa)c/ h">window.6a>) { pa28.6a> fs"c/ htmacode=drintkav/ mspa)c/ h">drintk.6a>(fs"c/ htmacode=KERN_ERRav/ mspa)c/ h">KERN_ERR.6a> fpa)c// mspa)string">lquot;PCI: can't add heth bridge window %pR\n"/, fs"c/ htmacode=resav/ mspa)c/ h">res.6a>); pa29.6a> submit; pa30.6a> } pa31refs pa32.6a> hs"c/ htmacode=windowav/ mspa)c/ h">window.6a>-lt="fs"c/ htmacode=resav/ mspa)c/ h">res.6a> = hs"c/ htmacode=resav/ mspa)c/ h">res.6a>; pa33.6a> hs"c/ htmacode=windowav/ mspa)c/ h">window.6a>-lt="fs"c/ htmacode=offs"nav/ mspa)c/ h">offs"n.6a> = hs"c/ htmacode=offs"nav/ mspa)c/ h">offs"n.6a>; pa34.6a> hs"c/ htmacode=list_add_tailav/ mspa)c/ h">list_add_tail.6a>(&"fs"c/ htmacode=windowav/ mspa)c/ h">window.6a>-lt="fs"c/ htmacode=listav/ mspa)c/ h">list.6a>, hs"c/ htmacode=resourcesav/ mspa)c/ h">resources.6a>); pa35refs} pa36refsss"c/ htmacode=EXPORT_SYMBOLav/ mspa)c/ h">EXPORT_SYMBOL.6a>(fs"c/ htmacode=dri_add_resource_offs"nav/ mspa)c/ h">dri_add_resource_offs"n.6a>); pa37refs pa38.6a>void fs"c/ htmacode=dri_add_resourceav/ mspa)c/ h">dri_add_resource.6a>(struct fs"c/ htmacode=list_headav/ mspa)c/ h">list_head.6a> *hs"c/ htmacode=resourcesav/ mspa)c/ h">resources.6a>, struct fs"c/ htmacode=resourceav/ mspa)c/ h">resource.6a> *hs"c/ htmacode=resav/ mspa)c/ h">res.6a>) pa39.6a>{ pa40.6a> hs"c/ htmacode=dri_add_resource_offs"nav/ mspa)c/ h">dri_add_resource_offs"n.6a>(hs"c/ htmacode=resourcesav/ mspa)c/ h">resources.6a>, hs"c/ htmacode=resav/ mspa)c/ h">res.6a>, 0); pa41refs} pa42refsss"c/ htmacode=EXPORT_SYMBOLav/ mspa)c/ h">EXPORT_SYMBOL.6a>(fs"c/ htmacode=dri_add_resourceav/ mspa)c/ h">dri_add_resource.6a>); pa43refs pa44.6a>void fs"c/ htmacode=dri_free_resource_listav/ mspa)c/ h">dri_free_resource_list.6a>(struct fs"c/ htmacode=list_headav/ mspa)c/ h">list_head.6a> *hs"c/ htmacode=resourcesav/ mspa)c/ h">resources.6a>) pa45.6a>{ pa46.6a> struct fs"c/ htmacode=dri_heth_bridge_windowav/ mspa)c/ h">dri_heth_bridge_window.6a> *hs"c/ htmacode=windowav/ mspa)c/ h">window.6a>, *hs"c/ htmacode=tmpav/ mspa)c/ h">tmp.6a>; pa47refs pa48.6a> hs"c/ htmacode=list_for_each_entry_safeav/ mspa)c/ h">list_for_each_entry_safe.6a>(fs"c/ htmacode=windowav/ mspa)c/ h">window.6a>, hs"c/ htmacode=tmpav/ mspa)c/ h">tmp.6a>, hs"c/ htmacode=resourcesav/ mspa)c/ h">resources.6a>, hs"c/ htmacode=listav/ mspa)c/ h">list.6a>) { pa49.6a> hs"c/ htmacode=list_delav/ mspa)c/ h">list_del.6a>(&"fs"c/ htmacode=windowav/ mspa)c/ h">window.6a>-lt="fs"c/ htmacode=listav/ mspa)c/ h">list.6a>); pa50.6a> hs"c/ htmacode=kfreeav/ mspa)c/ h">kfree.6a>(fs"c/ htmacode=windowav/ mspa)c/ h">window.6a>); pa51.6a> } pa52refs} pa53refsss"c/ htmacode=EXPORT_SYMBOLav/ mspa)c/ h">EXPORT_SYMBOL.6a>(fs"c/ htmacode=dri_free_resource_listav/ mspa)c/ h">dri_free_resource_list.6a>); pa54refs pa55.6a>void fs"c/ htmacode=dri_ers_add_resourceav/ mspa)c/ h">dri_ers_add_resource.6a>(struct fs"c/ htmacode=dri_ersav/ mspa)c/ h">dri_ers.6a> *hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>, struct fs"c/ htmacode=resourceav/ mspa)c/ h">resource.6a> *hs"c/ htmacode=resav/ mspa)c/ h">res.6a>, pa56.6a> unsigned int fs"c/ htmacode=flagsav/ mspa)c/ h">flags.6a>) pa57.6a>{ pa58.6a> struct fs"c/ htmacode=dri_ers_resourceav/ mspa)c/ h">dri_ers_resource.6a> *hs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>; pa59refs pa60.6a> hs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a> = hs"c/ htmacode=kzallocav/ mspa)c/ h">kzalloc.6a>(sizeof(struct fs"c/ htmacode=dri_ers_resourceav/ mspa)c/ h">dri_ers_resource.6a>), fs"c/ htmacode=GFP_KERNELav/ mspa)c/ h">GFP_KERNEL.6a>); pa61.6a> if (!hs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>) { pa62.6a> hs"c/ htmacode=dev_errav/ mspa)c/ h">dev_err.6a>(&"fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>, hpa)c// mspa)string">lquot;can't add %pR resource\n"/, fs"c/ htmacode=resav/ mspa)c/ h">res.6a>); pa63.6a> submit; pa64.6a> } pa65refs pa66.6a> hs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>-lt="fs"c/ htmacode=resav/ mspa)c/ h">res.6a> = hs"c/ htmacode=resav/ mspa)c/ h">res.6a>; pa67.6a> hs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>-lt="fs"c/ htmacode=flagsav/ mspa)c/ h">flags.6a> = hs"c/ htmacode=flagsav/ mspa)c/ h">flags.6a>; pa68.6a> hs"c/ htmacode=list_add_tailav/ mspa)c/ h">list_add_tail.6a>(&"fs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>-lt="fs"c/ htmacode=listav/ mspa)c/ h">list.6a>, &"fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=resourcesav/ mspa)c/ h">resources.6a>); pa69refs} pa70refs pa71.6a>struct fs"c/ htmacode=resourceav/ mspa)c/ h">resource.6a> *hs"c/ htmacode=dri_ers_resource_nav/ mspa)c/ h">dri_ers_resource_n.6a>(const struct fs"c/ htmacode=dri_ersav/ mspa)c/ h">dri_ers.6a> *hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>, int fs"c/ htmacode=nav/ mspa)c/ h">n.6a>) pa72.6a>{ pa73.6a> struct fs"c/ htmacode=dri_ers_resourceav/ mspa)c/ h">dri_ers_resource.6a> *hs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>; pa74refs pa75.6a> if (fs"c/ htmacode=nav/ mspa)c/ h">n.6a> < fs"c/ htmacode=PCI_BRIDGE_RESOURCE_NUMav/ mspa)c/ h">PCI_BRIDGE_RESOURCE_NUM.6a>) pa76.6a> submit=fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=resourceav/ mspa)c/ h">resource.6a>[fs"c/ htmacode=nav/ mspa)c/ h">n.6a>]; pa77refs pa78.6a> hs"c/ htmacode=nav/ mspa)c/ h">n.6a> -= hs"c/ htmacode=PCI_BRIDGE_RESOURCE_NUMav/ mspa)c/ h">PCI_BRIDGE_RESOURCE_NUM.6a>; pa79.6a> hs"c/ htmacode=list_for_each_entryav/ mspa)c/ h">list_for_each_entry.6a>(fs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>, &"fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=resourcesav/ mspa)c/ h">resources.6a>, hs"c/ htmacode=listav/ mspa)c/ h">list.6a>) { pa80.6a> if (fs"c/ htmacode=nav/ mspa)c/ h">n.6a>-- == 0) pa81.6a> submit=fs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>-lt="fs"c/ htmacode=resav/ mspa)c/ h">res.6a>; pa82.6a> } pa83.6a> submit=fs"c/ htmacode=NULLav/ mspa)c/ h">NULL.6a>; pa84refs} pa85refsss"c/ htmacode=EXPORT_SYMBOL_GPLav/ mspa)c/ h">EXPORT_SYMBOL_GPL.6a>(fs"c/ htmacode=dri_ers_resource_nav/ mspa)c/ h">dri_ers_resource_n.6a>); pa86refs pa87.6a>void fs"c/ htmacode=dri_ers_remove_resourcesav/ mspa)c/ h">dri_ers_remove_resources.6a>(struct fs"c/ htmacode=dri_ersav/ mspa)c/ h">dri_ers.6a> *hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>) pa88.6a>{ pa89.6a> int fs"c/ htmacode=iav/ mspa)c/ h">i.6a>; pa90.6a> struct fs"c/ htmacode=dri_ers_resourceav/ mspa)c/ h">dri_ers_resource.6a> *hs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>, *hs"c/ htmacode=tmpav/ mspa)c/ h">tmp.6a>; pa91refs pa92.6a> for (fs"c/ htmacode=iav/ mspa)c/ h">i.6a> = 0; fs"c/ htmacode=iav/ mspa)c/ h">i.6a> < fs"c/ htmacode=PCI_BRIDGE_RESOURCE_NUMav/ mspa)c/ h">PCI_BRIDGE_RESOURCE_NUM.6a>; fs"c/ htmacode=iav/ mspa)c/ h">i.6a>++) pa93.6a> fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=resourceav/ mspa)c/ h">resource.6a>[fs"c/ htmacode=iav/ mspa)c/ h">i.6a>] = hs"c/ htmacode=NULLav/ mspa)c/ h">NULL.6a>; pa94refs pa95.6a> hs"c/ htmacode=list_for_each_entry_safeav/ mspa)c/ h">list_for_each_entry_safe.6a>(fs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>, hs"c/ htmacode=tmpav/ mspa)c/ h">tmp.6a>, &"fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=resourcesav/ mspa)c/ h">resources.6a>, hs"c/ htmacode=listav/ mspa)c/ h">list.6a>) { pa96.6a> hs"c/ htmacode=list_delav/ mspa)c/ h">list_del.6a>(&"fs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>-lt="fs"c/ htmacode=listav/ mspa)c/ h">list.6a>); pa97.6a> hs"c/ htmacode=kfreeav/ mspa)c/ h">kfree.6a>(fs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res.6a>); pa98.6a> } pa99refs} p100refs p101refsspa)c// mspa)commen |"/**htm/a>/ p102refsspa)c// mspa)commen |" *mdri_ers_alloc_resource - allocate a resource from a paren ers.6m/a>/ p103refsspa)c// mspa)commen |" * @ers: PCI ers.6m/a>/ p104refsspa)c// mspa)commen |" *m@res: resource to allocate.6m/a>/ p105refsspa)c// mspa)commen |" *m@size: size of resource to allocate.6m/a>/ p106refsspa)c// mspa)commen |" *m@align: alignmen of resource to allocate.6m/a>/ p107refsspa)c// mspa)commen |" *m@min: minimum /droc/iomem address to allocate.6m/a>/ p108refsspa)c// mspa)commen |" *m@fals_mask: IORESOURCE_* fals flags.6m/a>/ p109refsspa)c// mspa)commen |" *m@alignf: resource alignmen funtmfor.6m/a>/ p1v2.6a>spa)c// mspa)commen |" *m@alignf_data: data argumen for resource alignmen funtmfor.6m/a>/ p111refsspa)c// mspa)commen |" *htm/a>/ p112refsspa)c// mspa)commen |" *mGetun the PCI ers a device resides on, the size, minimum address,htm/a>/ p113refsspa)c// mspa)commen |" * alignmen and fals, try to find )c/acceptable resource allocatfor.6m/a>/ p114refsspa)c// mspa)commen |" *mfor a specific device resource..6m/a>/ p115refsspa)c// mspa)commen |" */htm/a>/ p116.6a>int p117.6a>fs"c/ htmacode=dri_ers_alloc_resourceav/ mspa)c/ h">dri_ers_alloc_resource.6a>(struct fs"c/ htmacode=dri_ersav/ mspa)c/ h">dri_ers.6a> *hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>, struct fs"c/ htmacode=resourceav/ mspa)c/ h">resource.6a> *hs"c/ htmacode=resav/ mspa)c/ h">res.6a>, p118.6a> fs"c/ htmacode=resource_size_nav/ mspa)c/ h">resource_size_n.6a> fs"c/ htmacode=sizeav/ mspa)c/ h">size.6a>, hs"c/ htmacode=resource_size_nav/ mspa)c/ h">resource_size_n.6a> fs"c/ htmacode=alignav/ mspa)c/ h">align.6a>, p119.6a> hs"c/ htmacode=resource_size_nav/ mspa)c/ h">resource_size_n.6a> fs"c/ htmacode=minav/ mspa)c/ h">min.6a>, unsigned int fs"c/ htmacode=fals_maskav/ mspa)c/ h">tals_mask.6a>, p120.6a> hs"c/ htmacode=resource_size_nav/ mspa)c/ h">resource_size_n.6a> (*hs"c/ htmacode=alignfav/ mspa)c/ h">alignf.6a>)(void *, p121.6a> const struct fs"c/ htmacode=resourceav/ mspa)c/ h">resource.6a> *, p122.6a> hs"c/ htmacode=resource_size_nav/ mspa)c/ h">resource_size_n.6a>, p123.6a> hs"c/ htmacode=resource_size_nav/ mspa)c/ h">resource_size_n.6a>), p124.6a> void *hs"c/ htmacode=alignf_dataav/ mspa)c/ h">alignf_data.6a>) p125.6a>{ p126.6a> int fs"c/ htmacode=iav/ mspa)c/ h">i.6a>, hs"c/ htmacode=renav/ mspa)c/ h">ren.6a> = -ss"c/ htmacode=ENOMEMav/ mspa)c/ h">ENOMEM.6a>; p127.6a> struct fs"c/ htmacode=resourceav/ mspa)c/ h">resource.6a> *hs"c/ htmacode=rav/ mspa)c/ h">r.6a>; p128.6a> hs"c/ htmacode=resource_size_nav/ mspa)c/ h">resource_size_n.6a> fs"c/ htmacode=maxav/ mspa)c/ h">max.6a> = -1; p129refs p130.6a> hs"c/ htmacode=fals_maskav/ mspa)c/ h">tals_mask.6a> |= hs"c/ htmacode=IORESOURCE_IOav/ mspa)c/ h">IORESOURCE_IO.6a> | hs"c/ htmacode=IORESOURCE_MEMav/ mspa)c/ h">IORESOURCE_MEM.6a>; p131refs p132.6a> hpa)c// mspa)commen |"/* don't allocate too high if the rn a mem doesn't support 64bit*/htm/a>/ p133.6a> if (!(hs"c/ htmacode=resav/ mspa)c/ h">res.6a>-lt="fs"c/ htmacode=flagsav/ mspa)c/ h">flags.6a> &" hs"c/ htmacode=IORESOURCE_MEM_64IORESOURCE_MEM_64.6a>)) p134.6a> fs"c/ htmacode=maxav/ mspa)c/ h">max.6a> = fs"c/ htmacode=PCIBIOS_MAX_MEM_32PCIBIOS_MAX_MEM_32.6a>; p135refs p136.6a> hs"c/ htmacode=dri_ers_for_each_resourceav/ mspa)c/ h">dri_ers_for_each_resource.6a>(fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>, hs"c/ htmacode=rav/ mspa)c/ h">r.6a>, hs"c/ htmacode=iav/ mspa)c/ h">i.6a>) { p137.6a> if (!hs"c/ htmacode=rav/ mspa)c/ h">r.6a>) p138.6a> continue; p139refs p140.6a> hpa)c// mspa)commen |"/* tals_mask must match */htm/a>/ p141.6a> if ((hs"c/ htmacode=resav/ mspa)c/ h">res.6a>-lt="fs"c/ htmacode=flagsav/ mspa)c/ h">flags.6a> ^ hs"c/ htmacode=rav/ mspa)c/ h">r.6a>-lt="fs"c/ htmacode=flagsav/ mspa)c/ h">flags.6a>) &" hs"c/ htmacode=fals_maskav/ mspa)c/ h">tals_mask.6a>) p142.6a> continue; p143refs p144.6a> fpa)c// mspa)commen |"/* We cannot allocate a non-rn aetching resource.6m/a>/ p145refsspa)c// mspa)commen |" from a pre-aetching area */htm/a>/ p146.6a> if ((hs"c/ htmacode=rav/ mspa)c/ h">r.6a>-lt="fs"c/ htmacode=flagsav/ mspa)c/ h">flags.6a> &" hs"c/ htmacode=IORESOURCE_PREFETCHIORESOURCE_PREFETCH.6a>) &"&" p147.6a> !(hs"c/ htmacode=resav/ mspa)c/ h">res.6a>-lt="fs"c/ htmacode=flagsav/ mspa)c/ h">flags.6a> &" hs"c/ htmacode=IORESOURCE_PREFETCHIORESOURCE_PREFETCH.6a>)) p148.6a> continue; p149refs p150.6a> hpa)c// mspa)commen |"/* Ok, try it out.. */htm/a>/ p151.6a> hs"c/ htmacode=renav/ mspa)c/ h">ren.6a> = hs"c/ htmacode=allocate_resourceav/ mspa)c/ h">allocate_resource.6a>(fs"c/ htmacode=rav/ mspa)c/ h">r.6a>, hs"c/ htmacode=resav/ mspa)c/ h">res.6a>, fs"c/ htmacode=sizeav/ mspa)c/ h">size.6a>, p152.6a> hs"c/ htmacode=rav/ mspa)c/ h">r.6a>-lt="fs"c/ htmacode=starnav/ mspa)c/ h">starn.6a> ? : fs"c/ htmacode=minav/ mspa)c/ h">min.6a>, p153.6a> fs"c/ htmacode=maxav/ mspa)c/ h">max.6a>, fs"c/ htmacode=alignav/ mspa)c/ h">align.6a>, p154.6a> fs"c/ htmacode=alignfav/ mspa)c/ h">alignf.6a>, fs"c/ htmacode=alignf_dataav/ mspa)c/ h">alignf_data.6a>)" p155.6a> if (hs"c/ htmacode=renav/ mspa)c/ h">ren.6a> == 0) p156.6a> break" p157.6a> } p158.6a> submit=fs"c/ htmacode=renav/ mspa)c/ h">ren.6a>" p159refs} p160refs p161refsspa)c// mspa)commen |"/**htm/a>/ p162refsspa)c// mspa)commen |" *mdri_ers_add_device - add a single devicehtm/a>/ p163refsspa)c// mspa)commen |" * @dev: device to addhtm/a>/ p164refsspa)c// mspa)commen |" *htm/a>/ p165refsspa)c// mspa)commen |" *mThis adds a single dri device to the globalhtm/a>/ p166refsspa)c// mspa)commen |" *mdevice list and adds sysfs and drocfs entries.6m/a>/ p167refsspa)c// mspa)commen |" */htm/a>/ p168.6a>int fs"c/ htmacode=dri_ers_add_deviceav/ mspa)c/ h">dri_ers_add_device.6a>(struct fs"c/ htmacode=dri_devav/ mspa)c/ h">dri_dev.6a> *hs"c/ htmacode=devav/ mspa)c/ h">dev.6a>) p169.6a>{ p170.6a> int fs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a>" p171refs p172.6a> hs"c/ htmacode=dri_fixup_deviceav/ mspa)c/ h">dri_fixup_device.6a>(fs"c/ htmacode=dri_fixup_finalav/ mspa)c/ h">dri_fixup_final.6a>, fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>)" p173.6a> fs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a> = hs"c/ htmacode=device_addav/ mspa)c/ h">device_add.6a>(&"fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>-lt="fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>)" p174.6a> if (hs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a>) p175.6a> submit=fs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a>" p176refs p177.6a> hs"c/ htmacode=devav/ mspa)c/ h">dev.6a>-lt="fs"c/ htmacode=is_addedav/ mspa)c/ h">is_added.6a> = 1; p178.6a> hs"c/ htmacode=dri_droc_attach_deviceav/ mspa)c/ h">dri_droc_attach_device.6a>(fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>)" p179.6a> hs"c/ htmacode=dri_create_sysfs_dev_filesav/ mspa)c/ h">dri_create_sysfs_dev_files.6a>(fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>)" p180.6a> submit=0" p181refs} p182.6a> p183refsspa)c// mspa)commen |"/**htm/a>/ p184refsspa)c// mspa)commen |" *mdri_ers_add_child - add a child ers.6m/a>/ p185refsspa)c// mspa)commen |" *m@ers: ers to addhtm/a>/ p186refsspa)c// mspa)commen |" *htm/a>/ p187refsspa)c// mspa)commen |" *mThis adds sysfs entriesmfor a single ers.6m/a>/ p188refsspa)c// mspa)commen |" */htm/a>/ p189.6a>int fs"c/ htmacode=dri_ers_add_childav/ mspa)c/ h">dri_ers_add_child.6a>(struct fs"c/ htmacode=dri_ersav/ mspa)c/ h">dri_ers.6a> *hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>) p190.6a>{ p191.6a> int fs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a>" p192.6a> p193.6a> if (hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=bridgeav/ mspa)c/ h">eridge.6a>) p194.6a> fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>.fs"c/ htmacode=daren av/ mspa)c/ h">daren .6a> = hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=bridgeav/ mspa)c/ h">eridge.6a>" p195refs p196.6a> hs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a> = hs"c/ htmacode=device_registerav/ mspa)c/ h">device_register.6a>(&"fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>)" p197.6a> if (hs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a>) p198.6a> submit=fs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a>" p199refs p200.6a> hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=is_addedav/ mspa)c/ h">is_added.6a> = 1; p201refs p202.6a> hpa)c// mspa)commen |"/* Create legacy_io and legacy_mem filesmfor this ers */htm/a>/ p203.6a> fs"c/ htmacode=dri_create_legacy_filesav/ mspa)c/ h">dri_create_legacy_files.6a>(fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>); p204refs p205.6a> submit=fs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a>" p206refs} p207refs p208refsspa)c// mspa)commen |"/**htm/a>/ p209refsspa)c// mspa)commen |" *mdri_ers_add_devices - insert newly discotured PCI deviceshtm/a>/ p2v2.6a>spa)c// mspa)commen |" *m@ers: ers to checkmfor new deviceshtm/a>/ p211refsspa)c// mspa)commen |" *htm/a>/ p212refsspa)c// mspa)commen |" *mAdd newly discotured PCI devices (which are on the ers-lt="deviceshtm/a>/ p213refsspa)c// mspa)commen |" * list) to the global PCI device list, add the sysfs and drocfshtm/a>/ p214refsspa)c// mspa)commen |" *mentries. Whure a bridge ismfound, add the discotured ers tohtm/a>/ p215refsspa)c// mspa)commen |" * the raren s list of child erses, and recurse (breadth-first.6m/a>/ p216refsspa)c// mspa)commen |" *mto be compatible with 2.4).6m/a>/ p217refsspa)c// mspa)commen |" *.6m/a>/ p218refsspa)c// mspa)commen |" *mCall hotplugmfor each new devices..6m/a>/ p219refsspa)c// mspa)commen |" */htm/a>/ p220.6a>void fs"c/ htmacode=dri_ers_add_devicesav/ mspa)c/ h">dri_ers_add_devices.6a>(const struct fs"c/ htmacode=dri_ersav/ mspa)c/ h">dri_ers.6a> *hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>) p221.6a>{ p222.6a> struct fs"c/ htmacode=dri_devav/ mspa)c/ h">dri_dev.6a> *hs"c/ htmacode=devav/ mspa)c/ h">dev.6a>" p223.6a> struct fs"c/ htmacode=dri_ersav/ mspa)c/ h">dri_ers.6a> *hs"c/ htmacode=childav/ mspa)c/ h">child.6a>" p224.6a> int fs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a>" p225refs p226.6a> hs"c/ htmacode=list_for_each_entryav/ mspa)c/ h">list_for_each_entry.6a>(fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>, &"fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=devicesav/ mspa)c/ h">devices.6a>, fs"c/ htmacode=ers_listav/ mspa)c/ h">ers_list.6a>) { p227.6a> hpa)c// mspa)commen |"/* Skip already-added devices */htm/a>/ p228.6a> if (hs"c/ htmacode=devav/ mspa)c/ h">dev.6a>-lt="fs"c/ htmacode=is_addedav/ mspa)c/ h">is_added.6a>) p229.6a> continue; p230.6a> hs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a> = hs"c/ htmacode=dri_ers_add_deviceav/ mspa)c/ h">dri_ers_add_device.6a>(fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>)" p231.6a> if (hs"c/ htmacode=renvalav/ mspa)c/ h">renval.6a>) p232.6a> fs"c/ htmacode=dev_errav/ mspa)c/ h">dev_err.6a>(&"fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>-lt="fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>, hpa)c// mspa)string">lquot;Error adding device, continuing\n"/)" p233.6a> } p234refs p235.6a> hs"c/ htmacode=list_for_each_entryav/ mspa)c/ h">list_for_each_entry.6a>(fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>, &"fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=devicesav/ mspa)c/ h">devices.6a>, fs"c/ htmacode=ers_listav/ mspa)c/ h">ers_list.6a>) { p236.6a> fs"c/ htmacode=BUG_ONav/ mspa)c/ h">BUG_ON.6a>(!hs"c/ htmacode=devav/ mspa)c/ h">dev.6a>-lt="fs"c/ htmacode=is_addedav/ mspa)c/ h">is_added.6a>)" p237refs p238.6a> hs"c/ htmacode=childav/ mspa)c/ h">child.6a> = hs"c/ htmacode=devav/ mspa)c/ h">dev.6a>-lt="fs"c/ htmacode=subordinateav/ mspa)c/ h">subordinate.6a>" p239.6a> hpa)c// mspa)commen |"/*htm/a>/ p242.6a>spa)c// mspa)commen |" * If there ism)c/unattached subordinate ers, attachhtm/a>/ p241refsspa)c// mspa)commen |" * i and fhen sc)c/for unattached PCI devices..6m/a>/ p242refsspa)c// mspa)commen |" */htm/a>/ p243.6a> if (!hs"c/ htmacode=childav/ mspa)c/ h">child.6a>) p244.6a> p230.6a> h45child.6a>) < h45childacotmacode=emacode=dri_ers_add_deviceav/ mspa)c/e|" *m@ers: ers to chefsspa)cs244subn>suc/ htm?return=dn>sus/p#Lp#L236 2f ((h2"c/ htmacode=rav/ mspa"/*htm/a>h">dev.6a>-lt="own_wri6a>" (fs"c/ htmacodesemrs/p#L237 2 !(2s"c/ htmacode=resav/ mspa)tm/a>h">dev.6a>-lt=ist_add_tail.6a>(&"fs"c/ htmacode=ers_resav/ mspa)c/ h">ers_res) subn>suc/ htm?return=dn>sus/p#mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=subordinateav/ mspa)c/ h">sub"fs"c/ htmacode=devicesav/ mspa)c/ h">devicesriverre"c/ htm?return=driverre"rs/p#L237p148.6a> 2 2 continue; devicesup_wri6a>" (fs"c/ htmacodesemrs/p#L237p149refs 2pa)c/2 mspa)commen |"/* Ok, ticesav/ mspa)c/ h">dri_ers_add_devices.6a>(const struct fs"c/ htmacode=dc/ h">child.6a>) 2s"c/ 25s/p#L202 2 2 hs"c/>/ 2 25 list) to the global PCI devvvvvvvvvvvvvvvvv* ode=ersas"c/ htmeturn= htm?resses, and re ersnowers/p#L240p154.6a> 2 25mentries. Whure a bridge isvvvvvvvvvvvvvvvv* properly ode=ersaedvers/p#L242 2f (hs25 from a pre-aetching area */ivers/p#L243 2 2 break" subed.6a>) } child.62P.6L158<2p158.6a> submit=f2"c/ h25macode=resource_size_nav/ mspa)c/ h">r = hs"c/ htmacode=dri_ers_add_deviceav/ mspa)c/ h">dri_ers_dd_child.6a>(struct fs"c/ htmacode=dri_ersc/ h">child.6a>) p159refs} renval.6a>) (&"fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>-lt="fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>, hpa)c// mspa)string">lquot;Error adding device, continuing\n"/ <_oturedevices.6a>(const stren>/ <_oturedev/ msav/ mspa)c/ h">dri_ers.6a> *hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>) dri_dev.6a> *hs"c/ htmacode=devav/ mspa)c/ h">dev.6a>" renval.6a>" int fs"c/ htmaco2e=dri2ers_ad225p169.6a>{ list_for_each_entry.6a>(fs"c/ htmacode=ers_resav/ mspa)c/ h">ers_resmp"fs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>-lt="fs"c/ htmacode=devicesav/ mspa)c/ h">devices.6a>, fs"c/ htmacode=ers_listav/ mspa)c/ h">ers_list.6a>) { int fs"c2 htma27/ htmacode=nav/ mspa)c/ h">n.6a>-- == 0)"fs"c/ htmacode=subordinateav/ mspa)c/ h">subordinate.6a>" child.6a>evavn=den>/ (struct fs"cn=den>/ dev.6a>)" hs"c/ ht2acode27 hs"c/ htmacode=rav/ mnav/ mspa)c/ h">r = hs"c/ htmacode=dri_ers_add_deviceav/ mspa)c/ h">en>/ <_add_device.6a>(fs"c/ htmaen>/ <_add_depa)c/ h">dev.6a>)" fs"c/ ht2acode27c/ htmacode=childav/ acode=nav/ mspa)c/ h">n.6a>-- == 0)a>) if (hs"c2 htma27p230.6a> htmacode=rav/ mnav/ mspa)c/ h".6a>(&"fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>-lt="fs"c/ htmacode=devav/ mspa)c/ h">dev.6a>, hpa)c// mspa)string">lquot;Error adding device, continuing\n&qen>/ ;ren.6a> = -ss" 2ubmit2fs"c/ htmacode=renvala htmacode=rav/ mnav/ mspa)c/ h"htmasetrivester.6a>(&"fs"chtmasetrivestepa)c/ h">dev.6a>)" hs"c/ ht2acode27"c/ htmacode=resav/ mspa)tm/a>h">dev.6a>-lt=/ h"en>/ <_oturedevices.6a>(const stren>/ <_oturedev/ ms">n.6a>-- == 0)"fs"c/ htmacode=subordinateav/ mspa)c/ h">subordinate.6a>" hs"c/ ht2acode27macode=resource_size_L234p179.6a> hs"c/ ht2acode2dri_create_sysL234 submit=02 / / / / /

/ / / p189.6a>int fs"c/ htmaco2e=dri28mdri_ers_add_devices - insert / { int fs"c2 htma29htm/a>/ if (hs"c2 htma29*htm/a>/ 2s"c/ 29mdri_ers_add_child - add a chvers/p#L243(const strwalkv/ mv/ msav/ mspa)c/ h">dri_ers.6a> *hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>) alignf.6cbc/ htm?return=drbs/p#pvav/ mspa)c/ h">dri_dev.6a> *hs"c/ htmacode=devav/ mspa)c/,dataav/#L124 hs"c/ ht2acode2tmacode=list_delav/ ms_dataav/ mspa)c/ h">aliuserignm>" if (hs"c2 htma2ode=reL236 2ubmit2fs"c/ htmacodeav/ mspa)c/ h">dri_dev.6a> *hs"c/ htmacode=devav/ mspa)c/ h">dev.6a>" dri_dev.6a> *hs"c/ htmacode=ersav/ mspa)c/ h">ers.6a>) hs"c/ ht3acode3ersav/ mspa)c/av/ mspa)c/ h">dri_dev htmaheahild.6a>(struct htmaheahspa)c/ h">ers.6a>) int fs"c3=driv30de=renvalav/ mspa)c/ h">renval.6a>" hpa)c// 3spa)c30s/p#L193 fs"c/ ht3acode3dri_create_legacy_filesav/ ms"c/ htm?return=drivers/p#_deviceav/ mspa)c/tops"c/ htmacode=etopuot;L192 3=driv304i_create_legacy_filesav/ ms"own_reahild.6a>(struct "own_reaha)cs244(fs"c/ htmacodesemrs/p#L237 submit=f3"c/ h30ist_for_each_entryav/ mspa)cnex { devices.6a>, fs"c/ htmacode=ers_listav/ a)c/ h">daren .6nex { hs"c/ ht3n=dri30macode=list_ders.6a>-lt="fs"c/ htmacode=devicesav/ mspa)c/ h">devices.6a>, fs"c/ htmacode=ers_listav/ p#L236 3en |"30continue; ers.6a>-lt="fs"c/ htmacode=bridgeav/_d=sviceav/ mspa)c/tops"c/ htmacode=etopuot;L232spa)c// mspa)com3en |"31mspa)commen |"/* Ok, ce_size_________rs/p#L157devicessels"c/ htmacode=alselsesav/ mspa)c/ h">devicesst.6a>) { daren .6nex { dev_err"c/ htm?return=drivers/p#_deviceav/ mspa)c/"fs"c/ htmacode=devicesav/ mspa)c/ h">devicessels"c/ htmacode=alselsesav/ mspa)c/ h">devicesst. htm?return=drivers/p#L223child.32P.6L214<3p214refsspa)c// mspa)com3en |"31p230.6aL234dev.6a>" (fs"c/ htmaresav/ mspa)c/ h">ers_resnex { dri_dev.6a> *hs"c/ htmacode=devav/ mspa)mspa)c/ h">ers_list.6a>) { child.326.6L205<3p216refsspa)c// mspa)com3en |"31break" subordinate.6a>" mask must match */htm/a>/eturers, new-newmrtured, do itsreturn=drnex rivers/p#L141devicesnex { subordinate.6a>" devices.6a>, fs"c/ htmacode=ers_listav/ a)c/ h">daren .6nex { dev_err"c/ htm?return=drivers/p#_deviceav/ mspa)c/"fs"c/ htmacode=subordinateav/ mspa)c/ h">subordinate.6a>" void fs"c/ htmac3de=dr32mspa)commen |"/* Ok, } else239{ sub"fs6a>) { daren .6nex { struct f3"c/ h32s/p#L193 struct f3"c/ h32c/ htmacode=childav/ nav/ mspa)c/ h">r = hs"c/ htmacode=dri_ers_add_deviceav/ mspa)c/cbc/ htm?return=drbs/p#pa)c/ h">ers_resmp"fs"c/ htmacode=ersav/ ms mspa)c/ h">aliuserignm>" int fs"c3 htma32p230.6ac/ h">n.6a>-- == 0)a>) hs"c/ ht3acode3list_for_each_L234 3pa)c/32evav/ mspa)c/ h">dev.6a>-lt=up_reahild.6a>(struct up_reaha)cs244(fs"c/ htmacodesemrs/p#L237 3f (hs3c/ htmL234 3 3 contipomL244(fs"c/ EXPORT_SYMBOL_GPLs/p#pa)c/ h">ers_res/ h"walkv/ mvices.6a>(const strwalkv/ mv/ m#L237 3s"c/ 33s/p#L161 3f (hs3c/ htmpomL244(fs"c/ EXPORT_SYMBOLs/p#pa)c/ h">ers_res/ h"/ htmmacors_for_each_resource.6a>(fs"c/ hmmacors_for_eav/ m#L237 3 3 fs"c/pomL244(fs"c/ EXPORT_SYMBOL_GPLs/p#pa)c/ h">ers_res/ h"bri_ers_add_device.6a>(fs"c/ htmacode=devav/ mspa)c#L237 } (fs"c/ EXPORT_SYMBOLs/p#pa)c/ h">ers_res/ h"/ htmers_add_devices.6a>(const struct fs"c/ htmacode=#L237(fs"c/ EXPORT_SYMBOLs/p#pa)c/ h">ers_res/ h"en>/ <_oturedevices.6a>(const stren>/ <_oturedev/ m#L237 hs"c/ ht3acode3list_f fooster> The origv/ m LXR softw/a>/by ort 37LXR tch unispa)cs,>/eturexperi */h m turfooster> xe. ux.no kindly hostturny 3764ovitmraof L uxa sult;