On Mon, Sep 3, 2012 at 2:08 AM, Ram Pai <linuxram@xxxxxxxxxx> wrote: > On Mon, Sep 03, 2012 at 01:07:46AM -0700, Yinghai Lu wrote: > > Anyway I am ok with either patch. please check -v7. final next_idx finding will be like: static inline unsigned long *get_res_idx_mask(int flag) { return res_idx_mask[flag & ((1 << PCI_RES_BLOCK_NUM) - 1)]; } int pci_next_resource_idx(int i, int flag) { i++; if (i < PCI_NUM_RESOURCES) i = find_next_bit(get_res_idx_mask(flag), PCI_NUM_RESOURCES, i); if (i < PCI_NUM_RESOURCES) return i; return -1; } Thanks Yinghai
Attachment:
ram_pci_it_v7.patch
Description: Binary data