Skip to content

Commit 09a81ff

Browse files
Automatic merge of 'next' into merge (2025-02-26 10:09)
2 parents fab91eb + 65acbd1 commit 09a81ff

File tree

9 files changed

+34
-94
lines changed

9 files changed

+34
-94
lines changed

arch/powerpc/include/asm/time.h

-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ static inline unsigned long tb_ticks_since(unsigned long tstamp)
8989
#define mulhdu(x, y) mul_u64_u64_shr(x, y, 64)
9090
#endif
9191

92-
extern void div128_by_32(u64 dividend_high, u64 dividend_low,
93-
unsigned divisor, struct div_result *dr);
94-
9592
extern void secondary_cpu_time_init(void);
9693
extern void __init time_init(void);
9794

arch/powerpc/include/asm/xics.h

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#ifdef CONFIG_PPC_ICP_NATIVE
3232
extern int icp_native_init(void);
3333
extern void icp_native_flush_interrupt(void);
34-
extern void icp_native_cause_ipi_rm(int cpu);
3534
#else
3635
static inline int icp_native_init(void) { return -ENODEV; }
3736
#endif

arch/powerpc/kernel/time.c

+32-33
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,38 @@ void secondary_cpu_time_init(void)
901901
register_decrementer_clockevent(smp_processor_id());
902902
}
903903

904+
/*
905+
* Divide a 128-bit dividend by a 32-bit divisor, leaving a 128 bit
906+
* result.
907+
*/
908+
static __init void div128_by_32(u64 dividend_high, u64 dividend_low,
909+
unsigned int divisor, struct div_result *dr)
910+
{
911+
unsigned long a, b, c, d;
912+
unsigned long w, x, y, z;
913+
u64 ra, rb, rc;
914+
915+
a = dividend_high >> 32;
916+
b = dividend_high & 0xffffffff;
917+
c = dividend_low >> 32;
918+
d = dividend_low & 0xffffffff;
919+
920+
w = a / divisor;
921+
ra = ((u64)(a - (w * divisor)) << 32) + b;
922+
923+
rb = ((u64)do_div(ra, divisor) << 32) + c;
924+
x = ra;
925+
926+
rc = ((u64)do_div(rb, divisor) << 32) + d;
927+
y = rb;
928+
929+
do_div(rc, divisor);
930+
z = rc;
931+
932+
dr->result_high = ((u64)w << 32) + x;
933+
dr->result_low = ((u64)y << 32) + z;
934+
}
935+
904936
/* This function is only called on the boot processor */
905937
void __init time_init(void)
906938
{
@@ -974,39 +1006,6 @@ void __init time_init(void)
9741006
enable_sched_clock_irqtime();
9751007
}
9761008

