File tree Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -776,8 +776,8 @@ static void __init memblock_add_mem_detect_info(void)
776
776
unsigned long start , end ;
777
777
int i ;
778
778
779
- memblock_dbg ("physmem info source: %s (%hhd)\n" ,
780
- get_mem_info_source (), mem_detect .info_source );
779
+ pr_debug ("physmem info source: %s (%hhd)\n" ,
780
+ get_mem_info_source (), mem_detect .info_source );
781
781
/* keep memblock lists close to the kernel */
782
782
memblock_set_bottom_up (true);
783
783
for_each_mem_detect_block (i , & start , & end ) {
Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ struct memblock {
86
86
};
87
87
88
88
extern struct memblock memblock ;
89
- extern int memblock_debug ;
90
89
91
90
#ifndef CONFIG_ARCH_KEEP_MEMBLOCK
92
91
#define __init_memblock __meminit
@@ -98,9 +97,6 @@ void memblock_discard(void);
98
97
static inline void memblock_discard (void ) {}
99
98
#endif
100
99
101
- #define memblock_dbg (fmt , ...) \
102
- if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
103
-
104
100
phys_addr_t memblock_find_in_range (phys_addr_t start , phys_addr_t end ,
105
101
phys_addr_t size , phys_addr_t align );
106
102
void memblock_allow_resize (void );
@@ -476,13 +472,7 @@ bool memblock_is_region_memory(phys_addr_t base, phys_addr_t size);
476
472
bool memblock_is_reserved (phys_addr_t addr );
477
473
bool memblock_is_region_reserved (phys_addr_t base , phys_addr_t size );
478
474
479
- extern void __memblock_dump_all (void );
480
-
481
- static inline void memblock_dump_all (void )
482
- {
483
- if (memblock_debug )
484
- __memblock_dump_all ();
485
- }
475
+ void memblock_dump_all (void );
486
476
487
477
/**
488
478
* memblock_set_current_limit - Set the current allocation limit to allow
Original file line number Diff line number Diff line change @@ -137,7 +137,13 @@ struct memblock_type physmem = {
137
137
i < memblock_type->cnt; \
138
138
i++, rgn = &memblock_type->regions[i])
139
139
140
- int memblock_debug __initdata_memblock ;
140
+ #define memblock_dbg (fmt , ...) \
141
+ do { \
142
+ if (memblock_debug) \
143
+ pr_info(fmt, ##__VA_ARGS__); \
144
+ } while (0)
145
+
146
+ static int memblock_debug __initdata_memblock ;
141
147
static bool system_has_some_mirror __initdata_memblock = false;
142
148
static int memblock_can_resize __initdata_memblock ;
143
149
static int memblock_memory_in_slab __initdata_memblock = 0 ;
@@ -1920,7 +1926,7 @@ static void __init_memblock memblock_dump(struct memblock_type *type)
1920
1926
}
1921
1927
}
1922
1928
1923
- void __init_memblock __memblock_dump_all (void )
1929
+ static void __init_memblock __memblock_dump_all (void )
1924
1930
{
1925
1931
pr_info ("MEMBLOCK configuration:\n" );
1926
1932
pr_info (" memory size = %pa reserved size = %pa\n" ,
@@ -1934,6 +1940,12 @@ void __init_memblock __memblock_dump_all(void)
1934
1940
#endif
1935
1941
}
1936
1942
1943
+ void __init_memblock memblock_dump_all (void )
1944
+ {
1945
+ if (memblock_debug )
1946
+ __memblock_dump_all ();
1947
+ }
1948
+
1937
1949
void __init memblock_allow_resize (void )
1938
1950
{
1939
1951
memblock_can_resize = 1 ;
You can’t perform that action at this time.
0 commit comments