Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 00c6151

Browse files
committed
Merge 837c07c ("Merge tag 'powerpc-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux") into android-mainline
Steps on the way to 6.2-rc7 Change-Id: Ib886ece2731334ea0b39f45bb1db62ab52e8b33d Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2 parents 838ca2e + 837c07c commit 00c6151

File tree

114 files changed

+1168
-493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+1168
-493
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Domen Puncer <domen@coderock.org>
130130
Douglas Gilbert <dougg@torque.net>
131131
Ed L. Cashin <ecashin@coraid.com>
132132
Erik Kaneda <erik.kaneda@intel.com> <erik.schmauss@intel.com>
133+
Eugen Hristev <eugen.hristev@collabora.com> <eugen.hristev@microchip.com>
133134
Evgeniy Polyakov <johnpol@2ka.mipt.ru>
134135
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> <ezequiel@collabora.com>
135136
Felipe W Damasio <felipewd@terra.com.br>

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,13 +1245,17 @@ PAGE_SIZE multiple when read back.
12451245
This is a simple interface to trigger memory reclaim in the
12461246
target cgroup.
12471247

1248-
This file accepts a string which contains the number of bytes to
1249-
reclaim.
1248+
This file accepts a single key, the number of bytes to reclaim.
1249+
No nested keys are currently supported.
12501250

12511251
Example::
12521252

12531253
echo "1G" > memory.reclaim
12541254

1255+
The interface can be later extended with nested keys to
1256+
configure the reclaim behavior. For example, specify the
1257+
type of memory to reclaim from (anon, file, ..).
1258+
12551259
Please note that the kernel can over or under reclaim from
12561260
the target cgroup. If less bytes are reclaimed than the
12571261
specified amount, -EAGAIN is returned.
@@ -1263,13 +1267,6 @@ PAGE_SIZE multiple when read back.
12631267
This means that the networking layer will not adapt based on
12641268
reclaim induced by memory.reclaim.
12651269

1266-
This file also allows the user to specify the nodes to reclaim from,
1267-
via the 'nodes=' key, for example::
1268-
1269-
echo "1G nodes=0,1" > memory.reclaim
1270-
1271-
The above instructs the kernel to reclaim memory from nodes 0,1.
1272-
12731270
memory.peak
12741271
A read-only single value file which exists on non-root
12751272
cgroups.

Documentation/devicetree/bindings/rtc/qcom-pm8xxx-rtc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ properties:
4040
description:
4141
Indicates that the setting of RTC time is allowed by the host CPU.
4242

43+
wakeup-source: true
44+
4345
required:
4446
- compatible
4547
- reg

Documentation/virt/kvm/api.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8070,9 +8070,13 @@ considering the state as complete. VMM needs to ensure that the dirty
80708070
state is final and avoid missing dirty pages from another ioctl ordered
80718071
after the bitmap collection.
80728072

8073-
NOTE: One example of using the backup bitmap is saving arm64 vgic/its
8074-
tables through KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_SAVE_TABLES} command on
8075-
KVM device "kvm-arm-vgic-its" when dirty ring is enabled.
8073+
NOTE: Multiple examples of using the backup bitmap: (1) save vgic/its
8074+
tables through command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_SAVE_TABLES} on
8075+
KVM device "kvm-arm-vgic-its". (2) restore vgic/its tables through
8076+
command KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_RESTORE_TABLES} on KVM device
8077+
"kvm-arm-vgic-its". VGICv3 LPI pending status is restored. (3) save
8078+
vgic3 pending table through KVM_DEV_ARM_VGIC_{GRP_CTRL, SAVE_PENDING_TABLES}
8079+
command on KVM device "kvm-arm-vgic-v3".
80768080

