lkml.org 
[lkml]   [2017]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC 2/8] cxgb4: setup pcie memory window 4 and create p2pmem region
From
Date

> +static void setup_memwin_p2pmem(struct adapter *adap)
> +{
> + unsigned int mem_base = t4_read_reg(adap, CIM_EXTMEM2_BASE_ADDR_A);
> + unsigned int mem_size = t4_read_reg(adap, CIM_EXTMEM2_ADDR_SIZE_A);
> +
> + if (!use_p2pmem)
> + return;

This is weird, why even call this if !use_p2pmem?

> +static int init_p2pmem(struct adapter *adapter)
> +{
> + unsigned int mem_size = t4_read_reg(adapter, CIM_EXTMEM2_ADDR_SIZE_A);
> + struct p2pmem_dev *p;
> + int rc;
> + struct resource res;
> +
> + if (!mem_size || !use_p2pmem)
> + return 0;

Again, weird...

\
 
 \ /
  Last update: 2017-04-04 12:43    [W:0.135 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site