Merge f01c30de86
("Merge tag 'vfs-5.10-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux") into android-mainline
Steps on the way to 5.10-rc4 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Iba36d2244c4229d44e3d391ed23dc25c6022f917
This commit is contained in:
commit
73936cf2dd
@ -57,7 +57,7 @@ examples:
|
||||
};
|
||||
|
||||
can@53fc8000 {
|
||||
compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
|
||||
compatible = "fsl,imx53-flexcan", "fsl,imx25-flexcan";
|
||||
reg = <0x53fc8000 0x4000>;
|
||||
interrupts = <82>;
|
||||
clocks = <&clks IMX5_CLK_CAN1_IPG_GATE>, <&clks IMX5_CLK_CAN1_SERIAL_GATE>;
|
||||
|
@ -20,14 +20,17 @@ properties:
|
||||
- fsl,imx8qm-flexcan
|
||||
- fsl,imx8mp-flexcan
|
||||
- fsl,imx6q-flexcan
|
||||
- fsl,imx53-flexcan
|
||||
- fsl,imx35-flexcan
|
||||
- fsl,imx28-flexcan
|
||||
- fsl,imx25-flexcan
|
||||
- fsl,p1010-flexcan
|
||||
- fsl,vf610-flexcan
|
||||
- fsl,ls1021ar2-flexcan
|
||||
- fsl,lx2160ar1-flexcan
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx53-flexcan
|
||||
- fsl,imx35-flexcan
|
||||
- const: fsl,imx25-flexcan
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx7d-flexcan
|
||||
@ -81,11 +84,12 @@ properties:
|
||||
req_bit is the bit offset of CAN stop request.
|
||||
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
items:
|
||||
- description: The 'gpr' is the phandle to general purpose register node.
|
||||
- description: The 'req_gpr' is the gpr register offset of CAN stop request.
|
||||
maximum: 0xff
|
||||
- description: The 'req_bit' is the bit offset of CAN stop request.
|
||||
maximum: 0x1f
|
||||
items:
|
||||
- description: The 'gpr' is the phandle to general purpose register node.
|
||||
- description: The 'req_gpr' is the gpr register offset of CAN stop request.
|
||||
maximum: 0xff
|
||||
- description: The 'req_bit' is the bit offset of CAN stop request.
|
||||
maximum: 0x1f
|
||||
|
||||
fsl,clk-source:
|
||||
description: |
|
||||
|
@ -44,20 +44,20 @@ int kprobe_exceptions_notify(struct notifier_block *self,
|
||||
unsigned long val, void *data);
|
||||
|
||||
/* optinsn template addresses */
|
||||
extern __visible kprobe_opcode_t optprobe_template_entry;
|
||||
extern __visible kprobe_opcode_t optprobe_template_val;
|
||||
extern __visible kprobe_opcode_t optprobe_template_call;
|
||||
extern __visible kprobe_opcode_t optprobe_template_end;
|
||||
extern __visible kprobe_opcode_t optprobe_template_sub_sp;
|
||||
extern __visible kprobe_opcode_t optprobe_template_add_sp;
|
||||
extern __visible kprobe_opcode_t optprobe_template_restore_begin;
|
||||
extern __visible kprobe_opcode_t optprobe_template_restore_orig_insn;
|
||||
extern __visible kprobe_opcode_t optprobe_template_restore_end;
|
||||
extern __visible kprobe_opcode_t optprobe_template_entry[];
|
||||
extern __visible kprobe_opcode_t optprobe_template_val[];
|
||||
extern __visible kprobe_opcode_t optprobe_template_call[];
|
||||
extern __visible kprobe_opcode_t optprobe_template_end[];
|
||||
extern __visible kprobe_opcode_t optprobe_template_sub_sp[];
|
||||
extern __visible kprobe_opcode_t optprobe_template_add_sp[];
|
||||
extern __visible kprobe_opcode_t optprobe_template_restore_begin[];
|
||||
extern __visible kprobe_opcode_t optprobe_template_restore_orig_insn[];
|
||||
extern __visible kprobe_opcode_t optprobe_template_restore_end[];
|
||||
|
||||
#define MAX_OPTIMIZED_LENGTH 4
|
||||
#define MAX_OPTINSN_SIZE \
|
||||
((unsigned long)&optprobe_template_end - \
|
||||
(unsigned long)&optprobe_template_entry)
|
||||
((unsigned long)optprobe_template_end - \
|
||||
(unsigned long)optprobe_template_entry)
|
||||
#define RELATIVEJUMP_SIZE 4
|
||||
|
||||
struct arch_optimized_insn {
|
||||
|
@ -85,21 +85,21 @@ asm (
|
||||
"optprobe_template_end:\n");
|
||||
|
||||
#define TMPL_VAL_IDX \
|
||||
((unsigned long *)&optprobe_template_val - (unsigned long *)&optprobe_template_entry)
|
||||
((unsigned long *)optprobe_template_val - (unsigned long *)optprobe_template_entry)
|
||||
#define TMPL_CALL_IDX \
|
||||
((unsigned long *)&optprobe_template_call - (unsigned long *)&optprobe_template_entry)
|
||||
((unsigned long *)optprobe_template_call - (unsigned long *)optprobe_template_entry)
|
||||
#define TMPL_END_IDX \
|
||||
((unsigned long *)&optprobe_template_end - (unsigned long *)&optprobe_template_entry)
|
||||
((unsigned long *)optprobe_template_end - (unsigned long *)optprobe_template_entry)
|
||||
#define TMPL_ADD_SP \
|
||||
((unsigned long *)&optprobe_template_add_sp - (unsigned long *)&optprobe_template_entry)
|
||||
((unsigned long *)optprobe_template_add_sp - (unsigned long *)optprobe_template_entry)
|
||||
#define TMPL_SUB_SP \
|
||||
((unsigned long *)&optprobe_template_sub_sp - (unsigned long *)&optprobe_template_entry)
|
||||
((unsigned long *)optprobe_template_sub_sp - (unsigned long *)optprobe_template_entry)
|
||||
#define TMPL_RESTORE_BEGIN \
|
||||
((unsigned long *)&optprobe_template_restore_begin - (unsigned long *)&optprobe_template_entry)
|
||||
((unsigned long *)optprobe_template_restore_begin - (unsigned long *)optprobe_template_entry)
|
||||
#define TMPL_RESTORE_ORIGN_INSN \
|
||||
((unsigned long *)&optprobe_template_restore_orig_insn - (unsigned long *)&optprobe_template_entry)
|
||||
((unsigned long *)optprobe_template_restore_orig_insn - (unsigned long *)optprobe_template_entry)
|
||||
#define TMPL_RESTORE_END \
|
||||
((unsigned long *)&optprobe_template_restore_end - (unsigned long *)&optprobe_template_entry)
|
||||
((unsigned long *)optprobe_template_restore_end - (unsigned long *)optprobe_template_entry)
|
||||
|
||||
/*
|
||||
* ARM can always optimize an instruction when using ARM ISA, except
|
||||
@ -234,7 +234,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *or
|
||||
}
|
||||
|
||||
/* Copy arch-dep-instance from template. */
|
||||
memcpy(code, (unsigned long *)&optprobe_template_entry,
|
||||
memcpy(code, (unsigned long *)optprobe_template_entry,
|
||||
TMPL_END_IDX * sizeof(kprobe_opcode_t));
|
||||
|
||||
/* Adjust buffer according to instruction. */
|
||||
|
@ -269,6 +269,8 @@ extern struct arm64_ftr_reg arm64_ftr_reg_ctrel0;
|
||||
/*
|
||||
* CPU feature detected at boot time based on feature of one or more CPUs.
|
||||
* All possible conflicts for a late CPU are ignored.
|
||||
* NOTE: this means that a late CPU with the feature will *not* cause the
|
||||
* capability to be advertised by cpus_have_*cap()!
|
||||
*/
|
||||
#define ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE \
|
||||
(ARM64_CPUCAP_SCOPE_LOCAL_CPU | \
|
||||
|
@ -86,6 +86,8 @@
|
||||
#define QCOM_CPU_PART_FALKOR_V1 0x800
|
||||
#define QCOM_CPU_PART_FALKOR 0xC00
|
||||
#define QCOM_CPU_PART_KRYO 0x200
|
||||
#define QCOM_CPU_PART_KRYO_2XX_GOLD 0x800
|
||||
#define QCOM_CPU_PART_KRYO_2XX_SILVER 0x801
|
||||
#define QCOM_CPU_PART_KRYO_3XX_SILVER 0x803
|
||||
#define QCOM_CPU_PART_KRYO_4XX_GOLD 0x804
|
||||
#define QCOM_CPU_PART_KRYO_4XX_SILVER 0x805
|
||||
@ -116,6 +118,8 @@
|
||||
#define MIDR_QCOM_FALKOR_V1 MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR_V1)
|
||||
#define MIDR_QCOM_FALKOR MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR)
|
||||
#define MIDR_QCOM_KRYO MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO)
|
||||
#define MIDR_QCOM_KRYO_2XX_GOLD MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_2XX_GOLD)
|
||||
#define MIDR_QCOM_KRYO_2XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_2XX_SILVER)
|
||||
#define MIDR_QCOM_KRYO_3XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_3XX_SILVER)
|
||||
#define MIDR_QCOM_KRYO_4XX_GOLD MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_4XX_GOLD)
|
||||
#define MIDR_QCOM_KRYO_4XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_4XX_SILVER)
|
||||
|
@ -299,6 +299,8 @@ static const struct midr_range erratum_845719_list[] = {
|
||||
MIDR_REV_RANGE(MIDR_CORTEX_A53, 0, 0, 4),
|
||||
/* Brahma-B53 r0p[0] */
|
||||
MIDR_REV(MIDR_BRAHMA_B53, 0, 0),
|
||||
/* Kryo2XX Silver rAp4 */
|
||||
MIDR_REV(MIDR_QCOM_KRYO_2XX_SILVER, 0xa, 0x4),
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
@ -1341,6 +1341,8 @@ static bool unmap_kernel_at_el0(const struct arm64_cpu_capabilities *entry,
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A73),
|
||||
MIDR_ALL_VERSIONS(MIDR_HISI_TSV110),
|
||||
MIDR_ALL_VERSIONS(MIDR_NVIDIA_CARMEL),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_2XX_GOLD),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_2XX_SILVER),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_3XX_SILVER),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_SILVER),
|
||||
{ /* sentinel */ }
|
||||
|
@ -127,7 +127,7 @@ static void *image_load(struct kimage *image,
|
||||
kernel_segment->mem, kbuf.bufsz,
|
||||
kernel_segment->memsz);
|
||||
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KEXEC_IMAGE_VERIFY_SIG
|
||||
|
@ -528,14 +528,13 @@ static void erratum_1418040_thread_switch(struct task_struct *prev,
|
||||
bool prev32, next32;
|
||||
u64 val;
|
||||
|
||||
if (!(IS_ENABLED(CONFIG_ARM64_ERRATUM_1418040) &&
|
||||
cpus_have_const_cap(ARM64_WORKAROUND_1418040)))
|
||||
if (!IS_ENABLED(CONFIG_ARM64_ERRATUM_1418040))
|
||||
return;
|
||||
|
||||
prev32 = is_compat_thread(task_thread_info(prev));
|
||||
next32 = is_compat_thread(task_thread_info(next));
|
||||
|
||||
if (prev32 == next32)
|
||||
if (prev32 == next32 || !this_cpu_has_cap(ARM64_WORKAROUND_1418040))
|
||||
return;
|
||||
|
||||
val = read_sysreg(cntkctl_el1);
|
||||
|
@ -118,6 +118,7 @@ static enum mitigation_state spectre_v2_get_cpu_hw_mitigation_state(void)
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A55),
|
||||
MIDR_ALL_VERSIONS(MIDR_BRAHMA_B53),
|
||||
MIDR_ALL_VERSIONS(MIDR_HISI_TSV110),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_2XX_SILVER),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_3XX_SILVER),
|
||||
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_SILVER),
|
||||
{ /* sentinel */ }
|
||||
|
@ -66,7 +66,6 @@ static int cpu_psci_cpu_disable(unsigned int cpu)
|
||||
|
||||
static void cpu_psci_cpu_die(unsigned int cpu)
|
||||
{
|
||||
int ret;
|
||||
/*
|
||||
* There are no known implementations of PSCI actually using the
|
||||
* power state field, pass a sensible default for now.
|
||||
@ -74,9 +73,7 @@ static void cpu_psci_cpu_die(unsigned int cpu)
|
||||
u32 state = PSCI_POWER_STATE_TYPE_POWER_DOWN <<
|
||||
PSCI_0_2_POWER_STATE_TYPE_SHIFT;
|
||||
|
||||
ret = psci_ops.cpu_off(state);
|
||||
|
||||
pr_crit("unable to power off CPU%u (%d)\n", cpu, ret);
|
||||
psci_ops.cpu_off(state);
|
||||
}
|
||||
|
||||
static int cpu_psci_cpu_kill(unsigned int cpu)
|
||||
|
@ -470,6 +470,7 @@ void cpu_die_early(void)
|
||||
|
||||
/* Mark this CPU absent */
|
||||
set_cpu_present(cpu, 0);
|
||||
rcu_report_dead(cpu);
|
||||
|
||||
if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) {
|
||||
update_cpu_boot_status(CPU_KILL_ME);
|
||||
|
@ -1444,11 +1444,28 @@ static void __remove_pgd_mapping(pgd_t *pgdir, unsigned long start, u64 size)
|
||||
free_empty_tables(start, end, PAGE_OFFSET, PAGE_END);
|
||||
}
|
||||
|
||||
static bool inside_linear_region(u64 start, u64 size)
|
||||
{
|
||||
/*
|
||||
* Linear mapping region is the range [PAGE_OFFSET..(PAGE_END - 1)]
|
||||
* accommodating both its ends but excluding PAGE_END. Max physical
|
||||
* range which can be mapped inside this linear mapping range, must
|
||||
* also be derived from its end points.
|
||||
*/
|
||||
return start >= __pa(_PAGE_OFFSET(vabits_actual)) &&
|
||||
(start + size - 1) <= __pa(PAGE_END - 1);
|
||||
}
|
||||
|
||||
int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_params *params)
|
||||
{
|
||||
int ret, flags = 0;
|
||||
|
||||
if (!inside_linear_region(start, size)) {
|
||||
pr_err("[%llx %llx] is outside linear mapping region\n", start, start + size);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (rodata_full || debug_pagealloc_enabled())
|
||||
flags = NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS;
|
||||
|
||||
|
@ -49,7 +49,7 @@ static void disk_release_events(struct gendisk *disk);
|
||||
* Set disk capacity and notify if the size is not currently
|
||||
* zero and will not be set to zero
|
||||
*/
|
||||
void set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size,
|
||||
bool set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size,
|
||||
bool update_bdev)
|
||||
{
|
||||
sector_t capacity = get_capacity(disk);
|
||||
@ -62,7 +62,10 @@ void set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size,
|
||||
char *envp[] = { "RESIZE=1", NULL };
|
||||
|
||||
kobject_uevent_env(&disk_to_dev(disk)->kobj, KOBJ_CHANGE, envp);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(set_capacity_revalidate_and_notify);
|
||||
|
@ -255,7 +255,8 @@ static void loop_set_size(struct loop_device *lo, loff_t size)
|
||||
|
||||
bd_set_nr_sectors(bdev, size);
|
||||
|
||||
set_capacity_revalidate_and_notify(lo->lo_disk, size, false);
|
||||
if (!set_capacity_revalidate_and_notify(lo->lo_disk, size, false))
|
||||
kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
@ -1518,6 +1518,7 @@ static void nbd_release(struct gendisk *disk, fmode_t mode)
|
||||
if (test_bit(NBD_RT_DISCONNECT_ON_CLOSE, &nbd->config->runtime_flags) &&
|
||||
bdev->bd_openers == 0)
|
||||
nbd_disconnect_and_put(nbd);
|
||||
bdput(bdev);
|
||||
|
||||
nbd_config_put(nbd);
|
||||
nbd_put(nbd);
|
||||
|
@ -1114,6 +1114,7 @@ static const struct aspeed_gpio_config ast2500_config =
|
||||
|
||||
static const struct aspeed_bank_props ast2600_bank_props[] = {
|
||||
/* input output */
|
||||
{4, 0xffffffff, 0x00ffffff}, /* Q/R/S/T */
|
||||
{5, 0xffffffff, 0xffffff00}, /* U/V/W/X */
|
||||
{6, 0x0000ffff, 0x0000ffff}, /* Y/Z */
|
||||
{ },
|
||||
|
@ -343,8 +343,8 @@ static int dwapb_irq_set_type(struct irq_data *d, u32 type)
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int dwapb_irq_set_wake(struct irq_data *d, unsigned int enable)
|
||||
{
|
||||
struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d);
|
||||
struct dwapb_gpio *gpio = igc->private;
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct dwapb_gpio *gpio = to_dwapb_gpio(gc);
|
||||
struct dwapb_context *ctx = gpio->ports[0].ctx;
|
||||
irq_hw_number_t bit = irqd_to_hwirq(d);
|
||||
|
||||
|
@ -1114,13 +1114,23 @@ static void omap_gpio_idle(struct gpio_bank *bank, bool may_lose_context)
|
||||
{
|
||||
struct device *dev = bank->chip.parent;
|
||||
void __iomem *base = bank->base;
|
||||
u32 nowake;
|
||||
u32 mask, nowake;
|
||||
|
||||
bank->saved_datain = readl_relaxed(base + bank->regs->datain);
|
||||
|
||||
if (!bank->enabled_non_wakeup_gpios)
|
||||
goto update_gpio_context_count;
|
||||
|
||||
/* Check for pending EDGE_FALLING, ignore EDGE_BOTH */
|
||||
mask = bank->enabled_non_wakeup_gpios & bank->context.fallingdetect;
|
||||
mask &= ~bank->context.risingdetect;
|
||||
bank->saved_datain |= mask;
|
||||
|
||||
/* Check for pending EDGE_RISING, ignore EDGE_BOTH */
|
||||
mask = bank->enabled_non_wakeup_gpios & bank->context.risingdetect;
|
||||
mask &= ~bank->context.fallingdetect;
|
||||
bank->saved_datain &= ~mask;
|
||||
|
||||
if (!may_lose_context)
|
||||
goto update_gpio_context_count;
|
||||
|
||||
|
@ -28,6 +28,47 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* PLX PEX8311 PCI LCS_INTCSR Interrupt Control/Status
|
||||
*
|
||||
* Bit: Description
|
||||
* 0: Enable Interrupt Sources (Bit 0)
|
||||
* 1: Enable Interrupt Sources (Bit 1)
|
||||
* 2: Generate Internal PCI Bus Internal SERR# Interrupt
|
||||
* 3: Mailbox Interrupt Enable
|
||||
* 4: Power Management Interrupt Enable
|
||||
* 5: Power Management Interrupt
|
||||
* 6: Slave Read Local Data Parity Check Error Enable
|
||||
* 7: Slave Read Local Data Parity Check Error Status
|
||||
* 8: Internal PCI Wire Interrupt Enable
|
||||
* 9: PCI Express Doorbell Interrupt Enable
|
||||
* 10: PCI Abort Interrupt Enable
|
||||
* 11: Local Interrupt Input Enable
|
||||
* 12: Retry Abort Enable
|
||||
* 13: PCI Express Doorbell Interrupt Active
|
||||
* 14: PCI Abort Interrupt Active
|
||||
* 15: Local Interrupt Input Active
|
||||
* 16: Local Interrupt Output Enable
|
||||
* 17: Local Doorbell Interrupt Enable
|
||||
* 18: DMA Channel 0 Interrupt Enable
|
||||
* 19: DMA Channel 1 Interrupt Enable
|
||||
* 20: Local Doorbell Interrupt Active
|
||||
* 21: DMA Channel 0 Interrupt Active
|
||||
* 22: DMA Channel 1 Interrupt Active
|
||||
* 23: Built-In Self-Test (BIST) Interrupt Active
|
||||
* 24: Direct Master was the Bus Master during a Master or Target Abort
|
||||
* 25: DMA Channel 0 was the Bus Master during a Master or Target Abort
|
||||
* 26: DMA Channel 1 was the Bus Master during a Master or Target Abort
|
||||
* 27: Target Abort after internal 256 consecutive Master Retrys
|
||||
* 28: PCI Bus wrote data to LCS_MBOX0
|
||||
* 29: PCI Bus wrote data to LCS_MBOX1
|
||||
* 30: PCI Bus wrote data to LCS_MBOX2
|
||||
* 31: PCI Bus wrote data to LCS_MBOX3
|
||||
*/
|
||||
#define PLX_PEX8311_PCI_LCS_INTCSR 0x68
|
||||
#define INTCSR_INTERNAL_PCI_WIRE BIT(8)
|
||||
#define INTCSR_LOCAL_INPUT BIT(11)
|
||||
|
||||
/**
|
||||
* struct idio_24_gpio_reg - GPIO device registers structure
|
||||
* @out0_7: Read: FET Outputs 0-7
|
||||
@ -92,6 +133,7 @@ struct idio_24_gpio_reg {
|
||||
struct idio_24_gpio {
|
||||
struct gpio_chip chip;
|
||||
raw_spinlock_t lock;
|
||||
__u8 __iomem *plx;
|
||||
struct idio_24_gpio_reg __iomem *reg;
|
||||
unsigned long irq_mask;
|
||||
};
|
||||
@ -334,13 +376,13 @@ static void idio_24_irq_mask(struct irq_data *data)
|
||||
unsigned long flags;
|
||||
const unsigned long bit_offset = irqd_to_hwirq(data) - 24;
|
||||
unsigned char new_irq_mask;
|
||||
const unsigned long bank_offset = bit_offset/8 * 8;
|
||||
const unsigned long bank_offset = bit_offset / 8;
|
||||
unsigned char cos_enable_state;
|
||||
|
||||
raw_spin_lock_irqsave(&idio24gpio->lock, flags);
|
||||
|
||||
idio24gpio->irq_mask &= BIT(bit_offset);
|
||||
new_irq_mask = idio24gpio->irq_mask >> bank_offset;
|
||||
idio24gpio->irq_mask &= ~BIT(bit_offset);
|
||||
new_irq_mask = idio24gpio->irq_mask >> bank_offset * 8;
|
||||
|
||||
if (!new_irq_mask) {
|
||||
cos_enable_state = ioread8(&idio24gpio->reg->cos_enable);
|
||||
@ -363,12 +405,12 @@ static void idio_24_irq_unmask(struct irq_data *data)
|
||||
unsigned long flags;
|
||||
unsigned char prev_irq_mask;
|
||||
const unsigned long bit_offset = irqd_to_hwirq(data) - 24;
|
||||
const unsigned long bank_offset = bit_offset/8 * 8;
|
||||
const unsigned long bank_offset = bit_offset / 8;
|
||||
unsigned char cos_enable_state;
|
||||
|
||||
raw_spin_lock_irqsave(&idio24gpio->lock, flags);
|
||||
|
||||
prev_irq_mask = idio24gpio->irq_mask >> bank_offset;
|
||||
prev_irq_mask = idio24gpio->irq_mask >> bank_offset * 8;
|
||||
idio24gpio->irq_mask |= BIT(bit_offset);
|
||||
|
||||
if (!prev_irq_mask) {
|
||||
@ -455,6 +497,7 @@ static int idio_24_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
struct device *const dev = &pdev->dev;
|
||||
struct idio_24_gpio *idio24gpio;
|
||||
int err;
|
||||
const size_t pci_plx_bar_index = 1;
|
||||
const size_t pci_bar_index = 2;
|
||||
const char *const name = pci_name(pdev);
|
||||
struct gpio_irq_chip *girq;
|
||||
@ -469,12 +512,13 @@ static int idio_24_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
return err;
|
||||
}
|
||||
|
||||
err = pcim_iomap_regions(pdev, BIT(pci_bar_index), name);
|
||||
err = pcim_iomap_regions(pdev, BIT(pci_plx_bar_index) | BIT(pci_bar_index), name);
|
||||
if (err) {
|
||||
dev_err(dev, "Unable to map PCI I/O addresses (%d)\n", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
idio24gpio->plx = pcim_iomap_table(pdev)[pci_plx_bar_index];
|
||||
idio24gpio->reg = pcim_iomap_table(pdev)[pci_bar_index];
|
||||
|
||||
idio24gpio->chip.label = name;
|
||||
@ -504,6 +548,12 @@ static int idio_24_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
/* Software board reset */
|
||||
iowrite8(0, &idio24gpio->reg->soft_reset);
|
||||
/*
|
||||
* enable PLX PEX8311 internal PCI wire interrupt and local interrupt
|
||||
* input
|
||||
*/
|
||||
iowrite8((INTCSR_INTERNAL_PCI_WIRE | INTCSR_LOCAL_INPUT) >> 8,
|
||||
idio24gpio->plx + PLX_PEX8311_PCI_LCS_INTCSR + 1);
|
||||
|
||||
err = devm_gpiochip_add_data(dev, &idio24gpio->chip, idio24gpio);
|
||||
if (err) {
|
||||
|
@ -183,7 +183,7 @@ static int sifive_gpio_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(chip->regs);
|
||||
|
||||
ngpio = of_irq_count(node);
|
||||
if (ngpio >= SIFIVE_GPIO_MAX) {
|
||||
if (ngpio > SIFIVE_GPIO_MAX) {
|
||||
dev_err(dev, "Too many GPIO interrupts (max=%d)\n",
|
||||
SIFIVE_GPIO_MAX);
|
||||
return -ENXIO;
|
||||
|
@ -7,22 +7,7 @@
|
||||
|
||||
struct gpio_device;
|
||||
|
||||
#ifdef CONFIG_GPIO_CDEV
|
||||
|
||||
int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt);
|
||||
void gpiolib_cdev_unregister(struct gpio_device *gdev);
|
||||
|
||||
#else
|
||||
|
||||
static inline int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void gpiolib_cdev_unregister(struct gpio_device *gdev)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_GPIO_CDEV */
|
||||
|
||||
#endif /* GPIOLIB_CDEV_H */
|
||||
|
@ -480,11 +480,23 @@ static void gpiodevice_release(struct device *dev)
|
||||
kfree(gdev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GPIO_CDEV
|
||||
#define gcdev_register(gdev, devt) gpiolib_cdev_register((gdev), (devt))
|
||||
#define gcdev_unregister(gdev) gpiolib_cdev_unregister((gdev))
|
||||
#else
|
||||
/*
|
||||
* gpiolib_cdev_register() indirectly calls device_add(), which is still
|
||||
* required even when cdev is not selected.
|
||||
*/
|
||||
#define gcdev_register(gdev, devt) device_add(&(gdev)->dev)
|
||||
#define gcdev_unregister(gdev) device_del(&(gdev)->dev)
|
||||
#endif
|
||||
|
||||
static int gpiochip_setup_dev(struct gpio_device *gdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = gpiolib_cdev_register(gdev, gpio_devt);
|
||||
ret = gcdev_register(gdev, gpio_devt);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -500,7 +512,7 @@ static int gpiochip_setup_dev(struct gpio_device *gdev)
|
||||
return 0;
|
||||
|
||||
err_remove_device:
|
||||
gpiolib_cdev_unregister(gdev);
|
||||
gcdev_unregister(gdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -825,7 +837,7 @@ void gpiochip_remove(struct gpio_chip *gc)
|
||||
* be removed, else it will be dangling until the last user is
|
||||
* gone.
|
||||
*/
|
||||
gpiolib_cdev_unregister(gdev);
|
||||
gcdev_unregister(gdev);
|
||||
put_device(&gdev->dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gpiochip_remove);
|
||||
|
@ -492,8 +492,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
|
||||
if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
|
||||
amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
|
||||
#if defined(CONFIG_DRM_AMD_DC)
|
||||
else if (amdgpu_device_has_dc_support(adev) &&
|
||||
!nv_is_headless_sku(adev->pdev))
|
||||
else if (amdgpu_device_has_dc_support(adev))
|
||||
amdgpu_device_ip_block_add(adev, &dm_ip_block);
|
||||
#endif
|
||||
amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
|
||||
|
@ -40,6 +40,7 @@
|
||||
MODULE_FIRMWARE("amdgpu/renoir_asd.bin");
|
||||
MODULE_FIRMWARE("amdgpu/renoir_ta.bin");
|
||||
MODULE_FIRMWARE("amdgpu/green_sardine_asd.bin");
|
||||
MODULE_FIRMWARE("amdgpu/green_sardine_ta.bin");
|
||||
|
||||
/* address block */
|
||||
#define smnMP1_FIRMWARE_FLAGS 0x3010024
|
||||
|
@ -306,8 +306,8 @@ irq_source_info_dcn30[DAL_IRQ_SOURCES_NUMBER] = {
|
||||
pflip_int_entry(1),
|
||||
pflip_int_entry(2),
|
||||
pflip_int_entry(3),
|
||||
[DC_IRQ_SOURCE_PFLIP5] = dummy_irq_entry(),
|
||||
[DC_IRQ_SOURCE_PFLIP6] = dummy_irq_entry(),
|
||||
pflip_int_entry(4),
|
||||
pflip_int_entry(5),
|
||||
[DC_IRQ_SOURCE_PFLIP_UNDERLAY0] = dummy_irq_entry(),
|
||||
gpio_pad_int_entry(0),
|
||||
gpio_pad_int_entry(1),
|
||||
|
@ -13,7 +13,7 @@ config DRM_CDNS_MHDP8546
|
||||
if DRM_CDNS_MHDP8546
|
||||
|
||||
config DRM_CDNS_MHDP8546_J721E
|
||||
depends on ARCH_K3_J721E_SOC || COMPILE_TEST
|
||||
depends on ARCH_K3 || COMPILE_TEST
|
||||
bool "J721E Cadence DPI/DP wrapper support"
|
||||
default y
|
||||
help
|
||||
|
@ -347,6 +347,7 @@ int psb_irq_postinstall(struct drm_device *dev)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
unsigned long irqflags;
|
||||
unsigned int i;
|
||||
|
||||
spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags);
|
||||
|
||||
@ -359,20 +360,12 @@ int psb_irq_postinstall(struct drm_device *dev)
|
||||
PSB_WVDC32(dev_priv->vdc_irq_mask, PSB_INT_ENABLE_R);
|
||||
PSB_WVDC32(0xFFFFFFFF, PSB_HWSTAM);
|
||||
|
||||
if (dev->vblank[0].enabled)
|
||||
psb_enable_pipestat(dev_priv, 0, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
else
|
||||
psb_disable_pipestat(dev_priv, 0, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
|
||||
if (dev->vblank[1].enabled)
|
||||
psb_enable_pipestat(dev_priv, 1, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
else
|
||||
psb_disable_pipestat(dev_priv, 1, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
|
||||
if (dev->vblank[2].enabled)
|
||||
psb_enable_pipestat(dev_priv, 2, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
else
|
||||
psb_disable_pipestat(dev_priv, 2, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
for (i = 0; i < dev->num_crtcs; ++i) {
|
||||
if (dev->vblank[i].enabled)
|
||||
psb_enable_pipestat(dev_priv, i, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
else
|
||||
psb_disable_pipestat(dev_priv, i, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
}
|
||||
|
||||
if (dev_priv->ops->hotplug_enable)
|
||||
dev_priv->ops->hotplug_enable(dev, true);
|
||||
@ -385,6 +378,7 @@ void psb_irq_uninstall(struct drm_device *dev)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
unsigned long irqflags;
|
||||
unsigned int i;
|
||||
|
||||
spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags);
|
||||
|
||||
@ -393,14 +387,10 @@ void psb_irq_uninstall(struct drm_device *dev)
|
||||
|
||||
PSB_WVDC32(0xFFFFFFFF, PSB_HWSTAM);
|
||||
|
||||
if (dev->vblank[0].enabled)
|
||||
psb_disable_pipestat(dev_priv, 0, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
|
||||
if (dev->vblank[1].enabled)
|
||||
psb_disable_pipestat(dev_priv, 1, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
|
||||
if (dev->vblank[2].enabled)
|
||||
psb_disable_pipestat(dev_priv, 2, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
for (i = 0; i < dev->num_crtcs; ++i) {
|
||||
if (dev->vblank[i].enabled)
|
||||
psb_disable_pipestat(dev_priv, i, PIPE_VBLANK_INTERRUPT_ENABLE);
|
||||
}
|
||||
|
||||
dev_priv->vdc_irq_mask &= _PSB_IRQ_SGX_FLAG |
|
||||
_PSB_IRQ_MSVDX_FLAG |
|
||||
|
@ -56,6 +56,8 @@ struct drm_i915_gem_object_ops {
|
||||
void (*truncate)(struct drm_i915_gem_object *obj);
|
||||
void (*writeback)(struct drm_i915_gem_object *obj);
|
||||
|
||||
int (*pread)(struct drm_i915_gem_object *obj,
|
||||
const struct drm_i915_gem_pread *arg);
|
||||
int (*pwrite)(struct drm_i915_gem_object *obj,
|
||||
const struct drm_i915_gem_pwrite *arg);
|
||||
|
||||
|
@ -134,6 +134,58 @@ i915_gem_object_put_pages_phys(struct drm_i915_gem_object *obj,
|
||||
vaddr, dma);
|
||||
}
|
||||
|
||||
static int
|
||||
phys_pwrite(struct drm_i915_gem_object *obj,
|
||||
const struct drm_i915_gem_pwrite *args)
|
||||
{
|
||||
void *vaddr = sg_page(obj->mm.pages->sgl) + args->offset;
|
||||
char __user *user_data = u64_to_user_ptr(args->data_ptr);
|
||||
int err;
|
||||
|
||||
err = i915_gem_object_wait(obj,
|
||||
I915_WAIT_INTERRUPTIBLE |
|
||||
I915_WAIT_ALL,
|
||||
MAX_SCHEDULE_TIMEOUT);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/*
|
||||
* We manually control the domain here and pretend that it
|
||||
* remains coherent i.e. in the GTT domain, like shmem_pwrite.
|
||||
*/
|
||||
i915_gem_object_invalidate_frontbuffer(obj, ORIGIN_CPU);
|
||||
|
||||
if (copy_from_user(vaddr, user_data, args->size))
|
||||
return -EFAULT;
|
||||
|
||||
drm_clflush_virt_range(vaddr, args->size);
|
||||
intel_gt_chipset_flush(&to_i915(obj->base.dev)->gt);
|
||||
|
||||
i915_gem_object_flush_frontbuffer(obj, ORIGIN_CPU);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
phys_pread(struct drm_i915_gem_object *obj,
|
||||
const struct drm_i915_gem_pread *args)
|
||||
{
|
||||
void *vaddr = sg_page(obj->mm.pages->sgl) + args->offset;
|
||||
char __user *user_data = u64_to_user_ptr(args->data_ptr);
|
||||
int err;
|
||||
|
||||
err = i915_gem_object_wait(obj,
|
||||
I915_WAIT_INTERRUPTIBLE,
|
||||
MAX_SCHEDULE_TIMEOUT);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
drm_clflush_virt_range(vaddr, args->size);
|
||||
if (copy_to_user(user_data, vaddr, args->size))
|
||||
return -EFAULT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void phys_release(struct drm_i915_gem_object *obj)
|
||||
{
|
||||
fput(obj->base.filp);
|
||||
@ -144,6 +196,9 @@ static const struct drm_i915_gem_object_ops i915_gem_phys_ops = {
|
||||
.get_pages = i915_gem_object_get_pages_phys,
|
||||
.put_pages = i915_gem_object_put_pages_phys,
|
||||
|
||||
.pread = phys_pread,
|
||||
.pwrite = phys_pwrite,
|
||||
|
||||
.release = phys_release,
|
||||
};
|
||||
|
||||
|
@ -371,7 +371,8 @@ static void __setup_engine_capabilities(struct intel_engine_cs *engine)
|
||||
* instances.
|
||||
*/
|
||||
if ((INTEL_GEN(i915) >= 11 &&
|
||||
engine->gt->info.vdbox_sfc_access & engine->mask) ||
|
||||
(engine->gt->info.vdbox_sfc_access &
|
||||
BIT(engine->instance))) ||
|
||||
(INTEL_GEN(i915) >= 9 && engine->instance == 0))
|
||||
engine->uabi_capabilities |=
|
||||
I915_VIDEO_AND_ENHANCE_CLASS_CAPABILITY_SFC;
|
||||
|
@ -179,30 +179,6 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
i915_gem_phys_pwrite(struct drm_i915_gem_object *obj,
|
||||
struct drm_i915_gem_pwrite *args,
|
||||
struct drm_file *file)
|
||||
{
|
||||
void *vaddr = sg_page(obj->mm.pages->sgl) + args->offset;
|
||||
char __user *user_data = u64_to_user_ptr(args->data_ptr);
|
||||
|
||||
/*
|
||||
* We manually control the domain here and pretend that it
|
||||
* remains coherent i.e. in the GTT domain, like shmem_pwrite.
|
||||
*/
|
||||
i915_gem_object_invalidate_frontbuffer(obj, ORIGIN_CPU);
|
||||
|
||||
if (copy_from_user(vaddr, user_data, args->size))
|
||||
return -EFAULT;
|
||||
|
||||
drm_clflush_virt_range(vaddr, args->size);
|
||||
intel_gt_chipset_flush(&to_i915(obj->base.dev)->gt);
|
||||
|
||||
i915_gem_object_flush_frontbuffer(obj, ORIGIN_CPU);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
i915_gem_create(struct drm_file *file,
|
||||
struct intel_memory_region *mr,
|
||||
@ -527,6 +503,12 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data,
|
||||
|
||||
trace_i915_gem_object_pread(obj, args->offset, args->size);
|
||||
|
||||
ret = -ENODEV;
|
||||
if (obj->ops->pread)
|
||||
ret = obj->ops->pread(obj, args);
|
||||
if (ret != -ENODEV)
|
||||
goto out;
|
||||
|
||||
ret = i915_gem_object_wait(obj,
|
||||
I915_WAIT_INTERRUPTIBLE,
|
||||
MAX_SCHEDULE_TIMEOUT);
|
||||
@ -866,8 +848,6 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
|
||||
if (ret == -EFAULT || ret == -ENOSPC) {
|
||||
if (i915_gem_object_has_struct_page(obj))
|
||||
ret = i915_gem_shmem_pwrite(obj, args);
|
||||
else
|
||||
ret = i915_gem_phys_pwrite(obj, args, file);
|
||||
}
|
||||
|
||||
i915_gem_object_unpin_pages(obj);
|
||||
|
@ -413,7 +413,13 @@ static int mcde_probe(struct platform_device *pdev)
|
||||
match);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to add component master\n");
|
||||
goto clk_disable;
|
||||
/*
|
||||
* The EPOD regulator is already disabled at this point so some
|
||||
* special errorpath code is needed
|
||||
*/
|
||||
clk_disable_unprepare(mcde->mcde_clk);
|
||||
regulator_disable(mcde->vana);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -572,17 +572,6 @@ static void renesas_sdhi_reset(struct tmio_mmc_host *host)
|
||||
TMIO_MASK_INIT_RCAR2);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a temporary workaround! This driver used 'hw_reset' wrongly and the
|
||||
* fix for that showed a regression. So, we mimic the old behaviour until the
|
||||
* proper solution is found.
|
||||
*/
|
||||
static void renesas_sdhi_hw_reset(struct mmc_host *mmc)
|
||||
{
|
||||
struct tmio_mmc_host *host = mmc_priv(mmc);
|
||||
renesas_sdhi_reset(host);
|
||||
}
|
||||
|
||||
#define SH_MOBILE_SDHI_MIN_TAP_ROW 3
|
||||
|
||||
static int renesas_sdhi_select_tuning(struct tmio_mmc_host *host)
|
||||
@ -1020,8 +1009,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
|
||||
if (of_data && of_data->scc_offset) {
|
||||
priv->scc_ctl = host->ctl + of_data->scc_offset;
|
||||
host->reset = renesas_sdhi_reset;
|
||||
host->ops.hw_reset = renesas_sdhi_hw_reset;
|
||||
host->mmc->caps |= MMC_CAP_HW_RESET;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1160,6 +1147,7 @@ int renesas_sdhi_remove(struct platform_device *pdev)
|
||||
|
||||
tmio_mmc_host_remove(host);
|
||||
renesas_sdhi_clk_disable(host);
|
||||
tmio_mmc_host_free(host);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1324,6 +1324,8 @@ static struct soc_device_attribute soc_fixup_sdhc_clkdivs[] = {
|
||||
|
||||
static struct soc_device_attribute soc_unreliable_pulse_detection[] = {
|
||||
{ .family = "QorIQ LX2160A", .revision = "1.0", },
|
||||
{ .family = "QorIQ LX2160A", .revision = "2.0", },
|
||||
{ .family = "QorIQ LS1028A", .revision = "1.0", },
|
||||
{ },
|
||||
};
|
||||
|
||||
|
@ -175,6 +175,8 @@ static void tmio_mmc_reset(struct tmio_mmc_host *host)
|
||||
if (host->reset)
|
||||
host->reset(host);
|
||||
|
||||
tmio_mmc_abort_dma(host);
|
||||
|
||||
if (host->pdata->flags & TMIO_MMC_SDIO_IRQ) {
|
||||
sd_ctrl_write16(host, CTL_SDIO_IRQ_MASK, host->sdio_irq_mask);
|
||||
sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0001);
|
||||
@ -223,8 +225,6 @@ static void tmio_mmc_reset_work(struct work_struct *work)
|
||||
|
||||
/* Ready for new calls */
|
||||
host->mrq = NULL;
|
||||
|
||||
tmio_mmc_abort_dma(host);
|
||||
mmc_request_done(host->mmc, mrq);
|
||||
}
|
||||
|
||||
@ -927,6 +927,9 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||
switch (ios->power_mode) {
|
||||
case MMC_POWER_OFF:
|
||||
tmio_mmc_power_off(host);
|
||||
/* Downgrade ensures a sane state for tuning HW (e.g. SCC) */
|
||||
if (host->mmc->ops->hs400_downgrade)
|
||||
host->mmc->ops->hs400_downgrade(host->mmc);
|
||||
host->set_clock(host, 0);
|
||||
break;
|
||||
case MMC_POWER_UP:
|
||||
|
@ -2060,8 +2060,6 @@ static void nvme_update_disk_info(struct gendisk *disk,
|
||||
|
||||
if (id->nsattr & NVME_NS_ATTR_RO)
|
||||
set_disk_ro(disk, true);
|
||||
else
|
||||
set_disk_ro(disk, false);
|
||||
}
|
||||
|
||||
static inline bool nvme_first_scan(struct gendisk *disk)
|
||||
|
@ -1034,11 +1034,13 @@ int of_dma_get_range(struct device_node *np, const struct bus_dma_region **map)
|
||||
*/
|
||||
bool of_dma_is_coherent(struct device_node *np)
|
||||
{
|
||||
struct device_node *node = of_node_get(np);
|
||||
struct device_node *node;
|
||||
|
||||
if (IS_ENABLED(CONFIG_OF_DMA_DEFAULT_COHERENT))
|
||||
return true;
|
||||
|
||||
node = of_node_get(np);
|
||||
|
||||
while (node) {
|
||||
if (of_property_read_bool(node, "dma-coherent")) {
|
||||
of_node_put(node);
|
||||
|
@ -286,13 +286,14 @@ int aspeed_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
|
||||
static bool aspeed_expr_is_gpio(const struct aspeed_sig_expr *expr)
|
||||
{
|
||||
/*
|
||||
* The signal type is GPIO if the signal name has "GPIO" as a prefix.
|
||||
* The signal type is GPIO if the signal name has "GPI" as a prefix.
|
||||
* strncmp (rather than strcmp) is used to implement the prefix
|
||||
* requirement.
|
||||
*
|
||||
* expr->signal might look like "GPIOT3" in the GPIO case.
|
||||
* expr->signal might look like "GPIOB1" in the GPIO case.
|
||||
* expr->signal might look like "GPIT0" in the GPI case.
|
||||
*/
|
||||
return strncmp(expr->signal, "GPIO", 4) == 0;
|
||||
return strncmp(expr->signal, "GPI", 3) == 0;
|
||||
}
|
||||
|
||||
static bool aspeed_gpio_in_exprs(const struct aspeed_sig_expr **exprs)
|
||||
|
@ -62,10 +62,10 @@
|
||||
#define PADCFG1_TERM_UP BIT(13)
|
||||
#define PADCFG1_TERM_SHIFT 10
|
||||
#define PADCFG1_TERM_MASK GENMASK(12, 10)
|
||||
#define PADCFG1_TERM_20K 4
|
||||
#define PADCFG1_TERM_2K 3
|
||||
#define PADCFG1_TERM_5K 2
|
||||
#define PADCFG1_TERM_1K 1
|
||||
#define PADCFG1_TERM_20K BIT(2)
|
||||
#define PADCFG1_TERM_5K BIT(1)
|
||||
#define PADCFG1_TERM_1K BIT(0)
|
||||
#define PADCFG1_TERM_833 (BIT(1) | BIT(0))
|
||||
|
||||
#define PADCFG2 0x008
|
||||
#define PADCFG2_DEBEN BIT(0)
|
||||
@ -549,12 +549,12 @@ static int intel_config_get_pull(struct intel_pinctrl *pctrl, unsigned int pin,
|
||||
return -EINVAL;
|
||||
|
||||
switch (term) {
|
||||
case PADCFG1_TERM_833:
|
||||
*arg = 833;
|
||||
break;
|
||||
case PADCFG1_TERM_1K:
|
||||
*arg = 1000;
|
||||
break;
|
||||
case PADCFG1_TERM_2K:
|
||||
*arg = 2000;
|
||||
break;
|
||||
case PADCFG1_TERM_5K:
|
||||
*arg = 5000;
|
||||
break;
|
||||
@ -570,6 +570,11 @@ static int intel_config_get_pull(struct intel_pinctrl *pctrl, unsigned int pin,
|
||||
return -EINVAL;
|
||||
|
||||
switch (term) {
|
||||
case PADCFG1_TERM_833:
|
||||
if (!(community->features & PINCTRL_FEATURE_1K_PD))
|
||||
return -EINVAL;
|
||||
*arg = 833;
|
||||
break;
|
||||
case PADCFG1_TERM_1K:
|
||||
if (!(community->features & PINCTRL_FEATURE_1K_PD))
|
||||
return -EINVAL;
|
||||
@ -678,6 +683,10 @@ static int intel_config_set_pull(struct intel_pinctrl *pctrl, unsigned int pin,
|
||||
|
||||
value |= PADCFG1_TERM_UP;
|
||||
|
||||
/* Set default strength value in case none is given */
|
||||
if (arg == 1)
|
||||
arg = 5000;
|
||||
|
||||
switch (arg) {
|
||||
case 20000:
|
||||
value |= PADCFG1_TERM_20K << PADCFG1_TERM_SHIFT;
|
||||
@ -685,12 +694,12 @@ static int intel_config_set_pull(struct intel_pinctrl *pctrl, unsigned int pin,
|
||||
case 5000:
|
||||
value |= PADCFG1_TERM_5K << PADCFG1_TERM_SHIFT;
|
||||
break;
|
||||
case 2000:
|
||||
value |= PADCFG1_TERM_2K << PADCFG1_TERM_SHIFT;
|
||||
break;
|
||||
case 1000:
|
||||
value |= PADCFG1_TERM_1K << PADCFG1_TERM_SHIFT;
|
||||
break;
|
||||
case 833:
|
||||
value |= PADCFG1_TERM_833 << PADCFG1_TERM_SHIFT;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
}
|
||||
@ -700,6 +709,10 @@ static int intel_config_set_pull(struct intel_pinctrl *pctrl, unsigned int pin,
|
||||
case PIN_CONFIG_BIAS_PULL_DOWN:
|
||||
value &= ~(PADCFG1_TERM_UP | PADCFG1_TERM_MASK);
|
||||
|
||||
/* Set default strength value in case none is given */
|
||||
if (arg == 1)
|
||||
arg = 5000;
|
||||
|
||||
switch (arg) {
|
||||
case 20000:
|
||||
value |= PADCFG1_TERM_20K << PADCFG1_TERM_SHIFT;
|
||||
@ -714,6 +727,13 @@ static int intel_config_set_pull(struct intel_pinctrl *pctrl, unsigned int pin,
|
||||
}
|
||||
value |= PADCFG1_TERM_1K << PADCFG1_TERM_SHIFT;
|
||||
break;
|
||||
case 833:
|
||||
if (!(community->features & PINCTRL_FEATURE_1K_PD)) {
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
value |= PADCFG1_TERM_833 << PADCFG1_TERM_SHIFT;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ static int amd_gpio_set_debounce(struct gpio_chip *gc, unsigned offset,
|
||||
pin_reg |= BIT(DB_TMR_OUT_UNIT_OFF);
|
||||
pin_reg &= ~BIT(DB_TMR_LARGE_OFF);
|
||||
} else if (debounce < 250000) {
|
||||
time = debounce / 15600;
|
||||
time = debounce / 15625;
|
||||
pin_reg |= time & DB_TMR_OUT_MASK;
|
||||
pin_reg &= ~BIT(DB_TMR_OUT_UNIT_OFF);
|
||||
pin_reg |= BIT(DB_TMR_LARGE_OFF);
|
||||
@ -166,14 +166,14 @@ static int amd_gpio_set_debounce(struct gpio_chip *gc, unsigned offset,
|
||||
pin_reg |= BIT(DB_TMR_OUT_UNIT_OFF);
|
||||
pin_reg |= BIT(DB_TMR_LARGE_OFF);
|
||||
} else {
|
||||
pin_reg &= ~DB_CNTRl_MASK;
|
||||
pin_reg &= ~(DB_CNTRl_MASK << DB_CNTRL_OFF);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
} else {
|
||||
pin_reg &= ~BIT(DB_TMR_OUT_UNIT_OFF);
|
||||
pin_reg &= ~BIT(DB_TMR_LARGE_OFF);
|
||||
pin_reg &= ~DB_TMR_OUT_MASK;
|
||||
pin_reg &= ~DB_CNTRl_MASK;
|
||||
pin_reg &= ~(DB_CNTRl_MASK << DB_CNTRL_OFF);
|
||||
}
|
||||
writel(pin_reg, gpio_dev->base + offset * 4);
|
||||
raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
|
||||
|
@ -635,44 +635,44 @@ static int jz4770_uart3_data_pins[] = { 0x6c, 0x85, };
|
||||
static int jz4770_uart3_hwflow_pins[] = { 0x88, 0x89, };
|
||||
static int jz4770_ssi0_dt_a_pins[] = { 0x15, };
|
||||
static int jz4770_ssi0_dt_b_pins[] = { 0x35, };
|
||||
static int jz4770_ssi0_dt_d_pins[] = { 0x55, };
|
||||
static int jz4770_ssi0_dt_e_pins[] = { 0x71, };
|
||||
static int jz4770_ssi0_dt_d_pins[] = { 0x75, };
|
||||
static int jz4770_ssi0_dt_e_pins[] = { 0x91, };
|
||||
static int jz4770_ssi0_dr_a_pins[] = { 0x14, };
|
||||
static int jz4770_ssi0_dr_b_pins[] = { 0x34, };
|
||||
static int jz4770_ssi0_dr_d_pins[] = { 0x54, };
|
||||
static int jz4770_ssi0_dr_e_pins[] = { 0x6e, };
|
||||
static int jz4770_ssi0_dr_d_pins[] = { 0x74, };
|
||||
static int jz4770_ssi0_dr_e_pins[] = { 0x8e, };
|
||||
static int jz4770_ssi0_clk_a_pins[] = { 0x12, };
|
||||
static int jz4770_ssi0_clk_b_pins[] = { 0x3c, };
|
||||
static int jz4770_ssi0_clk_d_pins[] = { 0x58, };
|
||||
static int jz4770_ssi0_clk_e_pins[] = { 0x6f, };
|
||||
static int jz4770_ssi0_clk_d_pins[] = { 0x78, };
|
||||
static int jz4770_ssi0_clk_e_pins[] = { 0x8f, };
|
||||
static int jz4770_ssi0_gpc_b_pins[] = { 0x3e, };
|
||||
static int jz4770_ssi0_gpc_d_pins[] = { 0x56, };
|
||||
static int jz4770_ssi0_gpc_e_pins[] = { 0x73, };
|
||||
static int jz4770_ssi0_gpc_d_pins[] = { 0x76, };
|
||||
static int jz4770_ssi0_gpc_e_pins[] = { 0x93, };
|
||||
static int jz4770_ssi0_ce0_a_pins[] = { 0x13, };
|
||||
static int jz4770_ssi0_ce0_b_pins[] = { 0x3d, };
|
||||
static int jz4770_ssi0_ce0_d_pins[] = { 0x59, };
|
||||
static int jz4770_ssi0_ce0_e_pins[] = { 0x70, };
|
||||
static int jz4770_ssi0_ce0_d_pins[] = { 0x79, };
|
||||
static int jz4770_ssi0_ce0_e_pins[] = { 0x90, };
|
||||
static int jz4770_ssi0_ce1_b_pins[] = { 0x3f, };
|
||||
static int jz4770_ssi0_ce1_d_pins[] = { 0x57, };
|
||||
static int jz4770_ssi0_ce1_e_pins[] = { 0x72, };
|
||||
static int jz4770_ssi0_ce1_d_pins[] = { 0x77, };
|
||||
static int jz4770_ssi0_ce1_e_pins[] = { 0x92, };
|
||||
static int jz4770_ssi1_dt_b_pins[] = { 0x35, };
|
||||
static int jz4770_ssi1_dt_d_pins[] = { 0x55, };
|
||||
static int jz4770_ssi1_dt_e_pins[] = { 0x71, };
|
||||
static int jz4770_ssi1_dt_d_pins[] = { 0x75, };
|
||||
static int jz4770_ssi1_dt_e_pins[] = { 0x91, };
|
||||
static int jz4770_ssi1_dr_b_pins[] = { 0x34, };
|
||||
static int jz4770_ssi1_dr_d_pins[] = { 0x54, };
|
||||
static int jz4770_ssi1_dr_e_pins[] = { 0x6e, };
|
||||
static int jz4770_ssi1_dr_d_pins[] = { 0x74, };
|
||||
static int jz4770_ssi1_dr_e_pins[] = { 0x8e, };
|
||||
static int jz4770_ssi1_clk_b_pins[] = { 0x3c, };
|
||||
static int jz4770_ssi1_clk_d_pins[] = { 0x58, };
|
||||
static int jz4770_ssi1_clk_e_pins[] = { 0x6f, };
|
||||
static int jz4770_ssi1_clk_d_pins[] = { 0x78, };
|
||||
static int jz4770_ssi1_clk_e_pins[] = { 0x8f, };
|
||||
static int jz4770_ssi1_gpc_b_pins[] = { 0x3e, };
|
||||
static int jz4770_ssi1_gpc_d_pins[] = { 0x56, };
|
||||
static int jz4770_ssi1_gpc_e_pins[] = { 0x73, };
|
||||
static int jz4770_ssi1_gpc_d_pins[] = { 0x76, };
|
||||
static int jz4770_ssi1_gpc_e_pins[] = { 0x93, };
|
||||
static int jz4770_ssi1_ce0_b_pins[] = { 0x3d, };
|
||||
static int jz4770_ssi1_ce0_d_pins[] = { 0x59, };
|
||||
static int jz4770_ssi1_ce0_e_pins[] = { 0x70, };
|
||||
static int jz4770_ssi1_ce0_d_pins[] = { 0x79, };
|
||||
static int jz4770_ssi1_ce0_e_pins[] = { 0x90, };
|
||||
static int jz4770_ssi1_ce1_b_pins[] = { 0x3f, };
|
||||
static int jz4770_ssi1_ce1_d_pins[] = { 0x57, };
|
||||
static int jz4770_ssi1_ce1_e_pins[] = { 0x72, };
|
||||
static int jz4770_ssi1_ce1_d_pins[] = { 0x77, };
|
||||
static int jz4770_ssi1_ce1_e_pins[] = { 0x92, };
|
||||
static int jz4770_mmc0_1bit_a_pins[] = { 0x12, 0x13, 0x14, };
|
||||
static int jz4770_mmc0_4bit_a_pins[] = { 0x15, 0x16, 0x17, };
|
||||
static int jz4770_mmc0_1bit_e_pins[] = { 0x9c, 0x9d, 0x94, };
|
||||
@ -1050,35 +1050,35 @@ static int jz4780_ssi0_dt_a_19_pins[] = { 0x13, };
|
||||
static int jz4780_ssi0_dt_a_21_pins[] = { 0x15, };
|
||||
static int jz4780_ssi0_dt_a_28_pins[] = { 0x1c, };
|
||||
static int jz4780_ssi0_dt_b_pins[] = { 0x3d, };
|
||||
static int jz4780_ssi0_dt_d_pins[] = { 0x59, };
|
||||
static int jz4780_ssi0_dt_d_pins[] = { 0x79, };
|
||||
static int jz4780_ssi0_dr_a_20_pins[] = { 0x14, };
|
||||
static int jz4780_ssi0_dr_a_27_pins[] = { 0x1b, };
|
||||
static int jz4780_ssi0_dr_b_pins[] = { 0x34, };
|
||||
static int jz4780_ssi0_dr_d_pins[] = { 0x54, };
|
||||
static int jz4780_ssi0_dr_d_pins[] = { 0x74, };
|
||||
static int jz4780_ssi0_clk_a_pins[] = { 0x12, };
|
||||
static int jz4780_ssi0_clk_b_5_pins[] = { 0x25, };
|
||||
static int jz4780_ssi0_clk_b_28_pins[] = { 0x3c, };
|
||||
static int jz4780_ssi0_clk_d_pins[] = { 0x58, };
|
||||
static int jz4780_ssi0_clk_d_pins[] = { 0x78, };
|
||||
static int jz4780_ssi0_gpc_b_pins[] = { 0x3e, };
|
||||
static int jz4780_ssi0_gpc_d_pins[] = { 0x56, };
|
||||
static int jz4780_ssi0_gpc_d_pins[] = { 0x76, };
|
||||
static int jz4780_ssi0_ce0_a_23_pins[] = { 0x17, };
|
||||
static int jz4780_ssi0_ce0_a_25_pins[] = { 0x19, };
|
||||
static int jz4780_ssi0_ce0_b_pins[] = { 0x3f, };
|
||||
static int jz4780_ssi0_ce0_d_pins[] = { 0x57, };
|
||||
static int jz4780_ssi0_ce0_d_pins[] = { 0x77, };
|
||||
static int jz4780_ssi0_ce1_b_pins[] = { 0x35, };
|
||||
static int jz4780_ssi0_ce1_d_pins[] = { 0x55, };
|
||||
static int jz4780_ssi0_ce1_d_pins[] = { 0x75, };
|
||||
static int jz4780_ssi1_dt_b_pins[] = { 0x3d, };
|
||||
static int jz4780_ssi1_dt_d_pins[] = { 0x59, };
|
||||
static int jz4780_ssi1_dt_d_pins[] = { 0x79, };
|
||||
static int jz4780_ssi1_dr_b_pins[] = { 0x34, };
|
||||
static int jz4780_ssi1_dr_d_pins[] = { 0x54, };
|
||||
static int jz4780_ssi1_dr_d_pins[] = { 0x74, };
|
||||
static int jz4780_ssi1_clk_b_pins[] = { 0x3c, };
|
||||
static int jz4780_ssi1_clk_d_pins[] = { 0x58, };
|
||||
static int jz4780_ssi1_clk_d_pins[] = { 0x78, };
|
||||
static int jz4780_ssi1_gpc_b_pins[] = { 0x3e, };
|
||||
static int jz4780_ssi1_gpc_d_pins[] = { 0x56, };
|
||||
static int jz4780_ssi1_gpc_d_pins[] = { 0x76, };
|
||||
static int jz4780_ssi1_ce0_b_pins[] = { 0x3f, };
|
||||
static int jz4780_ssi1_ce0_d_pins[] = { 0x57, };
|
||||
static int jz4780_ssi1_ce0_d_pins[] = { 0x77, };
|
||||
static int jz4780_ssi1_ce1_b_pins[] = { 0x35, };
|
||||
static int jz4780_ssi1_ce1_d_pins[] = { 0x55, };
|
||||
static int jz4780_ssi1_ce1_d_pins[] = { 0x75, };
|
||||
static int jz4780_mmc0_8bit_a_pins[] = { 0x04, 0x05, 0x06, 0x07, 0x18, };
|
||||
static int jz4780_i2c3_pins[] = { 0x6a, 0x6b, };
|
||||
static int jz4780_i2c4_e_pins[] = { 0x8c, 0x8d, };
|
||||
|
@ -119,13 +119,15 @@ static int mcp23s08_spi_regmap_init(struct mcp23s08 *mcp, struct device *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
copy = devm_kmemdup(dev, &config, sizeof(config), GFP_KERNEL);
|
||||
copy = devm_kmemdup(dev, config, sizeof(*config), GFP_KERNEL);
|
||||
if (!copy)
|
||||
return -ENOMEM;
|
||||
|
||||
copy->name = name;
|
||||
|
||||
mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp, copy);
|
||||
if (IS_ERR(mcp->regmap))
|
||||
dev_err(dev, "regmap init failed for %s\n", mcp->chip.label);
|
||||
return PTR_ERR_OR_ZERO(mcp->regmap);
|
||||
}
|
||||
|
||||
|
@ -3155,7 +3155,9 @@ static int rockchip_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
|
||||
if (!bank->domain)
|
||||
return -ENXIO;
|
||||
|
||||
clk_enable(bank->clk);
|
||||
virq = irq_create_mapping(bank->domain, offset);
|
||||
clk_disable(bank->clk);
|
||||
|
||||
return (virq) ? : -ENXIO;
|
||||
}
|
||||
@ -3194,7 +3196,7 @@ static void rockchip_irq_demux(struct irq_desc *desc)
|
||||
|
||||
irq = __ffs(pend);
|
||||
pend &= ~BIT(irq);
|
||||
virq = irq_linear_revmap(bank->domain, irq);
|
||||
virq = irq_find_mapping(bank->domain, irq);
|
||||
|
||||
if (!virq) {
|
||||
dev_err(bank->drvdata->dev, "unmapped irq %d\n", irq);
|
||||
@ -3373,7 +3375,7 @@ static int rockchip_interrupts_register(struct platform_device *pdev,
|
||||
unsigned int clr = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
|
||||
struct irq_chip_generic *gc;
|
||||
int ret;
|
||||
int i, j;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ctrl->nr_banks; ++i, ++bank) {
|
||||
if (!bank->valid) {
|
||||
@ -3400,7 +3402,7 @@ static int rockchip_interrupts_register(struct platform_device *pdev,
|
||||
|
||||
ret = irq_alloc_domain_generic_chips(bank->domain, 32, 1,
|
||||
"rockchip_gpio_irq", handle_level_irq,
|
||||
clr, 0, IRQ_GC_INIT_MASK_CACHE);
|
||||
clr, 0, 0);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "could not alloc generic chips for bank %s\n",
|
||||
bank->name);
|
||||
@ -3409,14 +3411,6 @@ static int rockchip_interrupts_register(struct platform_device *pdev,
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Linux assumes that all interrupts start out disabled/masked.
|
||||
* Our driver only uses the concept of masked and always keeps
|
||||
* things enabled, so for us that's all masked and all enabled.
|
||||
*/
|
||||
writel_relaxed(0xffffffff, bank->reg_base + GPIO_INTMASK);
|
||||
writel_relaxed(0xffffffff, bank->reg_base + GPIO_INTEN);
|
||||
|
||||
gc = irq_get_domain_generic_chip(bank->domain, 0);
|
||||
gc->reg_base = bank->reg_base;
|
||||
gc->private = bank;
|
||||
@ -3433,13 +3427,17 @@ static int rockchip_interrupts_register(struct platform_device *pdev,
|
||||
gc->chip_types[0].chip.irq_set_type = rockchip_irq_set_type;
|
||||
gc->wake_enabled = IRQ_MSK(bank->nr_pins);
|
||||
|
||||
/*
|
||||
* Linux assumes that all interrupts start out disabled/masked.
|
||||
* Our driver only uses the concept of masked and always keeps
|
||||
* things enabled, so for us that's all masked and all enabled.
|
||||
*/
|
||||
writel_relaxed(0xffffffff, bank->reg_base + GPIO_INTMASK);
|
||||
writel_relaxed(0xffffffff, bank->reg_base + GPIO_INTEN);
|
||||
gc->mask_cache = 0xffffffff;
|
||||
|
||||
irq_set_chained_handler_and_data(bank->irq,
|
||||
rockchip_irq_demux, bank);
|
||||
|
||||
/* map the gpio irqs here, when the clock is still running */
|
||||
for (j = 0 ; j < 32 ; j++)
|
||||
irq_create_mapping(bank->domain, j);
|
||||
|
||||
clk_disable(bank->clk);
|
||||
}
|
||||
|
||||
|
@ -815,21 +815,14 @@ static void msm_gpio_irq_clear_unmask(struct irq_data *d, bool status_clear)
|
||||
|
||||
static void msm_gpio_irq_enable(struct irq_data *d)
|
||||
{
|
||||
/*
|
||||
* Clear the interrupt that may be pending before we enable
|
||||
* the line.
|
||||
* This is especially a problem with the GPIOs routed to the
|
||||
* PDC. These GPIOs are direct-connect interrupts to the GIC.
|
||||
* Disabling the interrupt line at the PDC does not prevent
|
||||
* the interrupt from being latched at the GIC. The state at
|
||||
* GIC needs to be cleared before enabling.
|
||||
*/
|
||||
if (d->parent_data) {
|
||||
irq_chip_set_parent_state(d, IRQCHIP_STATE_PENDING, 0);
|
||||
irq_chip_enable_parent(d);
|
||||
}
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
struct msm_pinctrl *pctrl = gpiochip_get_data(gc);
|
||||
|
||||
msm_gpio_irq_clear_unmask(d, true);
|
||||
if (d->parent_data)
|
||||
irq_chip_enable_parent(d);
|
||||
|
||||
if (!test_bit(d->hwirq, pctrl->skip_wake_irqs))
|
||||
msm_gpio_irq_clear_unmask(d, true);
|
||||
}
|
||||
|
||||
static void msm_gpio_irq_disable(struct irq_data *d)
|
||||
@ -1104,6 +1097,19 @@ static int msm_gpio_irq_reqres(struct irq_data *d)
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear the interrupt that may be pending before we enable
|
||||
* the line.
|
||||
* This is especially a problem with the GPIOs routed to the
|
||||
* PDC. These GPIOs are direct-connect interrupts to the GIC.
|
||||
* Disabling the interrupt line at the PDC does not prevent
|
||||
* the interrupt from being latched at the GIC. The state at
|
||||
* GIC needs to be cleared before enabling.
|
||||
*/
|
||||
if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
|
||||
irq_chip_set_parent_state(d, IRQCHIP_STATE_PENDING, 0);
|
||||
|
||||
return 0;
|
||||
out:
|
||||
module_put(gc->owner);
|
||||
|
@ -1313,6 +1313,22 @@ static const struct msm_pingroup sm8250_groups[] = {
|
||||
[183] = SDC_PINGROUP(sdc2_data, 0xb7000, 9, 0),
|
||||
};
|
||||
|
||||
static const struct msm_gpio_wakeirq_map sm8250_pdc_map[] = {
|
||||
{ 0, 79 }, { 1, 84 }, { 2, 80 }, { 3, 82 }, { 4, 107 }, { 7, 43 },
|
||||
{ 11, 42 }, { 14, 44 }, { 15, 52 }, { 19, 67 }, { 23, 68 }, { 24, 105 },
|
||||
{ 27, 92 }, { 28, 106 }, { 31, 69 }, { 35, 70 }, { 39, 37 },
|
||||
{ 40, 108 }, { 43, 71 }, { 45, 72 }, { 47, 83 }, { 51, 74 }, { 55, 77 },
|
||||
{ 59, 78 }, { 63, 75 }, { 64, 81 }, { 65, 87 }, { 66, 88 }, { 67, 89 },
|
||||
{ 68, 54 }, { 70, 85 }, { 77, 46 }, { 80, 90 }, { 81, 91 }, { 83, 97 },
|
||||
{ 84, 98 }, { 86, 99 }, { 87, 100 }, { 88, 101 }, { 89, 102 },
|
||||
{ 92, 103 }, { 93, 104 }, { 100, 53 }, { 103, 47 }, { 104, 48 },
|
||||
{ 108, 49 }, { 109, 94 }, { 110, 95 }, { 111, 96 }, { 112, 55 },
|
||||
{ 113, 56 }, { 118, 50 }, { 121, 51 }, { 122, 57 }, { 123, 58 },
|
||||
{ 124, 45 }, { 126, 59 }, { 128, 76 }, { 129, 86 }, { 132, 93 },
|
||||
{ 133, 65 }, { 134, 66 }, { 136, 62 }, { 137, 63 }, { 138, 64 },
|
||||
{ 142, 60 }, { 143, 61 }
|
||||
};
|
||||
|
||||
static const struct msm_pinctrl_soc_data sm8250_pinctrl = {
|
||||
.pins = sm8250_pins,
|
||||
.npins = ARRAY_SIZE(sm8250_pins),
|
||||
@ -1323,6 +1339,8 @@ static const struct msm_pinctrl_soc_data sm8250_pinctrl = {
|
||||
.ngpios = 181,
|
||||
.tiles = sm8250_tiles,
|
||||
.ntiles = ARRAY_SIZE(sm8250_tiles),
|
||||
.wakeirq_map = sm8250_pdc_map,
|
||||
.nwakeirq_map = ARRAY_SIZE(sm8250_pdc_map),
|
||||
};
|
||||
|
||||
static int sm8250_pinctrl_probe(struct platform_device *pdev)
|
||||
|
@ -47,6 +47,7 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/fb.h>
|
||||
|
2
fs/aio.c
2
fs/aio.c
@ -1572,7 +1572,7 @@ static int aio_write(struct kiocb *req, const struct iocb *iocb,
|
||||
* we return to userspace.
|
||||
*/
|
||||
if (S_ISREG(file_inode(file)->i_mode)) {
|
||||
__sb_start_write(file_inode(file)->i_sb, SB_FREEZE_WRITE, true);
|
||||
sb_start_write(file_inode(file)->i_sb);
|
||||
__sb_writers_release(file_inode(file)->i_sb, SB_FREEZE_WRITE);
|
||||
}
|
||||
req->ki_flags |= IOCB_WRITE;
|
||||
|
@ -1231,13 +1231,13 @@ struct ext4_inode_info {
|
||||
blocks */
|
||||
#define EXT4_MOUNT2_HURD_COMPAT 0x00000004 /* Support HURD-castrated
|
||||
file systems */
|
||||
#define EXT4_MOUNT2_DAX_NEVER 0x00000008 /* Do not allow Direct Access */
|
||||
#define EXT4_MOUNT2_DAX_INODE 0x00000010 /* For printing options only */
|
||||
|
||||
#define EXT4_MOUNT2_EXPLICIT_JOURNAL_CHECKSUM 0x00000008 /* User explicitly
|
||||
specified journal checksum */
|
||||
|
||||
#define EXT4_MOUNT2_JOURNAL_FAST_COMMIT 0x00000010 /* Journal fast commit */
|
||||
#define EXT4_MOUNT2_DAX_NEVER 0x00000020 /* Do not allow Direct Access */
|
||||
#define EXT4_MOUNT2_DAX_INODE 0x00000040 /* For printing options only */
|
||||
|
||||
|
||||
#define clear_opt(sb, opt) EXT4_SB(sb)->s_mount_opt &= \
|
||||
~EXT4_MOUNT_##opt
|
||||
|
@ -289,18 +289,7 @@ void ext4_superblock_csum_set(struct super_block *sb)
|
||||
if (!ext4_has_metadata_csum(sb))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Locking the superblock prevents the scenario
|
||||
* where:
|
||||
* 1) a first thread pauses during checksum calculation.
|
||||
* 2) a second thread updates the superblock, recalculates
|
||||
* the checksum, and updates s_checksum
|
||||
* 3) the first thread resumes and finishes its checksum calculation
|
||||
* and updates s_checksum with a potentially stale or torn value.
|
||||
*/
|
||||
lock_buffer(EXT4_SB(sb)->s_sbh);
|
||||
es->s_checksum = ext4_superblock_csum(sb, es);
|
||||
unlock_buffer(EXT4_SB(sb)->s_sbh);
|
||||
}
|
||||
|
||||
ext4_fsblk_t ext4_block_bitmap(struct super_block *sb,
|
||||
|
@ -3547,8 +3547,7 @@ static int io_write(struct io_kiocb *req, bool force_nonblock,
|
||||
* we return to userspace.
|
||||
*/
|
||||
if (req->flags & REQ_F_ISREG) {
|
||||
__sb_start_write(file_inode(req->file)->i_sb,
|
||||
SB_FREEZE_WRITE, true);
|
||||
sb_start_write(file_inode(req->file)->i_sb);
|
||||
__sb_writers_release(file_inode(req->file)->i_sb,
|
||||
SB_FREEZE_WRITE);
|
||||
}
|
||||
@ -9226,6 +9225,7 @@ static int io_uring_create(unsigned entries, struct io_uring_params *p,
|
||||
* to a power-of-two, if it isn't already. We do NOT impose
|
||||
* any cq vs sq ring sizing.
|
||||
*/
|
||||
p->cq_entries = roundup_pow_of_two(p->cq_entries);
|
||||
if (p->cq_entries < p->sq_entries)
|
||||
return -EINVAL;
|
||||
if (p->cq_entries > IORING_MAX_CQ_ENTRIES) {
|
||||
@ -9233,7 +9233,6 @@ static int io_uring_create(unsigned entries, struct io_uring_params *p,
|
||||
return -EINVAL;
|
||||
p->cq_entries = IORING_MAX_CQ_ENTRIES;
|
||||
}
|
||||
p->cq_entries = roundup_pow_of_two(p->cq_entries);
|
||||
} else {
|
||||
p->cq_entries = 2 * p->sq_entries;
|
||||
}
|
||||
|
49
fs/super.c
49
fs/super.c
@ -1631,55 +1631,6 @@ int super_setup_bdi(struct super_block *sb)
|
||||
}
|
||||
EXPORT_SYMBOL(super_setup_bdi);
|
||||
|
||||
/*
|
||||
* This is an internal function, please use sb_end_{write,pagefault,intwrite}
|
||||
* instead.
|
||||
*/
|
||||
void __sb_end_write(struct super_block *sb, int level)
|
||||
{
|
||||
percpu_up_read(sb->s_writers.rw_sem + level-1);
|
||||
}
|
||||
EXPORT_SYMBOL(__sb_end_write);
|
||||
|
||||
/*
|
||||
* This is an internal function, please use sb_start_{write,pagefault,intwrite}
|
||||
* instead.
|
||||
*/
|
||||
int __sb_start_write(struct super_block *sb, int level, bool wait)
|
||||
{
|
||||
bool force_trylock = false;
|
||||
int ret = 1;
|
||||
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
/*
|
||||
* We want lockdep to tell us about possible deadlocks with freezing
|
||||
* but it's it bit tricky to properly instrument it. Getting a freeze
|
||||
* protection works as getting a read lock but there are subtle
|
||||
* problems. XFS for example gets freeze protection on internal level
|
||||
* twice in some cases, which is OK only because we already hold a
|
||||
* freeze protection also on higher level. Due to these cases we have
|
||||
* to use wait == F (trylock mode) which must not fail.
|
||||
*/
|
||||
if (wait) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < level - 1; i++)
|
||||
if (percpu_rwsem_is_held(sb->s_writers.rw_sem + i)) {
|
||||
force_trylock = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (wait && !force_trylock)
|
||||
percpu_down_read(sb->s_writers.rw_sem + level-1);
|
||||
else
|
||||
ret = percpu_down_read_trylock(sb->s_writers.rw_sem + level-1);
|
||||
|
||||
WARN_ON(force_trylock && !ret);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(__sb_start_write);
|
||||
|
||||
/**
|
||||
* sb_wait_write - wait until all writers to given file system finish
|
||||
* @sb: the super for which we wait
|
||||
|
@ -1514,7 +1514,7 @@ xfs_rmap_convert_shared(
|
||||
* record for our insertion point. This will also give us the record for
|
||||
* start block contiguity tests.
|
||||
*/
|
||||
error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, flags,
|
||||
error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, oldext,
|
||||
&PREV, &i);
|
||||
if (error)
|
||||
goto done;
|
||||
|
@ -243,8 +243,8 @@ xfs_rmapbt_key_diff(
|
||||
else if (y > x)
|
||||
return -1;
|
||||
|
||||
x = XFS_RMAP_OFF(be64_to_cpu(kp->rm_offset));
|
||||
y = rec->rm_offset;
|
||||
x = be64_to_cpu(kp->rm_offset);
|
||||
y = xfs_rmap_irec_offset_pack(rec);
|
||||
if (x > y)
|
||||
return 1;
|
||||
else if (y > x)
|
||||
@ -275,8 +275,8 @@ xfs_rmapbt_diff_two_keys(
|
||||
else if (y > x)
|
||||
return -1;
|
||||
|
||||
x = XFS_RMAP_OFF(be64_to_cpu(kp1->rm_offset));
|
||||
y = XFS_RMAP_OFF(be64_to_cpu(kp2->rm_offset));
|
||||
x = be64_to_cpu(kp1->rm_offset);
|
||||
y = be64_to_cpu(kp2->rm_offset);
|
||||
if (x > y)
|
||||
return 1;
|
||||
else if (y > x)
|
||||
@ -390,8 +390,8 @@ xfs_rmapbt_keys_inorder(
|
||||
return 1;
|
||||
else if (a > b)
|
||||
return 0;
|
||||
a = XFS_RMAP_OFF(be64_to_cpu(k1->rmap.rm_offset));
|
||||
b = XFS_RMAP_OFF(be64_to_cpu(k2->rmap.rm_offset));
|
||||
a = be64_to_cpu(k1->rmap.rm_offset);
|
||||
b = be64_to_cpu(k2->rmap.rm_offset);
|
||||
if (a <= b)
|
||||
return 1;
|
||||
return 0;
|
||||
@ -420,8 +420,8 @@ xfs_rmapbt_recs_inorder(
|
||||
return 1;
|
||||
else if (a > b)
|
||||
return 0;
|
||||
a = XFS_RMAP_OFF(be64_to_cpu(r1->rmap.rm_offset));
|
||||
b = XFS_RMAP_OFF(be64_to_cpu(r2->rmap.rm_offset));
|
||||
a = be64_to_cpu(r1->rmap.rm_offset);
|
||||
b = be64_to_cpu(r2->rmap.rm_offset);
|
||||
if (a <= b)
|
||||
return 1;
|
||||
return 0;
|
||||
|
@ -113,6 +113,8 @@ xchk_bmap_get_rmap(
|
||||
|
||||
if (info->whichfork == XFS_ATTR_FORK)
|
||||
rflags |= XFS_RMAP_ATTR_FORK;
|
||||
if (irec->br_state == XFS_EXT_UNWRITTEN)
|
||||
rflags |= XFS_RMAP_UNWRITTEN;
|
||||
|
||||
/*
|
||||
* CoW staging extents are owned (on disk) by the refcountbt, so
|
||||
|
@ -170,7 +170,6 @@ xchk_refcountbt_process_rmap_fragments(
|
||||
*/
|
||||
INIT_LIST_HEAD(&worklist);
|
||||
rbno = NULLAGBLOCK;
|
||||
nr = 1;
|
||||
|
||||
/* Make sure the fragments actually /are/ in agbno order. */
|
||||
bno = 0;
|
||||
@ -184,15 +183,14 @@ xchk_refcountbt_process_rmap_fragments(
|
||||
* Find all the rmaps that start at or before the refc extent,
|
||||
* and put them on the worklist.
|
||||
*/
|
||||
nr = 0;
|
||||
list_for_each_entry_safe(frag, n, &refchk->fragments, list) {
|
||||
if (frag->rm.rm_startblock > refchk->bno)
|
||||
goto done;
|
||||
if (frag->rm.rm_startblock > refchk->bno || nr > target_nr)
|
||||
break;
|
||||
bno = frag->rm.rm_startblock + frag->rm.rm_blockcount;
|
||||
if (bno < rbno)
|
||||
rbno = bno;
|
||||
list_move_tail(&frag->list, &worklist);
|
||||
if (nr == target_nr)
|
||||
break;
|
||||
nr++;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ xfs_fs_map_blocks(
|
||||
goto out_unlock;
|
||||
error = invalidate_inode_pages2(inode->i_mapping);
|
||||
if (WARN_ON_ONCE(error))
|
||||
return error;
|
||||
goto out_unlock;
|
||||
|
||||
end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + length);
|
||||
offset_fsb = XFS_B_TO_FSBT(mp, offset);
|
||||
|
@ -1580,8 +1580,24 @@ extern struct timespec64 current_time(struct inode *inode);
|
||||
* Snapshotting support.
|
||||
*/
|
||||
|
||||
void __sb_end_write(struct super_block *sb, int level);
|
||||
int __sb_start_write(struct super_block *sb, int level, bool wait);
|
||||
/*
|
||||
* These are internal functions, please use sb_start_{write,pagefault,intwrite}
|
||||
* instead.
|
||||
*/
|
||||
static inline void __sb_end_write(struct super_block *sb, int level)
|
||||
{
|
||||
percpu_up_read(sb->s_writers.rw_sem + level-1);
|
||||
}
|
||||
|
||||
static inline void __sb_start_write(struct super_block *sb, int level)
|
||||
{
|
||||
percpu_down_read(sb->s_writers.rw_sem + level - 1);
|
||||
}
|
||||
|
||||
static inline bool __sb_start_write_trylock(struct super_block *sb, int level)
|
||||
{
|
||||
return percpu_down_read_trylock(sb->s_writers.rw_sem + level - 1);
|
||||
}
|
||||
|
||||
#define __sb_writers_acquired(sb, lev) \
|
||||
percpu_rwsem_acquire(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_)
|
||||
@ -1645,12 +1661,12 @@ static inline void sb_end_intwrite(struct super_block *sb)
|
||||
*/
|
||||
static inline void sb_start_write(struct super_block *sb)
|
||||
{
|
||||
__sb_start_write(sb, SB_FREEZE_WRITE, true);
|
||||
__sb_start_write(sb, SB_FREEZE_WRITE);
|
||||
}
|
||||
|
||||
static inline int sb_start_write_trylock(struct super_block *sb)
|
||||
static inline bool sb_start_write_trylock(struct super_block *sb)
|
||||
{
|
||||
return __sb_start_write(sb, SB_FREEZE_WRITE, false);
|
||||
return __sb_start_write_trylock(sb, SB_FREEZE_WRITE);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1674,7 +1690,7 @@ static inline int sb_start_write_trylock(struct super_block *sb)
|
||||
*/
|
||||
static inline void sb_start_pagefault(struct super_block *sb)
|
||||
{
|
||||
__sb_start_write(sb, SB_FREEZE_PAGEFAULT, true);
|
||||
__sb_start_write(sb, SB_FREEZE_PAGEFAULT);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1692,12 +1708,12 @@ static inline void sb_start_pagefault(struct super_block *sb)
|
||||
*/
|
||||
static inline void sb_start_intwrite(struct super_block *sb)
|
||||
{
|
||||
__sb_start_write(sb, SB_FREEZE_FS, true);
|
||||
__sb_start_write(sb, SB_FREEZE_FS);
|
||||
}
|
||||
|
||||
static inline int sb_start_intwrite_trylock(struct super_block *sb)
|
||||
static inline bool sb_start_intwrite_trylock(struct super_block *sb)
|
||||
{
|
||||
return __sb_start_write(sb, SB_FREEZE_FS, false);
|
||||
return __sb_start_write_trylock(sb, SB_FREEZE_FS);
|
||||
}
|
||||
|
||||
|
||||
@ -2756,14 +2772,14 @@ static inline void file_start_write(struct file *file)
|
||||
{
|
||||
if (!S_ISREG(file_inode(file)->i_mode))
|
||||
return;
|
||||
__sb_start_write(file_inode(file)->i_sb, SB_FREEZE_WRITE, true);
|
||||
sb_start_write(file_inode(file)->i_sb);
|
||||
}
|
||||
|
||||
static inline bool file_start_write_trylock(struct file *file)
|
||||
{
|
||||
if (!S_ISREG(file_inode(file)->i_mode))
|
||||
return true;
|
||||
return __sb_start_write(file_inode(file)->i_sb, SB_FREEZE_WRITE, false);
|
||||
return sb_start_write_trylock(file_inode(file)->i_sb);
|
||||
}
|
||||
|
||||
static inline void file_end_write(struct file *file)
|
||||
|
@ -315,7 +315,7 @@ static inline int get_disk_ro(struct gendisk *disk)
|
||||
extern void disk_block_events(struct gendisk *disk);
|
||||
extern void disk_unblock_events(struct gendisk *disk);
|
||||
extern void disk_flush_events(struct gendisk *disk, unsigned int mask);
|
||||
void set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size,
|
||||
bool set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size,
|
||||
bool update_bdev);
|
||||
|
||||
/* drivers/char/random.c */
|
||||
|
@ -26,7 +26,7 @@
|
||||
* struct gpiochip_info - Information about a certain GPIO chip
|
||||
* @name: the Linux kernel name of this GPIO chip
|
||||
* @label: a functional name for this GPIO chip, such as a product
|
||||
* number, may be empty
|
||||
* number, may be empty (i.e. label[0] == '\0')
|
||||
* @lines: number of GPIO lines on this chip
|
||||
*/
|
||||
struct gpiochip_info {
|
||||
@ -98,7 +98,7 @@ struct gpio_v2_line_values {
|
||||
* identifying which field of the attribute union is in use.
|
||||
* @GPIO_V2_LINE_ATTR_ID_FLAGS: flags field is in use
|
||||
* @GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES: values field is in use
|
||||
* @GPIO_V2_LINE_ATTR_ID_DEBOUNCE: debounce_period_us is in use
|
||||
* @GPIO_V2_LINE_ATTR_ID_DEBOUNCE: debounce_period_us field is in use
|
||||
*/
|
||||
enum gpio_v2_line_attr_id {
|
||||
GPIO_V2_LINE_ATTR_ID_FLAGS = 1,
|
||||
@ -110,17 +110,17 @@ enum gpio_v2_line_attr_id {
|
||||
* struct gpio_v2_line_attribute - a configurable attribute of a line
|
||||
* @id: attribute identifier with value from &enum gpio_v2_line_attr_id
|
||||
* @padding: reserved for future use and must be zero filled
|
||||
* @flags: if id is GPIO_V2_LINE_ATTR_ID_FLAGS, the flags for the GPIO
|
||||
* line, with values from enum gpio_v2_line_flag, such as
|
||||
* GPIO_V2_LINE_FLAG_ACTIVE_LOW, GPIO_V2_LINE_FLAG_OUTPUT etc, OR:ed
|
||||
* @flags: if id is %GPIO_V2_LINE_ATTR_ID_FLAGS, the flags for the GPIO
|
||||
* line, with values from &enum gpio_v2_line_flag, such as
|
||||
* %GPIO_V2_LINE_FLAG_ACTIVE_LOW, %GPIO_V2_LINE_FLAG_OUTPUT etc, added
|
||||
* together. This overrides the default flags contained in the &struct
|
||||
* gpio_v2_line_config for the associated line.
|
||||
* @values: if id is GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES, a bitmap
|
||||
* @values: if id is %GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES, a bitmap
|
||||
* containing the values to which the lines will be set, with each bit
|
||||
* number corresponding to the index into &struct
|
||||
* gpio_v2_line_request.offsets.
|
||||
* @debounce_period_us: if id is GPIO_V2_LINE_ATTR_ID_DEBOUNCE, the desired
|
||||
* debounce period, in microseconds
|
||||
* @debounce_period_us: if id is %GPIO_V2_LINE_ATTR_ID_DEBOUNCE, the
|
||||
* desired debounce period, in microseconds
|
||||
*/
|
||||
struct gpio_v2_line_attribute {
|
||||
__u32 id;
|
||||
@ -147,12 +147,12 @@ struct gpio_v2_line_config_attribute {
|
||||
|
||||
/**
|
||||
* struct gpio_v2_line_config - Configuration for GPIO lines
|
||||
* @flags: flags for the GPIO lines, with values from enum
|
||||
* gpio_v2_line_flag, such as GPIO_V2_LINE_FLAG_ACTIVE_LOW,
|
||||
* GPIO_V2_LINE_FLAG_OUTPUT etc, OR:ed together. This is the default for
|
||||
* @flags: flags for the GPIO lines, with values from &enum
|
||||
* gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW,
|
||||
* %GPIO_V2_LINE_FLAG_OUTPUT etc, added together. This is the default for
|
||||
* all requested lines but may be overridden for particular lines using
|
||||
* attrs.
|
||||
* @num_attrs: the number of attributes in attrs
|
||||
* @attrs.
|
||||
* @num_attrs: the number of attributes in @attrs
|
||||
* @padding: reserved for future use and must be zero filled
|
||||
* @attrs: the configuration attributes associated with the requested
|
||||
* lines. Any attribute should only be associated with a particular line
|
||||
@ -175,17 +175,17 @@ struct gpio_v2_line_config {
|
||||
* "my-bitbanged-relay"
|
||||
* @config: requested configuration for the lines.
|
||||
* @num_lines: number of lines requested in this request, i.e. the number
|
||||
* of valid fields in the GPIO_V2_LINES_MAX sized arrays, set to 1 to
|
||||
* of valid fields in the %GPIO_V2_LINES_MAX sized arrays, set to 1 to
|
||||
* request a single line
|
||||
* @event_buffer_size: a suggested minimum number of line events that the
|
||||
* kernel should buffer. This is only relevant if edge detection is
|
||||
* enabled in the configuration. Note that this is only a suggested value
|
||||
* and the kernel may allocate a larger buffer or cap the size of the
|
||||
* buffer. If this field is zero then the buffer size defaults to a minimum
|
||||
* of num_lines*16.
|
||||
* of @num_lines * 16.
|
||||
* @padding: reserved for future use and must be zero filled
|
||||
* @fd: if successful this field will contain a valid anonymous file handle
|
||||
* after a GPIO_GET_LINE_IOCTL operation, zero or negative value means
|
||||
* after a %GPIO_GET_LINE_IOCTL operation, zero or negative value means
|
||||
* error
|
||||
*/
|
||||
struct gpio_v2_line_request {
|
||||
@ -203,15 +203,16 @@ struct gpio_v2_line_request {
|
||||
* struct gpio_v2_line_info - Information about a certain GPIO line
|
||||
* @name: the name of this GPIO line, such as the output pin of the line on
|
||||
* the chip, a rail or a pin header name on a board, as specified by the
|
||||
* GPIO chip, may be empty
|
||||
* GPIO chip, may be empty (i.e. name[0] == '\0')
|
||||
* @consumer: a functional name for the consumer of this GPIO line as set
|
||||
* by whatever is using it, will be empty if there is no current user but
|
||||
* may also be empty if the consumer doesn't set this up
|
||||
* @flags: flags for the GPIO line, such as GPIO_V2_LINE_FLAG_ACTIVE_LOW,
|
||||
* GPIO_V2_LINE_FLAG_OUTPUT etc, OR:ed together
|
||||
* @offset: the local offset on this GPIO chip, fill this in when
|
||||
* requesting the line information from the kernel
|
||||
* @num_attrs: the number of attributes in attrs
|
||||
* @num_attrs: the number of attributes in @attrs
|
||||
* @flags: flags for the GPIO lines, with values from &enum
|
||||
* gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW,
|
||||
* %GPIO_V2_LINE_FLAG_OUTPUT etc, added together.
|
||||
* @attrs: the configuration attributes associated with the line
|
||||
* @padding: reserved for future use
|
||||
*/
|
||||
@ -244,7 +245,7 @@ enum gpio_v2_line_changed_type {
|
||||
* of a GPIO line
|
||||
* @info: updated line information
|
||||
* @timestamp_ns: estimate of time of status change occurrence, in nanoseconds
|
||||
* @event_type: the type of change with a value from enum
|
||||
* @event_type: the type of change with a value from &enum
|
||||
* gpio_v2_line_changed_type
|
||||
* @padding: reserved for future use
|
||||
*/
|
||||
@ -269,10 +270,10 @@ enum gpio_v2_line_event_id {
|
||||
/**
|
||||
* struct gpio_v2_line_event - The actual event being pushed to userspace
|
||||
* @timestamp_ns: best estimate of time of event occurrence, in nanoseconds.
|
||||
* The timestamp_ns is read from CLOCK_MONOTONIC and is intended to allow the
|
||||
* accurate measurement of the time between events. It does not provide
|
||||
* The @timestamp_ns is read from %CLOCK_MONOTONIC and is intended to allow
|
||||
* the accurate measurement of the time between events. It does not provide
|
||||
* the wall-clock time.
|
||||
* @id: event identifier with value from enum gpio_v2_line_event_id
|
||||
* @id: event identifier with value from &enum gpio_v2_line_event_id
|
||||
* @offset: the offset of the line that triggered the event
|
||||
* @seqno: the sequence number for this event in the sequence of events for
|
||||
* all the lines in this line request
|
||||
@ -291,7 +292,7 @@ struct gpio_v2_line_event {
|
||||
};
|
||||
|
||||
/*
|
||||
* ABI v1
|
||||
* ABI v1
|
||||
*
|
||||
* This version of the ABI is deprecated.
|
||||
* Use the latest version of the ABI, defined above, instead.
|
||||
@ -314,13 +315,13 @@ struct gpio_v2_line_event {
|
||||
* @flags: various flags for this line
|
||||
* @name: the name of this GPIO line, such as the output pin of the line on the
|
||||
* chip, a rail or a pin header name on a board, as specified by the gpio
|
||||
* chip, may be empty
|
||||
* chip, may be empty (i.e. name[0] == '\0')
|
||||
* @consumer: a functional name for the consumer of this GPIO line as set by
|
||||
* whatever is using it, will be empty if there is no current user but may
|
||||
* also be empty if the consumer doesn't set this up
|
||||
*
|
||||
* This struct is part of ABI v1 and is deprecated.
|
||||
* Use struct gpio_v2_line_info instead.
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_info instead.
|
||||
*/
|
||||
struct gpioline_info {
|
||||
__u32 line_offset;
|
||||
@ -344,17 +345,18 @@ enum {
|
||||
* of a GPIO line
|
||||
* @info: updated line information
|
||||
* @timestamp: estimate of time of status change occurrence, in nanoseconds
|
||||
* @event_type: one of GPIOLINE_CHANGED_REQUESTED, GPIOLINE_CHANGED_RELEASED
|
||||
* and GPIOLINE_CHANGED_CONFIG
|
||||
* @event_type: one of %GPIOLINE_CHANGED_REQUESTED,
|
||||
* %GPIOLINE_CHANGED_RELEASED and %GPIOLINE_CHANGED_CONFIG
|
||||
* @padding: reserved for future use
|
||||
*
|
||||
* Note: struct gpioline_info embedded here has 32-bit alignment on its own,
|
||||
* The &struct gpioline_info embedded here has 32-bit alignment on its own,
|
||||
* but it works fine with 64-bit alignment too. With its 72 byte size, we can
|
||||
* guarantee there are no implicit holes between it and subsequent members.
|
||||
* The 20-byte padding at the end makes sure we don't add any implicit padding
|
||||
* at the end of the structure on 64-bit architectures.
|
||||
*
|
||||
* This struct is part of ABI v1 and is deprecated.
|
||||
* Use struct gpio_v2_line_info_changed instead.
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_info_changed instead.
|
||||
*/
|
||||
struct gpioline_info_changed {
|
||||
struct gpioline_info info;
|
||||
@ -378,13 +380,13 @@ struct gpioline_info_changed {
|
||||
* @lineoffsets: an array of desired lines, specified by offset index for the
|
||||
* associated GPIO device
|
||||
* @flags: desired flags for the desired GPIO lines, such as
|
||||
* GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed
|
||||
* %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added
|
||||
* together. Note that even if multiple lines are requested, the same flags
|
||||
* must be applicable to all of them, if you want lines with individual
|
||||
* flags set, request them one by one. It is possible to select
|
||||
* a batch of input or output lines, but they must all have the same
|
||||
* characteristics, i.e. all inputs or all outputs, all active low etc
|
||||
* @default_values: if the GPIOHANDLE_REQUEST_OUTPUT is set for a requested
|
||||
* @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set for a requested
|
||||
* line, this specifies the default output value, should be 0 (low) or
|
||||
* 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
|
||||
* @consumer_label: a desired consumer label for the selected GPIO line(s)
|
||||
@ -392,11 +394,11 @@ struct gpioline_info_changed {
|
||||
* @lines: number of lines requested in this request, i.e. the number of
|
||||
* valid fields in the above arrays, set to 1 to request a single line
|
||||
* @fd: if successful this field will contain a valid anonymous file handle
|
||||
* after a GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value
|
||||
* after a %GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value
|
||||
* means error
|
||||
*
|
||||
* This struct is part of ABI v1 and is deprecated.
|
||||
* Use struct gpio_v2_line_request instead.
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_request instead.
|
||||
*/
|
||||
struct gpiohandle_request {
|
||||
__u32 lineoffsets[GPIOHANDLES_MAX];
|
||||
@ -410,15 +412,15 @@ struct gpiohandle_request {
|
||||
/**
|
||||
* struct gpiohandle_config - Configuration for a GPIO handle request
|
||||
* @flags: updated flags for the requested GPIO lines, such as
|
||||
* GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed
|
||||
* %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added
|
||||
* together
|
||||
* @default_values: if the GPIOHANDLE_REQUEST_OUTPUT is set in flags,
|
||||
* @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set in flags,
|
||||
* this specifies the default output value, should be 0 (low) or
|
||||
* 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
|
||||
* @padding: reserved for future use and should be zero filled
|
||||
*
|
||||
* This struct is part of ABI v1 and is deprecated.
|
||||
* Use struct gpio_v2_line_config instead.
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_config instead.
|
||||
*/
|
||||
struct gpiohandle_config {
|
||||
__u32 flags;
|
||||
@ -432,8 +434,8 @@ struct gpiohandle_config {
|
||||
* state of a line, when setting the state of lines these should contain
|
||||
* the desired target state
|
||||
*
|
||||
* This struct is part of ABI v1 and is deprecated.
|
||||
* Use struct gpio_v2_line_values instead.
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_values instead.
|
||||
*/
|
||||
struct gpiohandle_data {
|
||||
__u8 values[GPIOHANDLES_MAX];
|
||||
@ -449,17 +451,17 @@ struct gpiohandle_data {
|
||||
* @lineoffset: the desired line to subscribe to events from, specified by
|
||||
* offset index for the associated GPIO device
|
||||
* @handleflags: desired handle flags for the desired GPIO line, such as
|
||||
* GPIOHANDLE_REQUEST_ACTIVE_LOW or GPIOHANDLE_REQUEST_OPEN_DRAIN
|
||||
* %GPIOHANDLE_REQUEST_ACTIVE_LOW or %GPIOHANDLE_REQUEST_OPEN_DRAIN
|
||||
* @eventflags: desired flags for the desired GPIO event line, such as
|
||||
* GPIOEVENT_REQUEST_RISING_EDGE or GPIOEVENT_REQUEST_FALLING_EDGE
|
||||
* %GPIOEVENT_REQUEST_RISING_EDGE or %GPIOEVENT_REQUEST_FALLING_EDGE
|
||||
* @consumer_label: a desired consumer label for the selected GPIO line(s)
|
||||
* such as "my-listener"
|
||||
* @fd: if successful this field will contain a valid anonymous file handle
|
||||
* after a GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value
|
||||
* after a %GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value
|
||||
* means error
|
||||
*
|
||||
* This struct is part of ABI v1 and is deprecated.
|
||||
* Use struct gpio_v2_line_request instead.
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_request instead.
|
||||
*/
|
||||
struct gpioevent_request {
|
||||
__u32 lineoffset;
|
||||
@ -469,7 +471,7 @@ struct gpioevent_request {
|
||||
int fd;
|
||||
};
|
||||
|
||||
/**
|
||||
/*
|
||||
* GPIO event types
|
||||
*/
|
||||
#define GPIOEVENT_EVENT_RISING_EDGE 0x01
|
||||
@ -480,8 +482,8 @@ struct gpioevent_request {
|
||||
* @timestamp: best estimate of time of event occurrence, in nanoseconds
|
||||
* @id: event identifier
|
||||
*
|
||||
* This struct is part of ABI v1 and is deprecated.
|
||||
* Use struct gpio_v2_line_event instead.
|
||||
* Note: This struct is part of ABI v1 and is deprecated.
|
||||
* Use &struct gpio_v2_line_event instead.
|
||||
*/
|
||||
struct gpioevent_data {
|
||||
__u64 timestamp;
|
||||
|
14
init/main.c
14
init/main.c
@ -269,14 +269,24 @@ static void * __init get_boot_config_from_initrd(u32 *_size, u32 *_csum)
|
||||
u32 size, csum;
|
||||
char *data;
|
||||
u32 *hdr;
|
||||
int i;
|
||||
|
||||
if (!initrd_end)
|
||||
return NULL;
|
||||
|
||||
data = (char *)initrd_end - BOOTCONFIG_MAGIC_LEN;
|
||||
if (memcmp(data, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN))
|
||||
return NULL;
|
||||
/*
|
||||
* Since Grub may align the size of initrd to 4, we must
|
||||
* check the preceding 3 bytes as well.
|
||||
*/
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (!memcmp(data, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN))
|
||||
goto found;
|
||||
data--;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
found:
|
||||
hdr = (u32 *)(data - 8);
|
||||
size = hdr[0];
|
||||
csum = hdr[1];
|
||||
|
@ -4077,7 +4077,6 @@ void rcu_cpu_starting(unsigned int cpu)
|
||||
smp_mb(); /* Ensure RCU read-side usage follows above initialization. */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
/*
|
||||
* The outgoing function has no further need of RCU, so remove it from
|
||||
* the rcu_node tree's ->qsmaskinitnext bit masks.
|
||||
@ -4117,6 +4116,7 @@ void rcu_report_dead(unsigned int cpu)
|
||||
rdp->cpu_started = false;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
/*
|
||||
* The outgoing CPU has just passed through the dying-idle state, and we
|
||||
* are being invoked from the CPU that was IPIed to continue the offline
|
||||
|
Loading…
Reference in New Issue
Block a user