80778081
8.30 KVM_CAP_XEN_HVM
80788082
--------------------

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15671,7 +15671,7 @@ OPENRISC ARCHITECTURE
1567115671
M: Jonas Bonn <jonas@southpole.se>
1567215672
M: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
1567315673
M: Stafford Horne <shorne@gmail.com>
15674-
L: openrisc@lists.librecores.org
15674+
L: linux-openrisc@vger.kernel.org
1567515675
S: Maintained
1567615676
W: http://openrisc.io
1567715677
T: git https://github.com/openrisc/linux.git

arch/arm64/kvm/vgic/vgic-its.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,7 @@ static int vgic_its_save_ite(struct vgic_its *its, struct its_device *dev,
21872187
((u64)ite->irq->intid << KVM_ITS_ITE_PINTID_SHIFT) |
21882188
ite->collection->collection_id;
21892189
val = cpu_to_le64(val);
2190-
return kvm_write_guest_lock(kvm, gpa, &val, ite_esz);
2190+
return vgic_write_guest_lock(kvm, gpa, &val, ite_esz);
21912191
}
21922192

21932193
/**
@@ -2339,7 +2339,7 @@ static int vgic_its_save_dte(struct vgic_its *its, struct its_device *dev,
23392339
(itt_addr_field << KVM_ITS_DTE_ITTADDR_SHIFT) |
23402340
(dev->num_eventid_bits - 1));
23412341
val = cpu_to_le64(val);
2342-
return kvm_write_guest_lock(kvm, ptr, &val, dte_esz);
2342+
return vgic_write_guest_lock(kvm, ptr, &val, dte_esz);
23432343
}
23442344

23452345
/**
@@ -2526,7 +2526,7 @@ static int vgic_its_save_cte(struct vgic_its *its,
25262526
((u64)collection->target_addr << KVM_ITS_CTE_RDBASE_SHIFT) |
25272527
collection->collection_id);
25282528
val = cpu_to_le64(val);
2529-
return kvm_write_guest_lock(its->dev->kvm, gpa, &val, esz);
2529+
return vgic_write_guest_lock(its->dev->kvm, gpa, &val, esz);
25302530
}
25312531

25322532
/*
@@ -2607,7 +2607,7 @@ static int vgic_its_save_collection_table(struct vgic_its *its)
26072607
*/
26082608
val = 0;
26092609
BUG_ON(cte_esz > sizeof(val));
2610-
ret = kvm_write_guest_lock(its->dev->kvm, gpa, &val, cte_esz);
2610+
ret = vgic_write_guest_lock(its->dev->kvm, gpa, &val, cte_esz);
26112611
return ret;
26122612
}
26132613

