From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933056AbcCHKde (ORCPT ); Tue, 8 Mar 2016 05:33:34 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:22271 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932828AbcCHKcf (ORCPT ); Tue, 8 Mar 2016 05:32:35 -0500 From: Lino Sanfilippo To: Subject: Question concerning function illegal_highdma CC: Lino Sanfilippo , Message-ID: <56DEAA3A.4080207@marvell.com> Date: Tue, 8 Mar 2016 11:32:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-03-08_04:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1601100000 definitions=main-1603080188 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, while trying to understand the meaning of the net_device flag NETIF_F_HIGHDMA I came across the function illegal_highdma() which seems to perform two tasks: 1. Check if a network interface is able to handle high memory pages 2. Check if a network interface is able to handle the resulting DMA addresses What I dont understand is why both conditions are only checked if CONFIG_HIGHMEM is set. For 1. this makes sense, of course. But why is 2. also only checked with CONFIG_HIGHMEM? Should not 2. always be checked, regardless of whether high memory exists in the system or not? Thanks for any enlightenment in advance! Regards, Lino