977-
/*
978-
* Divide a 128-bit dividend by a 32-bit divisor, leaving a 128 bit
979-
* result.
980-
*/
981-
void div128_by_32(u64 dividend_high, u64 dividend_low,
982-
unsigned divisor, struct div_result *dr)
983-
{
984-
unsigned long a, b, c, d;
985-
unsigned long w, x, y, z;
986-
u64 ra, rb, rc;
987-
988-
a = dividend_high >> 32;
989-
b = dividend_high & 0xffffffff;
990-
c = dividend_low >> 32;
991-
d = dividend_low & 0xffffffff;
992-
993-
w = a / divisor;
994-
ra = ((u64)(a - (w * divisor)) << 32) + b;
995-
996-
rb = ((u64) do_div(ra, divisor) << 32) + c;
997-
x = ra;
998-
999-
rc = ((u64) do_div(rb, divisor) << 32) + d;
1000-
y = rb;
1001-
1002-
do_div(rc, divisor);
1003-
z = rc;
1004-
1005-
dr->result_high = ((u64)w << 32) + x;
1006-
dr->result_low = ((u64)y << 32) + z;
1007-
1008-
}
1009-
10101009
/* We don't need to calibrate delay, we use the CPU timebase for that */
10111010
void calibrate_delay(void)
10121011
{

arch/powerpc/kernel/vmlinux.lds.S

-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2-
#ifdef CONFIG_PPC64
3-
#define PROVIDE32(x) PROVIDE(__unused__##x)
4-
#else
5-
#define PROVIDE32(x) PROVIDE(x)
6-
#endif
7-
82
#define BSS_FIRST_SECTIONS *(.bss.prominit)
93
#define EMITS_PT_NOTE
104
#define RO_EXCEPTION_TABLE_ALIGN 0
@@ -127,7 +121,6 @@ SECTIONS
127121

128122
. = ALIGN(PAGE_SIZE);
129123
_etext = .;
130-
PROVIDE32 (etext = .);
131124

132125
/* Read-only data */
133126
RO_DATA(PAGE_SIZE)
@@ -394,7 +387,6 @@ SECTIONS
394387

395388
. = ALIGN(PAGE_SIZE);
396389
_edata = .;
397-
PROVIDE32 (edata = .);
398390

399391
/*
400392
* And finally the bss
@@ -404,7 +396,6 @@ SECTIONS
404396

405397
. = ALIGN(PAGE_SIZE);
406398
_end = . ;
407-
PROVIDE32 (end = .);
408399

409400
DWARF_DEBUG
410401
ELF_DETAILS

arch/powerpc/kvm/book3s_32_mmu_host.c

-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ static u32 *kvmppc_mmu_get_pteg(struct kvm_vcpu *vcpu, u32 vsid, u32 eaddr,
125125
return (u32*)pteg;
126126
}
127127

128-
extern char etext[];
129-
130128
int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *orig_pte,
131129
bool iswrite)
132130
{

arch/powerpc/mm/mem.c

-22
Original file line numberDiff line numberDiff line change
@@ -319,28 +319,6 @@ void __init mem_init(void)
319319
per_cpu(next_tlbcam_idx, smp_processor_id()) =
320320
(mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY) - 1;
321321
#endif
322-
323-
#ifdef CONFIG_PPC32
324-
pr_info("Kernel virtual memory layout:\n");
325-
#ifdef CONFIG_KASAN
326-
pr_info(" * 0x%08lx..0x%08lx : kasan shadow mem\n",
327-
KASAN_SHADOW_START, KASAN_SHADOW_END);
328-
#endif
329-
pr_info(" * 0x%08lx..0x%08lx : fixmap\n", FIXADDR_START, FIXADDR_TOP);
330-
#ifdef CONFIG_HIGHMEM
331-
pr_info(" * 0x%08lx..0x%08lx : highmem PTEs\n",
332-
PKMAP_BASE, PKMAP_ADDR(LAST_PKMAP));
333-
#endif /* CONFIG_HIGHMEM */
334-
if (ioremap_bot != IOREMAP_TOP)
335-
pr_info(" * 0x%08lx..0x%08lx : early ioremap\n",
336-
ioremap_bot, IOREMAP_TOP);
337-
pr_info(" * 0x%08lx..0x%08lx : vmalloc & ioremap\n",
338-
VMALLOC_START, VMALLOC_END);
339-
#ifdef MODULES_VADDR
340-
pr_info(" * 0x%08lx..0x%08lx : modules\n",
341-
MODULES_VADDR, MODULES_END);
342-
#endif
343-
#endif /* CONFIG_PPC32 */
344322
}
345323

346324
void free_initmem(void)

arch/powerpc/platforms/44x/uic.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#define UIC_VR 0x7
3838
#define UIC_VCR 0x8
3939

40-
struct uic *primary_uic;
40+
static struct uic *primary_uic;
4141

4242
struct uic {
4343
int index;

arch/powerpc/sysdev/ipic.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -762,8 +762,7 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
762762
ipic_write(ipic->regs, IPIC_SIMSR_H, 0);
763763
ipic_write(ipic->regs, IPIC_SIMSR_L, 0);
764764

765-
printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS,
766-
primary_ipic->regs);
765+
pr_info("IPIC (%d IRQ sources) at MMIO %pa\n", NR_IPIC_INTS, &res.start);
767766

768767
return ipic;
769768
}

arch/powerpc/sysdev/xics/icp-native.c

-21
Original file line numberDiff line numberDiff line change
@@ -145,27 +145,6 @@ static void icp_native_cause_ipi(int cpu)
145145
icp_native_set_qirr(cpu, IPI_PRIORITY);
146146
}
147147

148-
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
149-
void icp_native_cause_ipi_rm(int cpu)
150-
{
151-
/*
152-
* Currently not used to send IPIs to another CPU
153-
* on the same core. Only caller is KVM real mode.
154-
* Need the physical address of the XICS to be
155-
* previously saved in kvm_hstate in the paca.
156-
*/
157-
void __iomem *xics_phys;
158-
159-
/*
160-
* Just like the cause_ipi functions, it is required to
161-
* include a full barrier before causing the IPI.
162-
*/
163-
xics_phys = paca_ptrs[cpu]->kvm_hstate.xics_phys;
164-
mb();
165-
__raw_rm_writeb(IPI_PRIORITY, xics_phys + XICS_MFRR);
166-
}
167-
#endif
168-
169148
/*
170149
* Called when an interrupt is received on an off-line CPU to
171150
* clear the interrupt, so that the CPU can go back to nap mode.

0 commit comments

Comments
 (0)