@@ -2743,7 +2743,6 @@ static int vgic_its_has_attr(struct kvm_device *dev,
27432743
static int vgic_its_ctrl(struct kvm *kvm, struct vgic_its *its, u64 attr)
27442744
{
27452745
const struct vgic_its_abi *abi = vgic_its_get_abi(its);
2746-
struct vgic_dist *dist = &kvm->arch.vgic;
27472746
int ret = 0;
27482747

27492748
if (attr == KVM_DEV_ARM_VGIC_CTRL_INIT) /* Nothing to do */
@@ -2763,9 +2762,7 @@ static int vgic_its_ctrl(struct kvm *kvm, struct vgic_its *its, u64 attr)
27632762
vgic_its_reset(kvm, its);
27642763
break;
27652764
case KVM_DEV_ARM_ITS_SAVE_TABLES:
2766-
dist->save_its_tables_in_progress = true;
27672765
ret = abi->save_tables(its);
2768-
dist->save_its_tables_in_progress = false;
27692766
break;
27702767
case KVM_DEV_ARM_ITS_RESTORE_TABLES:
27712768
ret = abi->restore_tables(its);
@@ -2792,7 +2789,7 @@ bool kvm_arch_allow_write_without_running_vcpu(struct kvm *kvm)
27922789
{
27932790
struct vgic_dist *dist = &kvm->arch.vgic;
27942791

2795-
return dist->save_its_tables_in_progress;
2792+
return dist->table_write_in_progress;
27962793
}
27972794

27982795
static int vgic_its_set_attr(struct kvm_device *dev,

arch/arm64/kvm/vgic/vgic-v3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ int vgic_v3_lpi_sync_pending_status(struct kvm *kvm, struct vgic_irq *irq)
339339
if (status) {
340340
/* clear consumed data */
341341
val &= ~(1 << bit_nr);
342-
ret = kvm_write_guest_lock(kvm, ptr, &val, 1);
342+
ret = vgic_write_guest_lock(kvm, ptr, &val, 1);
343343
if (ret)
344344
return ret;
345345
}
@@ -434,7 +434,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
434434
else
435435
val &= ~(1 << bit_nr);
436436

437-
ret = kvm_write_guest_lock(kvm, ptr, &val, 1);
437+
ret = vgic_write_guest_lock(kvm, ptr, &val, 1);
438438
if (ret)
439439
goto out;
440440
}

arch/arm64/kvm/vgic/vgic.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define __KVM_ARM_VGIC_NEW_H__
77

88
#include <linux/irqchip/arm-gic-common.h>
9+
#include <asm/kvm_mmu.h>
910

1011
#define PRODUCT_ID_KVM 0x4b /* ASCII code K */
1112
#define IMPLEMENTER_ARM 0x43b
@@ -131,6 +132,19 @@ static inline bool vgic_irq_is_multi_sgi(struct vgic_irq *irq)
131132
return vgic_irq_get_lr_count(irq) > 1;
132133
}
133134

135+
static inline int vgic_write_guest_lock(struct kvm *kvm, gpa_t gpa,
136+
const void *data, unsigned long len)
137+
{
138+
struct vgic_dist *dist = &kvm->arch.vgic;
139+
int ret;
140+
141+
dist->table_write_in_progress = true;
142+
ret = kvm_write_guest_lock(kvm, gpa, data, len);
143+
dist->table_write_in_progress = false;
144+
145+
return ret;
146+
}
147+
134148
/*
135149
* This struct provides an intermediate representation of the fields contained
136150
* in the GICH_VMCR and ICH_VMCR registers, such that code exporting the GIC

arch/ia64/kernel/sys_ia64.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, u
170170
asmlinkage long
171171
ia64_clock_getres(const clockid_t which_clock, struct __kernel_timespec __user *tp)
172172
{
173+
struct timespec64 rtn_tp;
174+
s64 tick_ns;
175+
173176
/*
174177
* ia64's clock_gettime() syscall is implemented as a vdso call
175178
* fsys_clock_gettime(). Currently it handles only
@@ -185,8 +188,8 @@ ia64_clock_getres(const clockid_t which_clock, struct __kernel_timespec __user *
185188
switch (which_clock) {
186189
case CLOCK_REALTIME:
187190
case CLOCK_MONOTONIC:
188-
s64 tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, local_cpu_data->itc_freq);
189-
struct timespec64 rtn_tp = ns_to_timespec64(tick_ns);
191+
tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, local_cpu_data->itc_freq);
192+
rtn_tp = ns_to_timespec64(tick_ns);
190193
return put_timespec64(&rtn_tp, tp);
191194
}
192195

arch/parisc/kernel/firmware.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ static char iodc_dbuf[4096] __page_aligned_bss;
13031303
*/
13041304
int pdc_iodc_print(const unsigned char *str, unsigned count)
13051305
{
1306-
unsigned int i;
1306+
unsigned int i, found = 0;
13071307
unsigned long flags;
13081308

13091309
count = min_t(unsigned int, count, sizeof(iodc_dbuf));
@@ -1315,6 +1315,7 @@ int pdc_iodc_print(const unsigned char *str, unsigned count)
13151315
iodc_dbuf[i+0] = '\r';
13161316
iodc_dbuf[i+1] = '\n';
13171317
i += 2;
1318+
found = 1;
13181319
goto print;
13191320
default:
13201321
iodc_dbuf[i] = str[i];
@@ -1330,7 +1331,7 @@ int pdc_iodc_print(const unsigned char *str, unsigned count)
13301331
__pa(pdc_result), 0, __pa(iodc_dbuf), i, 0);
13311332
spin_unlock_irqrestore(&pdc_lock, flags);
13321333

1333-
return i;
1334+
return i - found;
13341335
}
13351336

13361337
#if !defined(BOOTLOADER)

arch/parisc/kernel/ptrace.c

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ long arch_ptrace(struct task_struct *child, long request,
126126
unsigned long tmp;
127127
long ret = -EIO;
128128

129+
unsigned long user_regs_struct_size = sizeof(struct user_regs_struct);
130+
#ifdef CONFIG_64BIT
131+
if (is_compat_task())
132+
user_regs_struct_size /= 2;
133+
#endif
134+
129135
switch (request) {
130136

131137
/* Read the word at location addr in the USER area. For ptraced
@@ -166,7 +172,7 @@ long arch_ptrace(struct task_struct *child, long request,
166172
addr >= sizeof(struct pt_regs))
167173
break;
168174
if (addr == PT_IAOQ0 || addr == PT_IAOQ1) {
169-
data |= 3; /* ensure userspace privilege */
175+
data |= PRIV_USER; /* ensure userspace privilege */
170176
}
171177
if ((addr >= PT_GR1 && addr <= PT_GR31) ||
172178
addr == PT_IAOQ0 || addr == PT_IAOQ1 ||
@@ -181,14 +187,14 @@ long arch_ptrace(struct task_struct *child, long request,
181187
return copy_regset_to_user(child,
182188
task_user_regset_view(current),
183189
REGSET_GENERAL,
184-
0, sizeof(struct user_regs_struct),
190+
0, user_regs_struct_size,
185191
datap);
186192

187193
case PTRACE_SETREGS: /* Set all gp regs in the child. */
188194
return copy_regset_from_user(child,
189195
task_user_regset_view(current),
190196
REGSET_GENERAL,
191-
0, sizeof(struct user_regs_struct),
197+
0, user_regs_struct_size,
192198
datap);
193199

194200
case PTRACE_GETFPREGS: /* Get the child FPU state. */
@@ -285,7 +291,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
285291
if (addr >= sizeof(struct pt_regs))
286292
break;
287293
if (addr == PT_IAOQ0+4 || addr == PT_IAOQ1+4) {
288-
data |= 3; /* ensure userspace privilege */
294+
data |= PRIV_USER; /* ensure userspace privilege */
289295
}
290296
if (addr >= PT_FR0 && addr <= PT_FR31 + 4) {
291297
/* Special case, fp regs are 64 bits anyway */
@@ -302,6 +308,11 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
302308
}
303309
}
304310
break;
311+
case PTRACE_GETREGS:
312+
case PTRACE_SETREGS:
313+
case PTRACE_GETFPREGS:
314+
case PTRACE_SETFPREGS:
315+
return arch_ptrace(child, request, addr, data);
305316

306317
default:
307318
ret = compat_ptrace_request(child, request, addr, data);
@@ -484,7 +495,7 @@ static void set_reg(struct pt_regs *regs, int num, unsigned long val)
484495
case RI(iaoq[0]):
485496
case RI(iaoq[1]):
486497
/* set 2 lowest bits to ensure userspace privilege: */
487-
regs->iaoq[num - RI(iaoq[0])] = val | 3;
498+
regs->iaoq[num - RI(iaoq[0])] = val | PRIV_USER;
488499
return;
489500
case RI(sar): regs->sar = val;
490501
return;

arch/powerpc/include/asm/book3s/64/tlbflush.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ static inline void tlb_flush(struct mmu_gather *tlb)
9797
{
9898
if (radix_enabled())
9999
radix__tlb_flush(tlb);
100+
101+
return hash__tlb_flush(tlb);
100102
}
101103

102104
#ifdef CONFIG_SMP

0 commit comments

Comments
 (0)