:1000000000CA040000A00000007E828B007C038BED :10001000008001B8007C038B00D4401E00EE001E5F :1000200000CA040000A00000007E828B00C41838C3 :1000300000CA240000CA2800009581A800C41C3A08 :1000400000C3C00000CA080000CA0C00007C744B4A :1000500000C200050099C00000C41C3A007C744C2A :1000600000C0FFF000042C0400309002007D250049 :1000700000351402007D350B00255403007CD5802B :1000800000259C030095C00400D5001B007EDDC147 :10009000007D9D8000D6801B00D5801B00D4401EB3 :1000A00000D5401E00D6401E00D6801E00D4801E03 :1000B00000D4C01E009783D300D5C01E00CA08001C :1000C0000080001A00CA0C0000E4011E00D4001ECB :1000D0000080000C00C4183800E4013E00D4001E6B :1000E0000080000C00C4183800D4401E00EE001E32 :1000F00000CA040000A00000007E828B00E4011E04 :1001000000D4001E00D4401E00EE001E00CA0400F1 :1001100000A00000007E828B00E4013E00D4001E9F :1001200000D4401E00EE001E00CA040000A0000023 :10013000007E828B00CA180000D4401E00D5801EAD :100140000080005300D4007500D4401E00CA08008F :1001500000CA0C0000CA100000D4801900D4C018D6 :1001600000D5001700D4801E00D4C01E00D5001E8C :1001700000E2001E00CA040000A00000007E828B86 :1001800000CA080000D4806000D4401E0080000037 :1001900000D4801E00CA080000D4806100D4401E34 :1001A0000080000000D4801E00CA080000CA0C00B5 :1001B00000D4401E00D4801600D4C01600D4801E87 :1001C000008001B800D4C01E00C6084300CA0C005D :1001D00000CA10000094800400CA140000E420F358 :1001E00000D4201300D5606500D4E01C00D5201C8D :1001F00000D5601C008000000006200100C60843F6 :1002000000CA0C0000CA1000009483F700CA140052 :1002100000E420F30080007900D4201300C60843D6 :1002200000CA0C0000CA1000009883EF00CA140036 :1002300000D400640080008D0000000000C414326F :1002400000C6184300C4082F0095400500C40C30B8 :1002500000D4401E0080000000EE001E009583F5D3 :1002600000C4103100D4403300D5206500D4A01C58 :1002700000D4E01C00D5201C00E4015E00D4001E68 :10028000008000000006200100CA1800000A2001BA :1002900000D6007600C408360098800700C61045D6 :1002A0000095011000D4001F00D46062008000009F :1002B00000D4206200CC383500CC1433008401BB5C :1002C00000D4007200D5401E0080000000EE001E29 :1002D00000E2001A008401BB00E2001A00CC104BBF :1002E00000CC0447002C9401007D098B0098400548 :1002F000007D15CB00D4001A008001B800D4006D39 :100300000034440100CC0C480098403A00CC2C4A00 :100310000095800400CC0449008001B800D4001A84 :1003200000D4C01A00282801008400F000CC10037B :100330000098801B0004380C008400F000CC1003EF :100340000098801700043808008400F000CC1003E7 :100350000098801300043804008400F000CC1003DF :100360000098801400CC104C009A800900CC144DE9 :10037000009840DC00D4006D00CC184800D5001A6D :1003800000D5401A008000C900D5801A0096C0D55B :1003900000D4006D008001B800D4006E009AC00344 :1003A00000D4006D00D4006E0080000000EC007FDF :1003B000009AC0CC00D4006D008001B800D4006E5B :1003C00000CC140300CC180300CC1C03007D910367 :1003D000007DD583007D190C0035CC1F0035701FC2 :1003E000007CF0CB007CD08B00880000007E8E8BE0 :1003F0000095C00400D4006E008001B800D4001A3B :1004000000D4C01A00CC080300CC0C0300CC1003AD :1004100000CC140300CC180300CC1C0300CC240334 :1004200000CC28030035C41F0036B01F007C704B81 :100430000034F01F007C704B0035701F007C704B47 :10044000007D8881007DCCC1007E5101007E9541F8 :10045000007C9082007CD4C2007C848B009AC00314 :10046000007C8C8B002C88010098809E00D4006D4D :100470000098409C00D4006E00CC084C00CC0C4D81 :1004800000CC104800D4801A00D4C01A00800101AA :1004900000D5001A00CC083200D40032009482D972 :1004A00000CA0C0000D4401E0080000000D4001ED2 :1004B00000E4011E00D4001E00CA080000CA0C009F :1004C00000CA100000D4401E00CA140000D4801ED0 :1004D00000D4C01E00D5001E00D5401E00D54034FB :1004E0000080000000EE001E0028040400E2001A54 :1004F00000E2001A00D4401A00CA380000CC0803F9 :1005000000CC0C0300CC0C0300CC0C03009882BD83 :1005100000000000008401BB00D7A06F0080000035 :1005200000EE001F00CA040000C2FF0000CC083427 :1005300000C13FFF007C74CB007CC90B007D010F24 :10054000009902B0007C738B008401BB00D7A06FC0 :100550000080000000EE001F00CA080000281900FB :10056000007D898B009580140028140400CA0C00BB :1005700000CA100000CA1C0000CA240000E2001FCC :1005800000D4C01A00D5001A00D5401A00CC1803B8 :1005900000CC2C0300CC2C0300CC2C03007DA58BBD :1005A000007D9C4700984297000000000080016198 :1005B00000D4C01A00D4401E00D4801E0080000069 :1005C00000EE001E00E4011E00D4001E00D4401EF8 :1005D00000EE001E00CA040000A00000007E828B16 :1005E00000E4013E00D4001E00D4401E00EE001EB8 :1005F00000CA040000A00000007E828B00CA080030 :1006000000248C06000CCC060098C00600CC104ECE :100610000099000400D4007300E4011E00D4001E01 :1006200000D4401E00D4801E0080000000EE001E9A :1006300000CA080000CA0C000034D01800251001C0 :100640000095002100C17FFF00CA100000CA1400FD :1006500000CA180000D4801D00D4C01D007DB18BDD :1006600000C1420200C2C00100D5801D0034DC0E72 :10067000007D5D4C007F734C00D7401E00D5001EEE :1006800000D5401E00C1420000C2C00000099C010C :100690000031DC10007F5F4C007F734C00042802A7 :1006A000007D838000D5A86F00D5806600D7401EEE :1006B00000EC005E00C8240200C82402008001B8DB :1006C00000D6007600D4401E00D4801E00D4C01E88 :1006D0000080000000EE001E0080000000EE001F01 :1006E00000D4001F0080000000D4001F00D4001FB1 :1006F0000088000000D4001F00000000000000007F :1007000000000000000000000000000000000000E9 :1007100000000000000000000000000000000000D9 :1007200000000000000000000000000000000000C9 :1007300000000000000000000000000000000000B9 :1007400000000000000000000000000000000000A9 :100750000000000000000000000000000000000099 :100760000000000000000000000000000000000089 :100770000000000000000000000000000000000079 :100780000000000000000000000000000000000069 :100790000000000000000000000000000000000059 :1007A0000000000000000000000000000000000049 :1007B0000000000000000000000000000000000039 :1007C0000000000000000000000000000000000029 :1007D0000000000000000000000000000000000019 :1007E0000000000000000000000000000000000009 :1007F00000000000000000000000000000000000F9 :1008000000010171000201780003008F0004007FE5 :10081000000500030006003F000700320008012C1D :1008200000090046000A0036001001B6001700A2B9 :100830000022013A00230149002000B400240125D0 :100840000027004D0028006A002A0060002B00529B :10085000002F0065003200870034017F003C015604 :10086000003F00720041018C0044012E00550173CD :100870000056017A0060000B00610034006200380D :1008800000630038006400380065003800660038F6 :10089000006700380068003A00690041006A0048BB :1008A000006B0048006C0048006D0048006E004876 :1008B000006F00480000000600000006000000066F :1008C0000000000600000006000000060000000610 :1008D0000000000600000006000000060000000600 :1008E00000000006000000060000000600000006F0 :1008F00000000006000000060000000600000006E0 :00000001FF exist in starting throw it away later in the CPU online callback. But that's a horrible hack and not required at all because RAPL becomes functional for perf only in the CPU online callback. That's correct because user space is not yet informed about the CPU being onlined, so nothing caan rely on RAPL being available on that particular CPU. Move the allocation to the CPU online callback and simplify the hotplug handling. At this point the package mapping is established and correct. This also adds a missing check for available package data in the event_init() function. Reported-by: Yasuaki Ishimatsu <yasu.isimatu@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Stephane Eranian <eranian@google.com> Cc: Vince Weaver <vincent.weaver@maine.edu> Fixes: 9d85eb9119f4 ("x86/smpboot: Make logical package management more robust") Link: http://lkml.kernel.org/r/20170131230141.212593966@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>