Commit ee48444b authored by Michael Ellerman's avatar Michael Ellerman Committed by Paul Mackerras

[PATCH] ppc64: Reorganise the paca initialisation macros

This patch updates the macros that initialise the paca to remove the lpq
parameter. It also rearranges them a bit with the hope of making them a
bit clearer.
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 0c885c17
......@@ -42,20 +42,7 @@ extern unsigned long __toc_start;
* processors. The processor VPD array needs one entry per physical
* processor (not thread).
*/
#ifdef CONFIG_PPC_ISERIES
#define EXTRA_INITS(number, lpq) \
.lppaca_ptr = &paca[number].lppaca, \
.reg_save_ptr = &paca[number].reg_save, \
.reg_save = { \
.xDesc = 0xd397d9e2, /* "LpRS" */ \
.xSize = sizeof(struct ItLpRegSave) \
},
#else
#define EXTRA_INITS(number, lpq)
#endif
#define PACAINITDATA(number,start,lpq,asrr,asrv) \
{ \
#define PACA_INIT_COMMON(number, start, asrr, asrv) \
.lock_token = 0x8000, \
.paca_index = (number), /* Paca Index */ \
.default_decr = 0x00ff0000, /* Initial Decr */ \
......@@ -73,147 +60,79 @@ extern unsigned long __toc_start;
.end_of_quantum = 0xfffffffffffffffful, \
.slb_count = 64, \
}, \
EXTRA_INITS((number), (lpq)) \
}
struct paca_struct paca[] = {
#ifdef CONFIG_PPC_ISERIES
PACAINITDATA( 0, 1, &xItLpQueue, 0, STAB0_VIRT_ADDR),
#define PACA_INIT_ISERIES(number) \
.lppaca_ptr = &paca[number].lppaca, \
.reg_save_ptr = &paca[number].reg_save, \
.reg_save = { \
.xDesc = 0xd397d9e2, /* "LpRS" */ \
.xSize = sizeof(struct ItLpRegSave) \
}
#define PACA_INIT(number) \
{ \
PACA_INIT_COMMON(number, 0, 0, 0) \
PACA_INIT_ISERIES(number) \
}
#define BOOTCPU_PACA_INIT(number) \
{ \
PACA_INIT_COMMON(number, 1, 0, STAB0_VIRT_ADDR) \
PACA_INIT_ISERIES(number) \
}
#else
PACAINITDATA( 0, 1, NULL, STAB0_PHYS_ADDR, STAB0_VIRT_ADDR),
#define PACA_INIT(number) \
{ \
PACA_INIT_COMMON(number, 0, 0, 0) \
}
#define BOOTCPU_PACA_INIT(number) \
{ \
PACA_INIT_COMMON(number, 1, STAB0_PHYS_ADDR, STAB0_VIRT_ADDR) \
}
#endif
struct paca_struct paca[] = {
BOOTCPU_PACA_INIT(0),
#if NR_CPUS > 1
PACAINITDATA( 1, 0, NULL, 0, 0),
PACAINITDATA( 2, 0, NULL, 0, 0),
PACAINITDATA( 3, 0, NULL, 0, 0),
PACA_INIT( 1), PACA_INIT( 2), PACA_INIT( 3),
#if NR_CPUS > 4
PACAINITDATA( 4, 0, NULL, 0, 0),
PACAINITDATA( 5, 0, NULL, 0, 0),
PACAINITDATA( 6, 0, NULL, 0, 0),
PACAINITDATA( 7, 0, NULL, 0, 0),
PACA_INIT( 4), PACA_INIT( 5), PACA_INIT( 6), PACA_INIT( 7),
#if NR_CPUS > 8
PACAINITDATA( 8, 0, NULL, 0, 0),
PACAINITDATA( 9, 0, NULL, 0, 0),
PACAINITDATA(10, 0, NULL, 0, 0),
PACAINITDATA(11, 0, NULL, 0, 0),
PACAINITDATA(12, 0, NULL, 0, 0),
PACAINITDATA(13, 0, NULL, 0, 0),
PACAINITDATA(14, 0, NULL, 0, 0),
PACAINITDATA(15, 0, NULL, 0, 0),
PACAINITDATA(16, 0, NULL, 0, 0),
PACAINITDATA(17, 0, NULL, 0, 0),
PACAINITDATA(18, 0, NULL, 0, 0),
PACAINITDATA(19, 0, NULL, 0, 0),
PACAINITDATA(20, 0, NULL, 0, 0),
PACAINITDATA(21, 0, NULL, 0, 0),
PACAINITDATA(22, 0, NULL, 0, 0),
PACAINITDATA(23, 0, NULL, 0, 0),
PACAINITDATA(24, 0, NULL, 0, 0),
PACAINITDATA(25, 0, NULL, 0, 0),
PACAINITDATA(26, 0, NULL, 0, 0),
PACAINITDATA(27, 0, NULL, 0, 0),
PACAINITDATA(28, 0, NULL, 0, 0),
PACAINITDATA(29, 0, NULL, 0, 0),
PACAINITDATA(30, 0, NULL, 0, 0),
PACAINITDATA(31, 0, NULL, 0, 0),
PACA_INIT( 8), PACA_INIT( 9), PACA_INIT( 10), PACA_INIT( 11),
PACA_INIT( 12), PACA_INIT( 13), PACA_INIT( 14), PACA_INIT( 15),
PACA_INIT( 16), PACA_INIT( 17), PACA_INIT( 18), PACA_INIT( 19),
PACA_INIT( 20), PACA_INIT( 21), PACA_INIT( 22), PACA_INIT( 23),
PACA_INIT( 24), PACA_INIT( 25), PACA_INIT( 26), PACA_INIT( 27),
PACA_INIT( 28), PACA_INIT( 29), PACA_INIT( 30), PACA_INIT( 31),
#if NR_CPUS > 32
PACAINITDATA(32, 0, NULL, 0, 0),
PACAINITDATA(33, 0, NULL, 0, 0),
PACAINITDATA(34, 0, NULL, 0, 0),
PACAINITDATA(35, 0, NULL, 0, 0),
PACAINITDATA(36, 0, NULL, 0, 0),
PACAINITDATA(37, 0, NULL, 0, 0),
PACAINITDATA(38, 0, NULL, 0, 0),
PACAINITDATA(39, 0, NULL, 0, 0),
PACAINITDATA(40, 0, NULL, 0, 0),
PACAINITDATA(41, 0, NULL, 0, 0),
PACAINITDATA(42, 0, NULL, 0, 0),
PACAINITDATA(43, 0, NULL, 0, 0),
PACAINITDATA(44, 0, NULL, 0, 0),
PACAINITDATA(45, 0, NULL, 0, 0),
PACAINITDATA(46, 0, NULL, 0, 0),
PACAINITDATA(47, 0, NULL, 0, 0),
PACAINITDATA(48, 0, NULL, 0, 0),
PACAINITDATA(49, 0, NULL, 0, 0),
PACAINITDATA(50, 0, NULL, 0, 0),
PACAINITDATA(51, 0, NULL, 0, 0),
PACAINITDATA(52, 0, NULL, 0, 0),
PACAINITDATA(53, 0, NULL, 0, 0),
PACAINITDATA(54, 0, NULL, 0, 0),
PACAINITDATA(55, 0, NULL, 0, 0),
PACAINITDATA(56, 0, NULL, 0, 0),
PACAINITDATA(57, 0, NULL, 0, 0),
PACAINITDATA(58, 0, NULL, 0, 0),
PACAINITDATA(59, 0, NULL, 0, 0),
PACAINITDATA(60, 0, NULL, 0, 0),
PACAINITDATA(61, 0, NULL, 0, 0),
PACAINITDATA(62, 0, NULL, 0, 0),
PACAINITDATA(63, 0, NULL, 0, 0),
PACA_INIT( 32), PACA_INIT( 33), PACA_INIT( 34), PACA_INIT( 35),
PACA_INIT( 36), PACA_INIT( 37), PACA_INIT( 38), PACA_INIT( 39),
PACA_INIT( 40), PACA_INIT( 41), PACA_INIT( 42), PACA_INIT( 43),
PACA_INIT( 44), PACA_INIT( 45), PACA_INIT( 46), PACA_INIT( 47),
PACA_INIT( 48), PACA_INIT( 49), PACA_INIT( 50), PACA_INIT( 51),
PACA_INIT( 52), PACA_INIT( 53), PACA_INIT( 54), PACA_INIT( 55),
PACA_INIT( 56), PACA_INIT( 57), PACA_INIT( 58), PACA_INIT( 59),
PACA_INIT( 60), PACA_INIT( 61), PACA_INIT( 62), PACA_INIT( 63),
#if NR_CPUS > 64
PACAINITDATA(64, 0, NULL, 0, 0),
PACAINITDATA(65, 0, NULL, 0, 0),
PACAINITDATA(66, 0, NULL, 0, 0),
PACAINITDATA(67, 0, NULL, 0, 0),
PACAINITDATA(68, 0, NULL, 0, 0),
PACAINITDATA(69, 0, NULL, 0, 0),
PACAINITDATA(70, 0, NULL, 0, 0),
PACAINITDATA(71, 0, NULL, 0, 0),
PACAINITDATA(72, 0, NULL, 0, 0),
PACAINITDATA(73, 0, NULL, 0, 0),
PACAINITDATA(74, 0, NULL, 0, 0),
PACAINITDATA(75, 0, NULL, 0, 0),
PACAINITDATA(76, 0, NULL, 0, 0),
PACAINITDATA(77, 0, NULL, 0, 0),
PACAINITDATA(78, 0, NULL, 0, 0),
PACAINITDATA(79, 0, NULL, 0, 0),
PACAINITDATA(80, 0, NULL, 0, 0),
PACAINITDATA(81, 0, NULL, 0, 0),
PACAINITDATA(82, 0, NULL, 0, 0),
PACAINITDATA(83, 0, NULL, 0, 0),
PACAINITDATA(84, 0, NULL, 0, 0),
PACAINITDATA(85, 0, NULL, 0, 0),
PACAINITDATA(86, 0, NULL, 0, 0),
PACAINITDATA(87, 0, NULL, 0, 0),
PACAINITDATA(88, 0, NULL, 0, 0),
PACAINITDATA(89, 0, NULL, 0, 0),
PACAINITDATA(90, 0, NULL, 0, 0),
PACAINITDATA(91, 0, NULL, 0, 0),
PACAINITDATA(92, 0, NULL, 0, 0),
PACAINITDATA(93, 0, NULL, 0, 0),
PACAINITDATA(94, 0, NULL, 0, 0),
PACAINITDATA(95, 0, NULL, 0, 0),
PACAINITDATA(96, 0, NULL, 0, 0),
PACAINITDATA(97, 0, NULL, 0, 0),
PACAINITDATA(98, 0, NULL, 0, 0),
PACAINITDATA(99, 0, NULL, 0, 0),
PACAINITDATA(100, 0, NULL, 0, 0),
PACAINITDATA(101, 0, NULL, 0, 0),
PACAINITDATA(102, 0, NULL, 0, 0),
PACAINITDATA(103, 0, NULL, 0, 0),
PACAINITDATA(104, 0, NULL, 0, 0),
PACAINITDATA(105, 0, NULL, 0, 0),
PACAINITDATA(106, 0, NULL, 0, 0),
PACAINITDATA(107, 0, NULL, 0, 0),
PACAINITDATA(108, 0, NULL, 0, 0),
PACAINITDATA(109, 0, NULL, 0, 0),
PACAINITDATA(110, 0, NULL, 0, 0),
PACAINITDATA(111, 0, NULL, 0, 0),
PACAINITDATA(112, 0, NULL, 0, 0),
PACAINITDATA(113, 0, NULL, 0, 0),
PACAINITDATA(114, 0, NULL, 0, 0),
PACAINITDATA(115, 0, NULL, 0, 0),
PACAINITDATA(116, 0, NULL, 0, 0),
PACAINITDATA(117, 0, NULL, 0, 0),
PACAINITDATA(118, 0, NULL, 0, 0),
PACAINITDATA(119, 0, NULL, 0, 0),
PACAINITDATA(120, 0, NULL, 0, 0),
PACAINITDATA(121, 0, NULL, 0, 0),
PACAINITDATA(122, 0, NULL, 0, 0),
PACAINITDATA(123, 0, NULL, 0, 0),
PACAINITDATA(124, 0, NULL, 0, 0),
PACAINITDATA(125, 0, NULL, 0, 0),
PACAINITDATA(126, 0, NULL, 0, 0),
PACAINITDATA(127, 0, NULL, 0, 0),
PACA_INIT( 64), PACA_INIT( 65), PACA_INIT( 66), PACA_INIT( 67),
PACA_INIT( 68), PACA_INIT( 69), PACA_INIT( 70), PACA_INIT( 71),
PACA_INIT( 72), PACA_INIT( 73), PACA_INIT( 74), PACA_INIT( 75),
PACA_INIT( 76), PACA_INIT( 77), PACA_INIT( 78), PACA_INIT( 79),
PACA_INIT( 80), PACA_INIT( 81), PACA_INIT( 82), PACA_INIT( 83),
PACA_INIT( 84), PACA_INIT( 85), PACA_INIT( 86), PACA_INIT( 87),
PACA_INIT( 88), PACA_INIT( 89), PACA_INIT( 90), PACA_INIT( 91),
PACA_INIT( 92), PACA_INIT( 93), PACA_INIT( 94), PACA_INIT( 95),
PACA_INIT( 96), PACA_INIT( 97), PACA_INIT( 98), PACA_INIT( 99),
PACA_INIT(100), PACA_INIT(101), PACA_INIT(102), PACA_INIT(103),
PACA_INIT(104), PACA_INIT(105), PACA_INIT(106), PACA_INIT(107),
PACA_INIT(108), PACA_INIT(109), PACA_INIT(110), PACA_INIT(111),
PACA_INIT(112), PACA_INIT(113), PACA_INIT(114), PACA_INIT(115),
PACA_INIT(116), PACA_INIT(117), PACA_INIT(118), PACA_INIT(119),
PACA_INIT(120), PACA_INIT(121), PACA_INIT(122), PACA_INIT(123),
PACA_INIT(124), PACA_INIT(125), PACA_INIT(126), PACA_INIT(127),
#endif
#endif
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment