From patchwork Sat Jun 30 14:55:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10498251 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5A6A160284 for ; Sat, 30 Jun 2018 14:55:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CE6228F7E for ; Sat, 30 Jun 2018 14:55:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4164F29097; Sat, 30 Jun 2018 14:55:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4D5629045 for ; Sat, 30 Jun 2018 14:55:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AC2ED6B0275; Sat, 30 Jun 2018 10:55:40 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9D52E6B0276; Sat, 30 Jun 2018 10:55:40 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DBB56B0277; Sat, 30 Jun 2018 10:55:40 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr0-f199.google.com (mail-wr0-f199.google.com [209.85.128.199]) by kanga.kvack.org (Postfix) with ESMTP id 1D3806B0275 for ; Sat, 30 Jun 2018 10:55:40 -0400 (EDT) Received: by mail-wr0-f199.google.com with SMTP id b4-v6so6230935wrm.14 for ; Sat, 30 Jun 2018 07:55:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:in-reply-to:references:message-id; bh=bthGI5Iewhta5E/U4EoGgOlixMAspsNrdD6htoj2fU0=; b=o60RozYyabp2zhQAYTNrPU+6AhOLXR/1/Rm9/timG0BvOiPPe5ly/eEWR0EgyVLxzs NlMn8S2KdkRXKk1NEoxubHc/oh0uIJPZH0dbH/EE0w6itkRiuknmZpoeb+NKIRJs8o83 oYeBDo0nVQi/9PiDlJPUSy8qzx5EciqFmn/fXiI7KZpKPKEvHrhZvdy2PzCmezAMIbyJ kCHHiKrB0BJtajUifrOs3p/TQsFqyrOdqSCTEn7KWIZJa/YkzbhWxDcho/GEtIjkoA6i 5qRmYNpc6oo3LVOYk6k4DGJO3RzEYQxH6OK00pWSKdNstleA9H9a76mLK9IQCQTtHnx9 Ebsg== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: APt69E0LCq0dLuX9WbFjYpz0xX8oVME6dWEASXQk4nlb4xEOYyW3R1bd FIcdNHylz2xOMmg3/D+suj3Hx03M+OOg3OkLMeYgKx0FeBXMjN4Zl24/fQ54bRi326fVCfysnq+ c/ZUw1qALg0KIXyHR1P6YJx08j2dTYIKkPKXQSvsjilt9y2tlAsHxqegqlB5Nu28= X-Received: by 2002:a1c:b354:: with SMTP id c81-v6mr4573193wmf.149.1530370539660; Sat, 30 Jun 2018 07:55:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcBixflGoQipmyQdt0fT48RepVockF8GsVQVrZ+QKONRRYkEieBRu4GmgJgLX69Wk7MkRm/ X-Received: by 2002:a1c:b354:: with SMTP id c81-v6mr4573176wmf.149.1530370538905; Sat, 30 Jun 2018 07:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530370538; cv=none; d=google.com; s=arc-20160816; b=ix2Vum9ZfbcXIZxEws1OVAddtf0ZNeIgase10YlR9Fmi8lpLPjNbGrgde6ts5lxF/1 Hkgn2c/0/Kxo9TdGkppHQ/ev9vRJ0j7/ctoZ8bZRdGjRbt1EtfLbd0cGw6xkk06o56km XMHcoFsv/QGqnvY2VEyRDYTQNJLDGjo5hRmrc5VWkxFFfeuTHysQYW+qTGUQ2Wc97MyN t996/m6T8t88z2MhywX1wE3Ipg4bHmPkvesRHvGIg6tgHVy/+KLU06/LYo7yoL2kiL7e +ScAP5DiVEFRze30QfZHng3hDcg6nYgiLb469bNC6kvqQf/CHpBBuKR5Z5HZ3bhPiy6V TmBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:references:in-reply-to:date:subject:cc:to:from :arc-authentication-results; bh=bthGI5Iewhta5E/U4EoGgOlixMAspsNrdD6htoj2fU0=; b=uaqyYHWMT/UDj84Whn5IwVs/fSm/MvHLf6sdJNwtij4hUkfNwVp/7ED4zoMIxJSr/C KxS54dBY5TT9t9Rk9PRzBkF8qLQio6IDItIVqPRBNKgupG40CknF+u736GBeONuUXVfS ADBtEfHb4JG+5cr0Sj3JbDLJ7E99eWGU4CtiSBPEsNY8KVfwWSB/ZvjNO6KEiUE0csSt P803h4pSSAgOp5LbiVJ83aCuq+9/NlQ1fFcP0LWCnQj8O+ueXSVfTiOLGtkfv3OyS3xr bF40RIPeJYMP6KvA1BTTmXBHsmOEQ4QeNEnLtGjGYC9b/VzzT0Exl0cRMmPZKFqmHLhh gmQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id a63-v6si3560039wmh.41.2018.06.30.07.55.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Jun 2018 07:55:38 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.158.5; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5UErVH6124344 for ; Sat, 30 Jun 2018 10:55:37 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2jx5v4t9jt-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 30 Jun 2018 10:55:37 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 30 Jun 2018 15:55:35 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sat, 30 Jun 2018 15:55:33 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5UEtWYE30343200 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 30 Jun 2018 14:55:32 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 587C6A4053; Sat, 30 Jun 2018 15:55:18 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BBB08A4040; Sat, 30 Jun 2018 15:55:16 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.205.240]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Sat, 30 Jun 2018 15:55:16 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Sat, 30 Jun 2018 17:55:29 +0300 From: Mike Rapoport To: Jonathan Corbet Cc: Randy Dunlap , linux-doc , linux-mm , lkml , Mike Rapoport Subject: [PATCH v2 09/11] docs/mm: memblock: add kernel-doc description for memblock types Date: Sat, 30 Jun 2018 17:55:04 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530370506-21751-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1530370506-21751-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18063014-0008-0000-0000-0000024E31D6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18063014-0009-0000-0000-000021B43446 Message-Id: <1530370506-21751-10-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-06-30_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=950 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806300176 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Mike Rapoport --- include/linux/memblock.h | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 63704c6..5169205 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -20,7 +20,13 @@ #define INIT_MEMBLOCK_REGIONS 128 #define INIT_PHYSMEM_REGIONS 4 -/* Definition of memblock flags. */ +/** + * enum memblock_flags - definition of memory region attributes + * @MEMBLOCK_NONE: no special request + * @MEMBLOCK_HOTPLUG: hotpluggable region + * @MEMBLOCK_MIRROR: mirrored region + * @MEMBLOCK_NOMAP: don't add to kernel direct mapping + */ enum memblock_flags { MEMBLOCK_NONE = 0x0, /* No special request */ MEMBLOCK_HOTPLUG = 0x1, /* hotpluggable region */ @@ -28,6 +34,13 @@ enum memblock_flags { MEMBLOCK_NOMAP = 0x4, /* don't add to kernel direct mapping */ }; +/** + * struct memblock_region - represents a memory region + * @base: physical address of the region + * @size: size of the region + * @flags: memory region attributes + * @nid: NUMA node id + */ struct memblock_region { phys_addr_t base; phys_addr_t size; @@ -37,14 +50,30 @@ struct memblock_region { #endif }; +/** + * struct memblock_type - collection of memory regions of certain type + * @cnt: number of regions + * @max: size of the allocated array + * @total_size: size of all regions + * @regions: array of regions + * @name: the memory type symbolic name + */ struct memblock_type { - unsigned long cnt; /* number of regions */ - unsigned long max; /* size of the allocated array */ - phys_addr_t total_size; /* size of all regions */ + unsigned long cnt; + unsigned long max; + phys_addr_t total_size; struct memblock_region *regions; char *name; }; +/** + * struct memblock - memblock allocator metadata + * @bottom_up: is bottom up direction? + * @current_limit: physical address of the current allocation limit + * @memory: usabe memory regions + * @reserved: reserved memory regions + * @physmem: all physical memory + */ struct memblock { bool bottom_up; /* is bottom up direction? */ phys_addr_t current_limit;