--- zzzz-none-000/linux-4.1.52/include/linux/mmzone.h 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/include/linux/mmzone.h 2022-03-02 11:37:13.000000000 +0000 @@ -301,6 +301,12 @@ */ ZONE_DMA32, #endif +#if defined(CONFIG_BCM_KF_ARM_BCM963XX) && defined(CONFIG_BCM_ZONE_ACP) + /* + * a specific memory zone allocated for ACP purpose in BCM63xx platform + */ + ZONE_ACP, +#endif /* * Normal addressable memory is in ZONE_NORMAL. DMA operations can be * performed on pages in ZONE_NORMAL if the DMA devices support @@ -817,7 +823,9 @@ #ifdef CONFIG_HAVE_MEMORY_PRESENT void memory_present(int nid, unsigned long start, unsigned long end); #else -static inline void memory_present(int nid, unsigned long start, unsigned long end) {} +static inline void memory_present(int nid __maybe_unused, + unsigned long start __maybe_unused, + unsigned long end __maybe_unused) {} #endif #ifdef CONFIG_HAVE_MEMORYLESS_NODES @@ -853,7 +861,7 @@ } #endif -static inline int is_highmem_idx(enum zone_type idx) +static inline int is_highmem_idx(enum zone_type idx __maybe_unused) { #ifdef CONFIG_HIGHMEM return (idx == ZONE_HIGHMEM || @@ -869,7 +877,7 @@ * to ZONE_{DMA/NORMAL/HIGHMEM/etc} in general code to a minimum. * @zone - pointer to struct zone variable */ -static inline int is_highmem(struct zone *zone) +static inline int is_highmem(struct zone *zone __maybe_unused) { #ifdef CONFIG_HIGHMEM int zone_off = (char *)zone - (char *)zone->zone_pgdat->node_zones; @@ -880,6 +888,12 @@ return 0; #endif } +#if defined(CONFIG_BCM_KF_ARM_BCM963XX) && defined(CONFIG_BCM_ZONE_ACP) +static inline int is_acp(struct zone *zone) +{ + return zone == zone->zone_pgdat->node_zones + ZONE_ACP; +} +#endif /* These two functions are used to setup the per zone pages min values */ struct ctl_table; @@ -954,7 +968,7 @@ return zoneref->zone_idx; } -static inline int zonelist_node_idx(struct zoneref *zoneref) +static inline int zonelist_node_idx(struct zoneref *zoneref __maybe_unused) { #ifdef CONFIG_NUMA /* zone_to_nid not available in this context */ @@ -1038,7 +1052,7 @@ #if !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) && \ !defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) -static inline unsigned long early_pfn_to_nid(unsigned long pfn) +static inline unsigned long early_pfn_to_nid(unsigned long pfn __maybe_unused) { return 0; } @@ -1260,8 +1274,9 @@ int memmap_valid_within(unsigned long pfn, struct page *page, struct zone *zone); #else -static inline int memmap_valid_within(unsigned long pfn, - struct page *page, struct zone *zone) +static inline int memmap_valid_within(unsigned long pfn __maybe_unused, + struct page *page __maybe_unused, + struct zone *zone __maybe_unused) { return 1; }