···1313and RK3399 SoCs. The driver is located under drivers/staging/media/rkisp11414and uses the Media-Controller API.15151616+Revisions1717+=========1818+1919+There exist multiple smaller revisions to this ISP that got introduced in2020+later SoCs. Revisions can be found in the enum :c:type:`rkisp1_cif_isp_version`2121+in the UAPI and the revision of the ISP inside the running SoC can be read2222+in the field hw_revision of struct media_device_info as returned by2323+ioctl MEDIA_IOC_DEVICE_INFO.2424+2525+Versions in use are:2626+2727+- RKISP1_V10: used at least in rk3288 and rk33992828+- RKISP1_V11: declared in the original vendor code, but not used2929+- RKISP1_V12: used at least in rk3326 and px303030+- RKISP1_V13: used at least in rk18083131+1632Topology1733========1834.. _rkisp1_topology_graph:
+5
Documentation/asm-annotations.rst
···100100~~~~~~~~~~~~~~~~~~101101This section covers ``SYM_FUNC_*`` and ``SYM_CODE_*`` enumerated above.102102103103+``objtool`` requires that all code must be contained in an ELF symbol. Symbol104104+names that have a ``.L`` prefix do not emit symbol table entries. ``.L``105105+prefixed symbols can be used within a code region, but should be avoided for106106+denoting a range of code via ``SYM_*_START/END`` annotations.107107+103108* ``SYM_FUNC_START`` and ``SYM_FUNC_START_LOCAL`` are supposed to be **the104109 most frequent markings**. They are used for functions with standard calling105110 conventions -- global and local. Like in C, they both align the functions to
-1
Documentation/devicetree/bindings/arm/cpus.yaml
···232232 by this cpu (see ./idle-states.yaml).233233234234 capacity-dmips-mhz:235235- $ref: '/schemas/types.yaml#/definitions/uint32'236235 description:237236 u32 value representing CPU capacity (see ./cpu-capacity.txt) in238237 DMIPS/MHz, relative to highest capacity-dmips-mhz
···4040 documents on how to describe the way the sii902x device is4141 connected to the rest of the audio system:4242 Documentation/devicetree/bindings/sound/simple-card.yaml4343- Documentation/devicetree/bindings/sound/audio-graph-card.txt4343+ Documentation/devicetree/bindings/sound/audio-graph-card.yaml4444 Note: In case of the audio-graph-card binding the used port4545 index should be 3.4646
···23232424For a description of the display interface sink function blocks, see2525Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt and2626-Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt.2626+Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml.27272828Required properties (all function blocks):2929- compatible: "mediatek,<chip>-disp-<function>", one of···6161 "mediatek,<chip>-disp-wdma"6262 the supported chips are mt2701, mt8167 and mt8173.6363- larb: Should contain a phandle pointing to the local arbiter device as defined6464- in Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt6464+ in Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml6565- iommus: Should point to the respective IOMMU block with master port as6666 argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt6767 for details.
···4949 description:5050 This property controls the Accumulation Dead band which allows to set the5151 level of current below which no accumulation takes place.5252- $ref: /schemas/types.yaml#/definitions/uint325352 maximum: 2555453 default: 05554
···7373 description: |7474 Temperature sensor trimming factor. It can be used to manually adjust the7575 temperature measurements within 7.130 degrees Celsius.7676- maxItems: 17777- items:7878- default: 07979- minimum: 08080- maximum: 71307676+ default: 07777+ minimum: 07878+ maximum: 713081798280additionalProperties: false8381
···5252 ti,bus-range-microvolt:5353 description: |5454 This is the operating range of the bus voltage in microvolt5555- $ref: /schemas/types.yaml#/definitions/uint325655 enum: [16000000, 32000000]5756 default: 320000005857
···39394040 i2c-gpio,delay-us:4141 description: delay between GPIO operations (may depend on each platform)4242- $ref: /schemas/types.yaml#/definitions/uint3243424443 i2c-gpio,timeout-ms:4544 description: timeout to get data4646- $ref: /schemas/types.yaml#/definitions/uint3247454846 # Deprecated properties, do not use in new device tree sources:4947 gpios:
···6666 default: 40000067676868 i2c-sda-hold-time-ns:6969- maxItems: 17069 description: |7170 The property should contain the SDA hold time in nanoseconds. This option7271 is only supported in hardware blocks version 1.11a or newer or on7372 Microsemi SoCs.74737574 i2c-scl-falling-time-ns:7676- maxItems: 17775 description: |7876 The property should contain the SCL falling time in nanoseconds.7977 This value is used to compute the tLOW period.8078 default: 30081798280 i2c-sda-falling-time-ns:8383- maxItems: 18481 description: |8582 The property should contain the SDA falling time in nanoseconds.8683 This value is used to compute the tHIGH period.
···2323 maxItems: 124242525 shunt-resistor-micro-ohms:2626- $ref: /schemas/types.yaml#/definitions/uint322726 description: |2827 Value in micro Ohms of the shunt resistor connected between the RS+ and2928 RS- inputs, across which the current is measured. Value needed to compute
···246246 Resolution (bits) to use for conversions:247247 - can be 6, 8, 10 or 12 on stm32f4248248 - can be 8, 10, 12, 14 or 16 on stm32h7 and stm32mp1249249- $ref: /schemas/types.yaml#/definitions/uint32250249251250 st,adc-channels:252251 description: |
···70707171 touchscreen-x-mm:7272 description: horizontal length in mm of the touchscreen7373- $ref: /schemas/types.yaml#/definitions/uint3274737574 touchscreen-y-mm:7675 description: vertical length in mm of the touchscreen7777- $ref: /schemas/types.yaml#/definitions/uint3278767977dependencies:8078 touchscreen-size-x: [ touchscreen-size-y ]
···11+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)22+%YAML 1.233+---44+$id: http://devicetree.org/schemas/leds/richtek,rt8515.yaml#55+$schema: http://devicetree.org/meta-schemas/core.yaml#66+77+title: Richtek RT8515 1.5A dual channel LED driver88+99+maintainers:1010+ - Linus Walleij <linus.walleij@linaro.org>1111+1212+description: |1313+ The Richtek RT8515 is a dual channel (two mode) LED driver that1414+ supports driving a white LED in flash or torch mode. The maximum1515+ current for each mode is defined in hardware using two resistors1616+ RFS and RTS.1717+1818+properties:1919+ compatible:2020+ const: richtek,rt85152121+2222+ enf-gpios:2323+ maxItems: 12424+ description: A connection to the 'ENF' (enable flash) pin.2525+2626+ ent-gpios:2727+ maxItems: 12828+ description: A connection to the 'ENT' (enable torch) pin.2929+3030+ richtek,rfs-ohms:3131+ minimum: 76803232+ maximum: 3670003333+ description: The resistance value of the RFS resistor. This3434+ resistors limits the maximum flash current. This must be set3535+ for the property flash-max-microamp to work, the RFS resistor3636+ defines the range of the dimmer setting (brightness) of the3737+ flash LED.3838+3939+ richtek,rts-ohms:4040+ minimum: 76804141+ maximum: 3670004242+ description: The resistance value of the RTS resistor. This4343+ resistors limits the maximum torch current. This must be set4444+ for the property torch-max-microamp to work, the RTS resistor4545+ defines the range of the dimmer setting (brightness) of the4646+ torch LED.4747+4848+ led:4949+ type: object5050+ $ref: common.yaml#5151+ properties:5252+ function: true5353+ color: true5454+ flash-max-timeout-us: true5555+5656+ flash-max-microamp:5757+ maximum: 7000005858+ description: The maximum current for flash mode5959+ is hardwired to the component using the RFS resistor to6060+ ground. The maximum hardware current setting is calculated6161+ according to the formula Imax = 5500 / RFS. The lowest6262+ allowed resistance value is 7.86 kOhm giving an absolute6363+ maximum current of 700mA. By setting this attribute in6464+ the device tree, you can further restrict the maximum6565+ current below the hardware limit. This requires the RFS6666+ to be defined as it defines the maximum range.6767+6868+ led-max-microamp:6969+ maximum: 7000007070+ description: The maximum current for torch mode7171+ is hardwired to the component using the RTS resistor to7272+ ground. The maximum hardware current setting is calculated7373+ according to the formula Imax = 5500 / RTS. The lowest7474+ allowed resistance value is 7.86 kOhm giving an absolute7575+ maximum current of 700mA. By setting this attribute in7676+ the device tree, you can further restrict the maximum7777+ current below the hardware limit. This requires the RTS7878+ to be defined as it defines the maximum range.7979+8080+ additionalProperties: false8181+8282+required:8383+ - compatible8484+ - ent-gpios8585+ - enf-gpios8686+ - led8787+8888+additionalProperties: false8989+9090+examples:9191+ - |9292+ #include <dt-bindings/gpio/gpio.h>9393+ #include <dt-bindings/leds/common.h>9494+9595+ led-controller {9696+ compatible = "richtek,rt8515";9797+ enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;9898+ ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;9999+ richtek,rfs-ohms = <16000>;100100+ richtek,rts-ohms = <100000>;101101+102102+ led {103103+ function = LED_FUNCTION_FLASH;104104+ color = <LED_COLOR_ID_WHITE>;105105+ flash-max-timeout-us = <250000>;106106+ flash-max-microamp = <150000>;107107+ led-max-microamp = <25000>;108108+ };109109+ };110110+111111+...
···1616- power-domains: a phandle to the power domain, see1717 Documentation/devicetree/bindings/power/power_domain.txt for details.1818- mediatek,larb: must contain the local arbiters in the current Socs, see1919- Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt1919+ Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml2020 for details.2121- iommus: should point to the respective IOMMU block with master port as2222 argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
···1414- power-domains: a phandle to the power domain, see1515 Documentation/devicetree/bindings/power/power_domain.txt for details.1616- mediatek,larb: must contain the local arbiters in the current SoCs, see1717- Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt1717+ Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml1818 for details.1919- iommus: should point to the respective IOMMU block with master port as2020 argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
···2828 argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt2929 for details.3030- mediatek,larb: must contain the local arbiters in the current Socs, see3131- Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt3131+ Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml3232 for details.33333434Example:
···259259 waiting for I/O signalling and card power supply to be stable,260260 regardless of whether pwrseq-simple is used. Default to 10ms if261261 no available.262262- $ref: /schemas/types.yaml#/definitions/uint32263262 default: 10264263265264 supports-cqe:
···4141 description:4242 Delay in ms after powering the card and de-asserting the4343 reset-gpios (if any).4444- $ref: /schemas/types.yaml#/definitions/uint3245444645 power-off-delay-us:4746 description:4847 Delay in us after asserting the reset-gpios (if any)4948 during power off of the card.5050- $ref: /schemas/types.yaml#/definitions/uint3251495250required:5351 - compatible
···122122 such as flow control thresholds.123123124124 rx-internal-delay-ps:125125- $ref: /schemas/types.yaml#/definitions/uint32126125 description: |127126 RGMII Receive Clock Delay defined in pico seconds.128127 This is used for controllers that have configurable RX internal delays.···139140 is used for components that can have configurable fifo sizes.140141141142 tx-internal-delay-ps:142142- $ref: /schemas/types.yaml#/definitions/uint32143143 description: |144144 RGMII Transmit Clock Delay defined in pico seconds.145145 This is used for controllers that have configurable TX internal delays.
···212212 Triplet of delays. The 1st cell is reset pre-delay in micro213213 seconds. The 2nd cell is reset pulse in micro seconds. The 3rd214214 cell is reset post-delay in micro seconds.215215- $ref: /schemas/types.yaml#/definitions/uint32-array216215 minItems: 3217216 maxItems: 3218217
···8383 for each of the battery capacity lookup table.84848585 operating-range-celsius:8686- $ref: /schemas/types.yaml#/definitions/uint32-array8786 description: operating temperature range of a battery8887 items:8988 - description: minimum temperature at which battery can operate9089 - description: maximum temperature at which battery can operate91909291 ambient-celsius:9393- $ref: /schemas/types.yaml#/definitions/uint32-array9492 description: safe range of ambient temperature9593 items:9694 - description: alert when ambient temperature is lower than this value9795 - description: alert when ambient temperature is higher than this value98969997 alert-celsius:100100- $ref: /schemas/types.yaml#/definitions/uint32-array10198 description: safe range of battery temperature10299 items:103100 - description: alert when battery temperature is lower than this value
···72727373 startup-delay-us:7474 description: startup time in microseconds7575- $ref: /schemas/types.yaml#/definitions/uint3276757776 off-on-delay-us:7877 description: off delay time in microseconds7979- $ref: /schemas/types.yaml#/definitions/uint3280788179 enable-active-high:8280 description:
-2
Documentation/devicetree/bindings/rtc/rtc.yaml
···2727 1: chargeable28282929 quartz-load-femtofarads:3030- $ref: /schemas/types.yaml#/definitions/uint323130 description:3231 The capacitive load of the quartz(x-tal), expressed in femto3332 Farad (fF). The default value shall be listed (if optional),···4647 deprecated: true47484849 trickle-resistor-ohms:4949- $ref: /schemas/types.yaml#/definitions/uint325050 description:5151 Selected resistor for trickle charger. Should be given5252 if trickle charger should be enabled.
···4141 values of 2k, 4k or 8k. If set to 0 it will be off. If this node is not4242 mentioned or if the value is unknown, then micbias resistor is set to4343 4k.4444- $ref: "/schemas/types.yaml#/definitions/uint32"4544 enum: [ 0, 2, 4, 8 ]46454746 micbias-voltage-m-volts:4847 description: The bias voltage to be used in mVolts. The voltage can take4948 values from 1.25V to 3V by 250mV steps. If this node is not mentioned5049 or the value is unknown, then the value is set to 1.25V.5151- $ref: "/schemas/types.yaml#/definitions/uint32"5250 enum: [ 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000 ]53515452 lrclk-strength:
···1919 pattern: "^watchdog(@.*|-[0-9a-f])?$"20202121 timeout-sec:2222- $ref: /schemas/types.yaml#/definitions/uint322322 description:2423 Contains the watchdog timeout in seconds.2524
+1-1
Documentation/networking/ip-sysctl.rst
···1196119611971197 If non-zero, the message will be sent with the primary address of11981198 the interface that received the packet that caused the icmp error.11991199- This is the behaviour network many administrators will expect from11991199+ This is the behaviour many network administrators will expect from12001200 a router. And it can make debugging complicated network layouts12011201 much easier.12021202
···1515{1616 int offset = fdt_path_offset(fdt, node_path);1717 if (offset == -FDT_ERR_NOTFOUND)1818- offset = fdt_add_subnode(fdt, 0, node_path);1818+ /* Add the node to root if not found, dropping the leading '/' */1919+ offset = fdt_add_subnode(fdt, 0, node_path + 1);1920 return offset;2021}2122
+4-2
arch/arm64/include/asm/memory.h
···247247248248249249/*250250- * The linear kernel range starts at the bottom of the virtual address space.250250+ * Check whether an arbitrary address is within the linear map, which251251+ * lives in the [PAGE_OFFSET, PAGE_END) interval at the bottom of the252252+ * kernel's TTBR1 address range.251253 */252252-#define __is_lm_address(addr) (((u64)(addr) & ~PAGE_OFFSET) < (PAGE_END - PAGE_OFFSET))254254+#define __is_lm_address(addr) (((u64)(addr) ^ PAGE_OFFSET) < (PAGE_END - PAGE_OFFSET))253255254256#define __lm_to_phys(addr) (((addr) & ~PAGE_OFFSET) + PHYS_OFFSET)255257#define __kimg_to_phys(addr) ((addr) - kimage_voffset)
+17-13
arch/powerpc/kernel/irq.c
···180180181181void replay_soft_interrupts(void)182182{183183- /*184184- * We use local_paca rather than get_paca() to avoid all185185- * the debug_smp_processor_id() business in this low level186186- * function187187- */188188- unsigned char happened = local_paca->irq_happened;189183 struct pt_regs regs;184184+185185+ /*186186+ * Be careful here, calling these interrupt handlers can cause187187+ * softirqs to be raised, which they may run when calling irq_exit,188188+ * which will cause local_irq_enable() to be run, which can then189189+ * recurse into this function. Don't keep any state across190190+ * interrupt handler calls which may change underneath us.191191+ *192192+ * We use local_paca rather than get_paca() to avoid all the193193+ * debug_smp_processor_id() business in this low level function.194194+ */190195191196 ppc_save_regs(®s);192197 regs.softe = IRQS_ENABLED;···214209 * This is a higher priority interrupt than the others, so215210 * replay it first.216211 */217217- if (IS_ENABLED(CONFIG_PPC_BOOK3S) && (happened & PACA_IRQ_HMI)) {212212+ if (IS_ENABLED(CONFIG_PPC_BOOK3S) && (local_paca->irq_happened & PACA_IRQ_HMI)) {218213 local_paca->irq_happened &= ~PACA_IRQ_HMI;219214 regs.trap = 0xe60;220215 handle_hmi_exception(®s);···222217 hard_irq_disable();223218 }224219225225- if (happened & PACA_IRQ_DEC) {220220+ if (local_paca->irq_happened & PACA_IRQ_DEC) {226221 local_paca->irq_happened &= ~PACA_IRQ_DEC;227222 regs.trap = 0x900;228223 timer_interrupt(®s);···230225 hard_irq_disable();231226 }232227233233- if (happened & PACA_IRQ_EE) {228228+ if (local_paca->irq_happened & PACA_IRQ_EE) {234229 local_paca->irq_happened &= ~PACA_IRQ_EE;235230 regs.trap = 0x500;236231 do_IRQ(®s);···238233 hard_irq_disable();239234 }240235241241- if (IS_ENABLED(CONFIG_PPC_DOORBELL) && (happened & PACA_IRQ_DBELL)) {236236+ if (IS_ENABLED(CONFIG_PPC_DOORBELL) && (local_paca->irq_happened & PACA_IRQ_DBELL)) {242237 local_paca->irq_happened &= ~PACA_IRQ_DBELL;243238 if (IS_ENABLED(CONFIG_PPC_BOOK3E))244239 regs.trap = 0x280;···250245 }251246252247 /* Book3E does not support soft-masking PMI interrupts */253253- if (IS_ENABLED(CONFIG_PPC_BOOK3S) && (happened & PACA_IRQ_PMI)) {248248+ if (IS_ENABLED(CONFIG_PPC_BOOK3S) && (local_paca->irq_happened & PACA_IRQ_PMI)) {254249 local_paca->irq_happened &= ~PACA_IRQ_PMI;255250 regs.trap = 0xf00;256251 performance_monitor_exception(®s);···258253 hard_irq_disable();259254 }260255261261- happened = local_paca->irq_happened;262262- if (happened & ~PACA_IRQ_HARD_DIS) {256256+ if (local_paca->irq_happened & ~PACA_IRQ_HARD_DIS) {263257 /*264258 * We are responding to the next interrupt, so interrupt-off265259 * latencies should be reset here.
···10161016 */10171017void blkcg_destroy_blkgs(struct blkcg *blkcg)10181018{10191019+ might_sleep();10201020+10191021 spin_lock_irq(&blkcg->lock);1020102210211023 while (!hlist_empty(&blkcg->blkg_list)) {···10251023 struct blkcg_gq, blkcg_node);10261024 struct request_queue *q = blkg->q;1027102510281028- if (spin_trylock(&q->queue_lock)) {10291029- blkg_destroy(blkg);10301030- spin_unlock(&q->queue_lock);10311031- } else {10261026+ if (need_resched() || !spin_trylock(&q->queue_lock)) {10271027+ /*10281028+ * Given that the system can accumulate a huge number10291029+ * of blkgs in pathological cases, check to see if we10301030+ * need to rescheduling to avoid softlockup.10311031+ */10321032 spin_unlock_irq(&blkcg->lock);10331033- cpu_relax();10331033+ cond_resched();10341034 spin_lock_irq(&blkcg->lock);10351035+ continue;10351036 }10371037+10381038+ blkg_destroy(blkg);10391039+ spin_unlock(&q->queue_lock);10361040 }1037104110381042 spin_unlock_irq(&blkcg->lock);
···251251 if (add_uevent_var(env, "MODALIAS="))252252 return -ENOMEM;253253254254- len = create_pnp_modalias(adev, &env->buf[env->buflen - 1],255255- sizeof(env->buf) - env->buflen);256256- if (len < 0)257257- return len;258258-259259- env->buflen += len;260260- if (!adev->data.of_compatible)261261- return 0;262262-263263- if (len > 0 && add_uevent_var(env, "MODALIAS="))264264- return -ENOMEM;265265-266266- len = create_of_modalias(adev, &env->buf[env->buflen - 1],267267- sizeof(env->buf) - env->buflen);254254+ if (adev->data.of_compatible)255255+ len = create_of_modalias(adev, &env->buf[env->buflen - 1],256256+ sizeof(env->buf) - env->buflen);257257+ else258258+ len = create_pnp_modalias(adev, &env->buf[env->buflen - 1],259259+ sizeof(env->buf) - env->buflen);268260 if (len < 0)269261 return len;270262
+33-13
drivers/acpi/thermal.c
···174174 struct thermal_zone_device *thermal_zone;175175 int kelvin_offset; /* in millidegrees */176176 struct work_struct thermal_check_work;177177+ struct mutex thermal_check_lock;178178+ refcount_t thermal_check_count;177179};178180179181/* --------------------------------------------------------------------------···495493 return -ENODEV;496494 }497495 return 0;498498-}499499-500500-static void acpi_thermal_check(void *data)501501-{502502- struct acpi_thermal *tz = data;503503-504504- thermal_zone_device_update(tz->thermal_zone,505505- THERMAL_EVENT_UNSPECIFIED);506496}507497508498/* sys I/F for generic thermal sysfs support */···894900 Driver Interface895901 -------------------------------------------------------------------------- */896902903903+static void acpi_queue_thermal_check(struct acpi_thermal *tz)904904+{905905+ if (!work_pending(&tz->thermal_check_work))906906+ queue_work(acpi_thermal_pm_queue, &tz->thermal_check_work);907907+}908908+897909static void acpi_thermal_notify(struct acpi_device *device, u32 event)898910{899911 struct acpi_thermal *tz = acpi_driver_data(device);···910910911911 switch (event) {912912 case ACPI_THERMAL_NOTIFY_TEMPERATURE:913913- acpi_thermal_check(tz);913913+ acpi_queue_thermal_check(tz);914914 break;915915 case ACPI_THERMAL_NOTIFY_THRESHOLDS:916916 acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_THRESHOLDS);917917- acpi_thermal_check(tz);917917+ acpi_queue_thermal_check(tz);918918 acpi_bus_generate_netlink_event(device->pnp.device_class,919919 dev_name(&device->dev), event, 0);920920 break;921921 case ACPI_THERMAL_NOTIFY_DEVICES:922922 acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES);923923- acpi_thermal_check(tz);923923+ acpi_queue_thermal_check(tz);924924 acpi_bus_generate_netlink_event(device->pnp.device_class,925925 dev_name(&device->dev), event, 0);926926 break;···10201020{10211021 struct acpi_thermal *tz = container_of(work, struct acpi_thermal,10221022 thermal_check_work);10231023- acpi_thermal_check(tz);10231023+10241024+ /*10251025+ * In general, it is not sufficient to check the pending bit, because10261026+ * subsequent instances of this function may be queued after one of them10271027+ * has started running (e.g. if _TMP sleeps). Avoid bailing out if just10281028+ * one of them is running, though, because it may have done the actual10291029+ * check some time ago, so allow at least one of them to block on the10301030+ * mutex while another one is running the update.10311031+ */10321032+ if (!refcount_dec_not_one(&tz->thermal_check_count))10331033+ return;10341034+10351035+ mutex_lock(&tz->thermal_check_lock);10361036+10371037+ thermal_zone_device_update(tz->thermal_zone, THERMAL_EVENT_UNSPECIFIED);10381038+10391039+ refcount_inc(&tz->thermal_check_count);10401040+10411041+ mutex_unlock(&tz->thermal_check_lock);10241042}1025104310261044static int acpi_thermal_add(struct acpi_device *device)···10701052 if (result)10711053 goto free_memory;1072105410551055+ refcount_set(&tz->thermal_check_count, 3);10561056+ mutex_init(&tz->thermal_check_lock);10731057 INIT_WORK(&tz->thermal_check_work, acpi_thermal_check_fn);1074105810751059 pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device),···11371117 tz->state.active |= tz->trips.active[i].flags.enabled;11381118 }1139111911401140- queue_work(acpi_thermal_pm_queue, &tz->thermal_check_work);11201120+ acpi_queue_thermal_check(tz);1141112111421122 return AE_OK;11431123}
+8
drivers/block/nbd.c
···10221022 if (!sock)10231023 return err;1024102410251025+ /*10261026+ * We need to make sure we don't get any errant requests while we're10271027+ * reallocating the ->socks array.10281028+ */10291029+ blk_mq_freeze_queue(nbd->disk->queue);10301030+10251031 if (!netlink && !nbd->task_setup &&10261032 !test_bit(NBD_RT_BOUND, &config->runtime_flags))10271033 nbd->task_setup = current;···10661060 nsock->cookie = 0;10671061 socks[config->num_connections++] = nsock;10681062 atomic_inc(&config->live_connections);10631063+ blk_mq_unfreeze_queue(nbd->disk->queue);1069106410701065 return 0;1071106610721067put_socket:10681068+ blk_mq_unfreeze_queue(nbd->disk->queue);10731069 sockfd_put(sock);10741070 return err;10751071}
···33 * apple-properties.c - EFI device properties on Macs44 * Copyright (C) 2016 Lukas Wunner <lukas@wunner.de>55 *66- * Note, all properties are considered as u8 arrays.77- * To get a value of any of them the caller must use device_property_read_u8_array().66+ * Properties are stored either as:77+ * u8 arrays which can be retrieved with device_property_read_u8_array() or88+ * booleans which can be queried with device_property_present().89 */9101011#define pr_fmt(fmt) "apple-properties: " fmt···89889089 entry_data = ptr + key_len + sizeof(val_len);9190 entry_len = val_len - sizeof(val_len);9292- entry[i] = PROPERTY_ENTRY_U8_ARRAY_LEN(key, entry_data,9393- entry_len);9191+ if (entry_len)9292+ entry[i] = PROPERTY_ENTRY_U8_ARRAY_LEN(key, entry_data,9393+ entry_len);9494+ else9595+ entry[i] = PROPERTY_ENTRY_BOOL(key);9696+9497 if (dump_properties) {9598 dev_info(dev, "property: %s\n", key);9699 print_hex_dump(KERN_INFO, pr_fmt(), DUMP_PREFIX_OFFSET,
···27552755 u32 val;2756275627572757 ddi_translations = icl_get_mg_buf_trans(encoder, crtc_state, &n_entries);27582758- /* The table does not have values for level 3 and level 9. */27592759- if (level >= n_entries || level == 3 || level == 9) {27582758+ if (level >= n_entries) {27602759 drm_dbg_kms(&dev_priv->drm,27612760 "DDI translation not found for level %d. Using %d instead.",27622762- level, n_entries - 2);27632763- level = n_entries - 2;27612761+ level, n_entries - 1);27622762+ level = n_entries - 1;27642763 }2765276427662765 /* Set MG_TX_LINK_PARAMS cri_use_fs32 to 0. */
+12
drivers/gpu/drm/i915/gt/gen7_renderclear.c
···390390 &cb_kernel_ivb,391391 desc_count);392392393393+ /* Reset inherited context registers */394394+ gen7_emit_pipeline_invalidate(&cmds);395395+ batch_add(&cmds, MI_LOAD_REGISTER_IMM(2));396396+ batch_add(&cmds, i915_mmio_reg_offset(CACHE_MODE_0_GEN7));397397+ batch_add(&cmds, 0xffff0000);398398+ batch_add(&cmds, i915_mmio_reg_offset(CACHE_MODE_1));399399+ batch_add(&cmds, 0xffff0000 | PIXEL_SUBSPAN_COLLECT_OPT_DISABLE);400400+ gen7_emit_pipeline_flush(&cmds);401401+402402+ /* Switch to the media pipeline and our base address */393403 gen7_emit_pipeline_invalidate(&cmds);394404 batch_add(&cmds, PIPELINE_SELECT | PIPELINE_SELECT_MEDIA);395405 batch_add(&cmds, MI_NOOP);···409399 gen7_emit_state_base_address(&cmds, descriptors);410400 gen7_emit_pipeline_invalidate(&cmds);411401402402+ /* Set the clear-residual kernel state */412403 gen7_emit_vfe_state(&cmds, bv, urb_size - 1, 0, 0);413404 gen7_emit_interface_descriptor_load(&cmds, descriptors, desc_count);414405406406+ /* Execute the kernel on all HW threads */415407 for (i = 0; i < num_primitives(bv); i++)416408 gen7_emit_media_object(&cmds, i);417409
+35-12
drivers/gpu/drm/i915/gt/intel_ggtt.c
···526526527527 mutex_init(&ggtt->error_mutex);528528 if (ggtt->mappable_end) {529529- /* Reserve a mappable slot for our lockless error capture */530530- ret = drm_mm_insert_node_in_range(&ggtt->vm.mm,531531- &ggtt->error_capture,532532- PAGE_SIZE, 0,533533- I915_COLOR_UNEVICTABLE,534534- 0, ggtt->mappable_end,535535- DRM_MM_INSERT_LOW);536536- if (ret)537537- return ret;529529+ /*530530+ * Reserve a mappable slot for our lockless error capture.531531+ *532532+ * We strongly prefer taking address 0x0 in order to protect533533+ * other critical buffers against accidental overwrites,534534+ * as writing to address 0 is a very common mistake.535535+ *536536+ * Since 0 may already be in use by the system (e.g. the BIOS537537+ * framebuffer), we let the reservation fail quietly and hope538538+ * 0 remains reserved always.539539+ *540540+ * If we fail to reserve 0, and then fail to find any space541541+ * for an error-capture, remain silent. We can afford not542542+ * to reserve an error_capture node as we have fallback543543+ * paths, and we trust that 0 will remain reserved. However,544544+ * the only likely reason for failure to insert is a driver545545+ * bug, which we expect to cause other failures...546546+ */547547+ ggtt->error_capture.size = I915_GTT_PAGE_SIZE;548548+ ggtt->error_capture.color = I915_COLOR_UNEVICTABLE;549549+ if (drm_mm_reserve_node(&ggtt->vm.mm, &ggtt->error_capture))550550+ drm_mm_insert_node_in_range(&ggtt->vm.mm,551551+ &ggtt->error_capture,552552+ ggtt->error_capture.size, 0,553553+ ggtt->error_capture.color,554554+ 0, ggtt->mappable_end,555555+ DRM_MM_INSERT_LOW);538556 }557557+ if (drm_mm_node_allocated(&ggtt->error_capture))558558+ drm_dbg(&ggtt->vm.i915->drm,559559+ "Reserved GGTT:[%llx, %llx] for use by error capture\n",560560+ ggtt->error_capture.start,561561+ ggtt->error_capture.start + ggtt->error_capture.size);539562540563 /*541564 * The upper portion of the GuC address space has a sizeable hole···571548572549 /* Clear any non-preallocated blocks */573550 drm_mm_for_each_hole(entry, &ggtt->vm.mm, hole_start, hole_end) {574574- drm_dbg_kms(&ggtt->vm.i915->drm,575575- "clearing unused GTT space: [%lx, %lx]\n",576576- hole_start, hole_end);551551+ drm_dbg(&ggtt->vm.i915->drm,552552+ "clearing unused GTT space: [%lx, %lx]\n",553553+ hole_start, hole_end);577554 ggtt->vm.clear_range(&ggtt->vm, hole_start,578555 hole_end - hole_start);579556 }
+15-13
drivers/gpu/drm/i915/i915_active.c
···631631632632int __i915_active_wait(struct i915_active *ref, int state)633633{634634- int err;635635-636634 might_sleep();637635638638- if (!i915_active_acquire_if_busy(ref))639639- return 0;640640-641636 /* Any fence added after the wait begins will not be auto-signaled */642642- err = flush_lazy_signals(ref);643643- i915_active_release(ref);644644- if (err)645645- return err;637637+ if (i915_active_acquire_if_busy(ref)) {638638+ int err;646639647647- if (!i915_active_is_idle(ref) &&648648- ___wait_var_event(ref, i915_active_is_idle(ref),649649- state, 0, 0, schedule()))650650- return -EINTR;640640+ err = flush_lazy_signals(ref);641641+ i915_active_release(ref);642642+ if (err)643643+ return err;651644645645+ if (___wait_var_event(ref, i915_active_is_idle(ref),646646+ state, 0, 0, schedule()))647647+ return -EINTR;648648+ }649649+650650+ /*651651+ * After the wait is complete, the caller may free the active.652652+ * We have to flush any concurrent retirement before returning.653653+ */652654 flush_work(&ref->work);653655 return 0;654656}
···315315 struct drm_nouveau_svm_init *args = data;316316 int ret;317317318318+ /* We need to fail if svm is disabled */319319+ if (!cli->drm->svm)320320+ return -ENOSYS;321321+318322 /* Allocate tracking for SVM-enabled VMM. */319323 if (!(svmm = kzalloc(sizeof(*svmm), GFP_KERNEL)))320324 return -ENOMEM;
+4-4
drivers/gpu/drm/vc4/vc4_hvs.c
···620620 * for now we just allocate globally.621621 */622622 if (!hvs->hvs5)623623- /* 96kB */624624- drm_mm_init(&hvs->lbm_mm, 0, 96 * 1024);623623+ /* 48k words of 2x12-bit pixels */624624+ drm_mm_init(&hvs->lbm_mm, 0, 48 * 1024);625625 else626626- /* 70k words */627627- drm_mm_init(&hvs->lbm_mm, 0, 70 * 2 * 1024);626626+ /* 60k words of 4x12-bit pixels */627627+ drm_mm_init(&hvs->lbm_mm, 0, 60 * 1024);628628629629 /* Upload filter kernels. We only have the one for now, so we630630 * keep it around for the lifetime of the driver.
+8-3
drivers/gpu/drm/vc4/vc4_plane.c
···437437static u32 vc4_lbm_size(struct drm_plane_state *state)438438{439439 struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);440440+ struct vc4_dev *vc4 = to_vc4_dev(state->plane->dev);440441 u32 pix_per_line;441442 u32 lbm;442443···473472 lbm = pix_per_line * 16;474473 }475474476476- lbm = roundup(lbm, 32);475475+ /* Align it to 64 or 128 (hvs5) bytes */476476+ lbm = roundup(lbm, vc4->hvs->hvs5 ? 128 : 64);477477+478478+ /* Each "word" of the LBM memory contains 2 or 4 (hvs5) pixels */479479+ lbm /= vc4->hvs->hvs5 ? 4 : 2;477480478481 return lbm;479482}···917912 if (!vc4_state->is_unity) {918913 vc4_dlist_write(vc4_state,919914 VC4_SET_FIELD(vc4_state->crtc_w,920920- SCALER_POS1_SCL_WIDTH) |915915+ SCALER5_POS1_SCL_WIDTH) |921916 VC4_SET_FIELD(vc4_state->crtc_h,922922- SCALER_POS1_SCL_HEIGHT));917917+ SCALER5_POS1_SCL_HEIGHT));923918 }924919925920 /* Position Word 2: Source Image Size */
···257257258258static bool amd_iommu_pre_enabled = true;259259260260+static u32 amd_iommu_ivinfo __initdata;261261+260262bool translation_pre_enabled(struct amd_iommu *iommu)261263{262264 return (iommu->flags & AMD_IOMMU_FLAG_TRANS_PRE_ENABLED);···296294int amd_iommu_get_num_iommus(void)297295{298296 return amd_iommus_present;297297+}298298+299299+/*300300+ * For IVHD type 0x11/0x40, EFR is also available via IVHD.301301+ * Default to IVHD EFR since it is available sooner302302+ * (i.e. before PCI init).303303+ */304304+static void __init early_iommu_features_init(struct amd_iommu *iommu,305305+ struct ivhd_header *h)306306+{307307+ if (amd_iommu_ivinfo & IOMMU_IVINFO_EFRSUP)308308+ iommu->features = h->efr_reg;299309}300310301311/* Access to l1 and l2 indexed register spaces */···1591157715921578 if (h->efr_reg & BIT(IOMMU_EFR_XTSUP_SHIFT))15931579 amd_iommu_xt_mode = IRQ_REMAP_X2APIC_MODE;15801580+15811581+ early_iommu_features_init(iommu, h);15821582+15941583 break;15951584 default:15961585 return -EINVAL;···17871770 NULL,17881771};1789177217731773+/*17741774+ * Note: IVHD 0x11 and 0x40 also contains exact copy17751775+ * of the IOMMU Extended Feature Register [MMIO Offset 0030h].17761776+ * Default to EFR in IVHD since it is available sooner (i.e. before PCI init).17771777+ */17781778+static void __init late_iommu_features_init(struct amd_iommu *iommu)17791779+{17801780+ u64 features;17811781+17821782+ if (!(iommu->cap & (1 << IOMMU_CAP_EFR)))17831783+ return;17841784+17851785+ /* read extended feature bits */17861786+ features = readq(iommu->mmio_base + MMIO_EXT_FEATURES);17871787+17881788+ if (!iommu->features) {17891789+ iommu->features = features;17901790+ return;17911791+ }17921792+17931793+ /*17941794+ * Sanity check and warn if EFR values from17951795+ * IVHD and MMIO conflict.17961796+ */17971797+ if (features != iommu->features)17981798+ pr_warn(FW_WARN "EFR mismatch. Use IVHD EFR (%#llx : %#llx\n).",17991799+ features, iommu->features);18001800+}18011801+17901802static int __init iommu_init_pci(struct amd_iommu *iommu)17911803{17921804 int cap_ptr = iommu->cap_ptr;···18351789 if (!(iommu->cap & (1 << IOMMU_CAP_IOTLB)))18361790 amd_iommu_iotlb_sup = false;1837179118381838- /* read extended feature bits */18391839- iommu->features = readq(iommu->mmio_base + MMIO_EXT_FEATURES);17921792+ late_iommu_features_init(iommu);1840179318411794 if (iommu_feature(iommu, FEATURE_GT)) {18421795 int glxval;···26522607 free_unity_maps();26532608}2654260926102610+static void __init ivinfo_init(void *ivrs)26112611+{26122612+ amd_iommu_ivinfo = *((u32 *)(ivrs + IOMMU_IVINFO_OFFSET));26132613+}26142614+26552615/*26562616 * This is the hardware init function for AMD IOMMU in the system.26572617 * This function is called either from amd_iommu_init or from the interrupt···27102660 ret = check_ivrs_checksum(ivrs_base);27112661 if (ret)27122662 goto out;26632663+26642664+ ivinfo_init(ivrs_base);2713266527142666 amd_iommu_target_ivhd_type = get_highest_supported_ivhd_type(ivrs_base);27152667 DUMP_printk("Using IVHD type %#x\n", amd_iommu_target_ivhd_type);
+1-1
drivers/iommu/intel/dmar.c
···14961496 * Max Invs Pending (MIP) is set to 0 for now until we have DIT in14971497 * ECAP.14981498 */14991499- if (addr & GENMASK_ULL(size_order + VTD_PAGE_SHIFT, 0))14991499+ if (!IS_ALIGNED(addr, VTD_PAGE_SIZE << size_order))15001500 pr_warn_ratelimited("Invalidate non-aligned address %llx, order %d\n",15011501 addr, size_order);15021502
+31-1
drivers/iommu/intel/iommu.c
···54405440 return ret;54415441}5442544254435443+static bool domain_use_flush_queue(void)54445444+{54455445+ struct dmar_drhd_unit *drhd;54465446+ struct intel_iommu *iommu;54475447+ bool r = true;54485448+54495449+ if (intel_iommu_strict)54505450+ return false;54515451+54525452+ /*54535453+ * The flush queue implementation does not perform page-selective54545454+ * invalidations that are required for efficient TLB flushes in virtual54555455+ * environments. The benefit of batching is likely to be much lower than54565456+ * the overhead of synchronizing the virtual and physical IOMMU54575457+ * page-tables.54585458+ */54595459+ rcu_read_lock();54605460+ for_each_active_iommu(iommu, drhd) {54615461+ if (!cap_caching_mode(iommu->cap))54625462+ continue;54635463+54645464+ pr_warn_once("IOMMU batching is disabled due to virtualization");54655465+ r = false;54665466+ break;54675467+ }54685468+ rcu_read_unlock();54695469+54705470+ return r;54715471+}54725472+54435473static int54445474intel_iommu_domain_get_attr(struct iommu_domain *domain,54455475 enum iommu_attr attr, void *data)···54805450 case IOMMU_DOMAIN_DMA:54815451 switch (attr) {54825452 case DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE:54835483- *(int *)data = !intel_iommu_strict;54535453+ *(int *)data = domain_use_flush_queue();54845454 return 0;54855455 default:54865456 return -ENODEV;
+3
drivers/leds/Kconfig
···928928 This option enables support for the Power Button LED of929929 Acer Iconia Tab A500.930930931931+comment "Flash and Torch LED drivers"932932+source "drivers/leds/flash/Kconfig"933933+931934comment "LED Triggers"932935source "drivers/leds/trigger/Kconfig"933936
+3
drivers/leds/Makefile
···103103# LED Userspace Drivers104104obj-$(CONFIG_LEDS_USER) += uleds.o105105106106+# Flash and Torch LED Drivers107107+obj-$(CONFIG_LEDS_CLASS_FLASH) += flash/108108+106109# LED Triggers107110obj-$(CONFIG_LEDS_TRIGGERS) += trigger/
+15
drivers/leds/flash/Kconfig
···11+# SPDX-License-Identifier: GPL-2.022+33+if LEDS_CLASS_FLASH44+55+config LEDS_RT851566+ tristate "LED support for Richtek RT8515 flash/torch LED"77+ depends on GPIOLIB88+ help99+ This option enables support for the Richtek RT8515 flash1010+ and torch LEDs found on some mobile phones.1111+1212+ To compile this driver as a module, choose M here: the module1313+ will be called leds-rt8515.1414+1515+endif # LEDS_CLASS_FLASH
···11+// SPDX-License-Identifier: GPL-2.0-or-later22+/*33+ * LED driver for Richtek RT8515 flash/torch white LEDs44+ * found on some Samsung mobile phones.55+ *66+ * This is a 1.5A Boost dual channel driver produced around 2011.77+ *88+ * The component lacks a datasheet, but in the schematic picture99+ * from the LG P970 service manual you can see the connections1010+ * from the RT8515 to the LED, with two resistors connected1111+ * from the pins "RFS" and "RTS" to ground.1212+ *1313+ * On the LG P970:1414+ * RFS (resistance flash setting?) is 20 kOhm1515+ * RTS (resistance torch setting?) is 39 kOhm1616+ *1717+ * Some sleuthing finds us the RT9387A which we have a datasheet for:1818+ * https://static5.arrow.com/pdfs/2014/7/27/8/21/12/794/rtt_/manual/94download_ds.jspprt9387a.jspprt9387a.pdf1919+ * This apparently works the same way so in theory this driver2020+ * should cover RT9387A as well. This has not been tested, please2121+ * update the compatibles if you add RT9387A support.2222+ *2323+ * Linus Walleij <linus.walleij@linaro.org>2424+ */2525+#include <linux/delay.h>2626+#include <linux/err.h>2727+#include <linux/gpio/consumer.h>2828+#include <linux/led-class-flash.h>2929+#include <linux/mod_devicetable.h>3030+#include <linux/module.h>3131+#include <linux/platform_device.h>3232+#include <linux/property.h>3333+#include <linux/regulator/consumer.h>3434+3535+#include <media/v4l2-flash-led-class.h>3636+3737+/* We can provide 15-700 mA out to the LED */3838+#define RT8515_MIN_IOUT_MA 153939+#define RT8515_MAX_IOUT_MA 7004040+/* The maximum intensity is 1-16 for flash and 1-100 for torch */4141+#define RT8515_FLASH_MAX 164242+#define RT8515_TORCH_MAX 1004343+4444+#define RT8515_TIMEOUT_US 250000U4545+#define RT8515_MAX_TIMEOUT_US 300000U4646+4747+struct rt8515 {4848+ struct led_classdev_flash fled;4949+ struct device *dev;5050+ struct v4l2_flash *v4l2_flash;5151+ struct mutex lock;5252+ struct regulator *reg;5353+ struct gpio_desc *enable_torch;5454+ struct gpio_desc *enable_flash;5555+ struct timer_list powerdown_timer;5656+ u32 max_timeout; /* Flash max timeout */5757+ int flash_max_intensity;5858+ int torch_max_intensity;5959+};6060+6161+static struct rt8515 *to_rt8515(struct led_classdev_flash *fled)6262+{6363+ return container_of(fled, struct rt8515, fled);6464+}6565+6666+static void rt8515_gpio_led_off(struct rt8515 *rt)6767+{6868+ gpiod_set_value(rt->enable_flash, 0);6969+ gpiod_set_value(rt->enable_torch, 0);7070+}7171+7272+static void rt8515_gpio_brightness_commit(struct gpio_desc *gpiod,7373+ int brightness)7474+{7575+ int i;7676+7777+ /*7878+ * Toggling a GPIO line with a small delay increases the7979+ * brightness one step at a time.8080+ */8181+ for (i = 0; i < brightness; i++) {8282+ gpiod_set_value(gpiod, 0);8383+ udelay(1);8484+ gpiod_set_value(gpiod, 1);8585+ udelay(1);8686+ }8787+}8888+8989+/* This is setting the torch light level */9090+static int rt8515_led_brightness_set(struct led_classdev *led,9191+ enum led_brightness brightness)9292+{9393+ struct led_classdev_flash *fled = lcdev_to_flcdev(led);9494+ struct rt8515 *rt = to_rt8515(fled);9595+9696+ mutex_lock(&rt->lock);9797+9898+ if (brightness == LED_OFF) {9999+ /* Off */100100+ rt8515_gpio_led_off(rt);101101+ } else if (brightness < RT8515_TORCH_MAX) {102102+ /* Step it up to movie mode brightness using the flash pin */103103+ rt8515_gpio_brightness_commit(rt->enable_torch, brightness);104104+ } else {105105+ /* Max torch brightness requested */106106+ gpiod_set_value(rt->enable_torch, 1);107107+ }108108+109109+ mutex_unlock(&rt->lock);110110+111111+ return 0;112112+}113113+114114+static int rt8515_led_flash_strobe_set(struct led_classdev_flash *fled,115115+ bool state)116116+{117117+ struct rt8515 *rt = to_rt8515(fled);118118+ struct led_flash_setting *timeout = &fled->timeout;119119+ int brightness = rt->flash_max_intensity;120120+121121+ mutex_lock(&rt->lock);122122+123123+ if (state) {124124+ /* Enable LED flash mode and set brightness */125125+ rt8515_gpio_brightness_commit(rt->enable_flash, brightness);126126+ /* Set timeout */127127+ mod_timer(&rt->powerdown_timer,128128+ jiffies + usecs_to_jiffies(timeout->val));129129+ } else {130130+ del_timer_sync(&rt->powerdown_timer);131131+ /* Turn the LED off */132132+ rt8515_gpio_led_off(rt);133133+ }134134+135135+ fled->led_cdev.brightness = LED_OFF;136136+ /* After this the torch LED will be disabled */137137+138138+ mutex_unlock(&rt->lock);139139+140140+ return 0;141141+}142142+143143+static int rt8515_led_flash_strobe_get(struct led_classdev_flash *fled,144144+ bool *state)145145+{146146+ struct rt8515 *rt = to_rt8515(fled);147147+148148+ *state = timer_pending(&rt->powerdown_timer);149149+150150+ return 0;151151+}152152+153153+static int rt8515_led_flash_timeout_set(struct led_classdev_flash *fled,154154+ u32 timeout)155155+{156156+ /* The timeout is stored in the led-class-flash core */157157+ return 0;158158+}159159+160160+static const struct led_flash_ops rt8515_flash_ops = {161161+ .strobe_set = rt8515_led_flash_strobe_set,162162+ .strobe_get = rt8515_led_flash_strobe_get,163163+ .timeout_set = rt8515_led_flash_timeout_set,164164+};165165+166166+static void rt8515_powerdown_timer(struct timer_list *t)167167+{168168+ struct rt8515 *rt = from_timer(rt, t, powerdown_timer);169169+170170+ /* Turn the LED off */171171+ rt8515_gpio_led_off(rt);172172+}173173+174174+static void rt8515_init_flash_timeout(struct rt8515 *rt)175175+{176176+ struct led_classdev_flash *fled = &rt->fled;177177+ struct led_flash_setting *s;178178+179179+ /* Init flash timeout setting */180180+ s = &fled->timeout;181181+ s->min = 1;182182+ s->max = rt->max_timeout;183183+ s->step = 1;184184+ /*185185+ * Set default timeout to RT8515_TIMEOUT_US except if186186+ * max_timeout from DT is lower.187187+ */188188+ s->val = min(rt->max_timeout, RT8515_TIMEOUT_US);189189+}190190+191191+#if IS_ENABLED(CONFIG_V4L2_FLASH_LED_CLASS)192192+/* Configure the V2L2 flash subdevice */193193+static void rt8515_init_v4l2_flash_config(struct rt8515 *rt,194194+ struct v4l2_flash_config *v4l2_sd_cfg)195195+{196196+ struct led_classdev *led = &rt->fled.led_cdev;197197+ struct led_flash_setting *s;198198+199199+ strscpy(v4l2_sd_cfg->dev_name, led->dev->kobj.name,200200+ sizeof(v4l2_sd_cfg->dev_name));201201+202202+ /*203203+ * Init flash intensity setting: this is a linear scale204204+ * capped from the device tree max intensity setting205205+ * 1..flash_max_intensity206206+ */207207+ s = &v4l2_sd_cfg->intensity;208208+ s->min = 1;209209+ s->max = rt->flash_max_intensity;210210+ s->step = 1;211211+ s->val = s->max;212212+}213213+214214+static void rt8515_v4l2_flash_release(struct rt8515 *rt)215215+{216216+ v4l2_flash_release(rt->v4l2_flash);217217+}218218+219219+#else220220+static void rt8515_init_v4l2_flash_config(struct rt8515 *rt,221221+ struct v4l2_flash_config *v4l2_sd_cfg)222222+{223223+}224224+225225+static void rt8515_v4l2_flash_release(struct rt8515 *rt)226226+{227227+}228228+#endif229229+230230+static void rt8515_determine_max_intensity(struct rt8515 *rt,231231+ struct fwnode_handle *led,232232+ const char *resistance,233233+ const char *max_ua_prop, int hw_max,234234+ int *max_intensity_setting)235235+{236236+ u32 res = 0; /* Can't be 0 so 0 is undefined */237237+ u32 ua;238238+ u32 max_ma;239239+ int max_intensity;240240+ int ret;241241+242242+ fwnode_property_read_u32(rt->dev->fwnode, resistance, &res);243243+ ret = fwnode_property_read_u32(led, max_ua_prop, &ua);244244+245245+ /* Missing info in DT, OK go with hardware maxima */246246+ if (ret || res == 0) {247247+ dev_err(rt->dev,248248+ "either %s or %s missing from DT, using HW max\n",249249+ resistance, max_ua_prop);250250+ max_ma = RT8515_MAX_IOUT_MA;251251+ max_intensity = hw_max;252252+ goto out_assign_max;253253+ }254254+255255+ /*256256+ * Formula from the datasheet, this is the maximum current257257+ * defined by the hardware.258258+ */259259+ max_ma = (5500 * 1000) / res;260260+ /*261261+ * Calculate max intensity (linear scaling)262262+ * Formula is ((ua / 1000) / max_ma) * 100, then simplified263263+ */264264+ max_intensity = (ua / 10) / max_ma;265265+266266+ dev_info(rt->dev,267267+ "current restricted from %u to %u mA, max intensity %d/100\n",268268+ max_ma, (ua / 1000), max_intensity);269269+270270+out_assign_max:271271+ dev_info(rt->dev, "max intensity %d/%d = %d mA\n",272272+ max_intensity, hw_max, max_ma);273273+ *max_intensity_setting = max_intensity;274274+}275275+276276+static int rt8515_probe(struct platform_device *pdev)277277+{278278+ struct device *dev = &pdev->dev;279279+ struct fwnode_handle *child;280280+ struct rt8515 *rt;281281+ struct led_classdev *led;282282+ struct led_classdev_flash *fled;283283+ struct led_init_data init_data = {};284284+ struct v4l2_flash_config v4l2_sd_cfg = {};285285+ int ret;286286+287287+ rt = devm_kzalloc(dev, sizeof(*rt), GFP_KERNEL);288288+ if (!rt)289289+ return -ENOMEM;290290+291291+ rt->dev = dev;292292+ fled = &rt->fled;293293+ led = &fled->led_cdev;294294+295295+ /* ENF - Enable Flash line */296296+ rt->enable_flash = devm_gpiod_get(dev, "enf", GPIOD_OUT_LOW);297297+ if (IS_ERR(rt->enable_flash))298298+ return dev_err_probe(dev, PTR_ERR(rt->enable_flash),299299+ "cannot get ENF (enable flash) GPIO\n");300300+301301+ /* ENT - Enable Torch line */302302+ rt->enable_torch = devm_gpiod_get(dev, "ent", GPIOD_OUT_LOW);303303+ if (IS_ERR(rt->enable_torch))304304+ return dev_err_probe(dev, PTR_ERR(rt->enable_torch),305305+ "cannot get ENT (enable torch) GPIO\n");306306+307307+ child = fwnode_get_next_available_child_node(dev->fwnode, NULL);308308+ if (!child) {309309+ dev_err(dev,310310+ "No fwnode child node found for connected LED.\n");311311+ return -EINVAL;312312+ }313313+ init_data.fwnode = child;314314+315315+ rt8515_determine_max_intensity(rt, child, "richtek,rfs-ohms",316316+ "flash-max-microamp",317317+ RT8515_FLASH_MAX,318318+ &rt->flash_max_intensity);319319+ rt8515_determine_max_intensity(rt, child, "richtek,rts-ohms",320320+ "led-max-microamp",321321+ RT8515_TORCH_MAX,322322+ &rt->torch_max_intensity);323323+324324+ ret = fwnode_property_read_u32(child, "flash-max-timeout-us",325325+ &rt->max_timeout);326326+ if (ret) {327327+ rt->max_timeout = RT8515_MAX_TIMEOUT_US;328328+ dev_warn(dev,329329+ "flash-max-timeout-us property missing\n");330330+ }331331+ timer_setup(&rt->powerdown_timer, rt8515_powerdown_timer, 0);332332+ rt8515_init_flash_timeout(rt);333333+334334+ fled->ops = &rt8515_flash_ops;335335+336336+ led->max_brightness = rt->torch_max_intensity;337337+ led->brightness_set_blocking = rt8515_led_brightness_set;338338+ led->flags |= LED_CORE_SUSPENDRESUME | LED_DEV_CAP_FLASH;339339+340340+ mutex_init(&rt->lock);341341+342342+ platform_set_drvdata(pdev, rt);343343+344344+ ret = devm_led_classdev_flash_register_ext(dev, fled, &init_data);345345+ if (ret) {346346+ dev_err(dev, "can't register LED %s\n", led->name);347347+ mutex_destroy(&rt->lock);348348+ return ret;349349+ }350350+351351+ rt8515_init_v4l2_flash_config(rt, &v4l2_sd_cfg);352352+353353+ /* Create a V4L2 Flash device if V4L2 flash is enabled */354354+ rt->v4l2_flash = v4l2_flash_init(dev, child, fled, NULL, &v4l2_sd_cfg);355355+ if (IS_ERR(rt->v4l2_flash)) {356356+ ret = PTR_ERR(rt->v4l2_flash);357357+ dev_err(dev, "failed to register V4L2 flash device (%d)\n",358358+ ret);359359+ /*360360+ * Continue without the V4L2 flash361361+ * (we still have the classdev)362362+ */363363+ }364364+365365+ return 0;366366+}367367+368368+static int rt8515_remove(struct platform_device *pdev)369369+{370370+ struct rt8515 *rt = platform_get_drvdata(pdev);371371+372372+ rt8515_v4l2_flash_release(rt);373373+ del_timer_sync(&rt->powerdown_timer);374374+ mutex_destroy(&rt->lock);375375+376376+ return 0;377377+}378378+379379+static const struct of_device_id rt8515_match[] = {380380+ { .compatible = "richtek,rt8515", },381381+ { /* sentinel */ }382382+};383383+MODULE_DEVICE_TABLE(of, rt8515_match);384384+385385+static struct platform_driver rt8515_driver = {386386+ .driver = {387387+ .name = "rt8515",388388+ .of_match_table = rt8515_match,389389+ },390390+ .probe = rt8515_probe,391391+ .remove = rt8515_remove,392392+};393393+module_platform_driver(rt8515_driver);394394+395395+MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");396396+MODULE_DESCRIPTION("Richtek RT8515 LED driver");397397+MODULE_LICENSE("GPL");
+6-4
drivers/leds/led-triggers.c
···378378 enum led_brightness brightness)379379{380380 struct led_classdev *led_cdev;381381+ unsigned long flags;381382382383 if (!trig)383384 return;384385385385- read_lock(&trig->leddev_list_lock);386386+ read_lock_irqsave(&trig->leddev_list_lock, flags);386387 list_for_each_entry(led_cdev, &trig->led_cdevs, trig_list)387388 led_set_brightness(led_cdev, brightness);388388- read_unlock(&trig->leddev_list_lock);389389+ read_unlock_irqrestore(&trig->leddev_list_lock, flags);389390}390391EXPORT_SYMBOL_GPL(led_trigger_event);391392···397396 int invert)398397{399398 struct led_classdev *led_cdev;399399+ unsigned long flags;400400401401 if (!trig)402402 return;403403404404- read_lock(&trig->leddev_list_lock);404404+ read_lock_irqsave(&trig->leddev_list_lock, flags);405405 list_for_each_entry(led_cdev, &trig->led_cdevs, trig_list) {406406 if (oneshot)407407 led_blink_set_oneshot(led_cdev, delay_on, delay_off,···410408 else411409 led_blink_set(led_cdev, delay_on, delay_off);412410 }413413- read_unlock(&trig->leddev_list_lock);411411+ read_unlock_irqrestore(&trig->leddev_list_lock, flags);414412}415413416414void led_trigger_blink(struct led_trigger *trig,
···203203 unsigned int i;204204205205 pbuf->meas_type |= RKISP1_CIF_ISP_STAT_AUTOEXP;206206- for (i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX; i++)206206+ for (i = 0; i < RKISP1_CIF_ISP_AE_MEAN_MAX_V10; i++)207207 pbuf->params.ae.exp_mean[i] =208208 (u8)rkisp1_read(rkisp1,209209 RKISP1_CIF_ISP_EXP_MEAN_00 + i * 4);···233233 unsigned int i;234234235235 pbuf->meas_type |= RKISP1_CIF_ISP_STAT_HIST;236236- for (i = 0; i < RKISP1_CIF_ISP_HIST_BIN_N_MAX; i++)237237- pbuf->params.hist.hist_bins[i] =238238- (u8)rkisp1_read(rkisp1,239239- RKISP1_CIF_ISP_HIST_BIN_0 + i * 4);236236+ for (i = 0; i < RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10; i++) {237237+ u32 reg_val = rkisp1_read(rkisp1, RKISP1_CIF_ISP_HIST_BIN_0 + i * 4);238238+239239+ pbuf->params.hist.hist_bins[i] = RKISP1_CIF_ISP_HIST_GET_BIN(reg_val);240240+ }240241}241242242243static void rkisp1_stats_get_bls_meas(struct rkisp1_stats *stats,
···298298299299 int excnak_pending; /* We just got an excesive nak interrupt */300300301301+ /* RESET flag handling */302302+ int reset_in_progress;303303+ struct work_struct reset_work;304304+301305 struct {302306 uint16_t sequence; /* sequence number (incs with each packet) */303307 __be16 aborted_seq;···354350355351void arcnet_unregister_proto(struct ArcProto *proto);356352irqreturn_t arcnet_interrupt(int irq, void *dev_id);353353+357354struct net_device *alloc_arcdev(const char *name);355355+void free_arcdev(struct net_device *dev);358356359357int arcnet_open(struct net_device *dev);360358int arcnet_close(struct net_device *dev);
+62-4
drivers/net/arcnet/arcnet.c
···387387 struct arcnet_local *lp = from_timer(lp, t, timer);388388 struct net_device *dev = lp->dev;389389390390- if (!netif_carrier_ok(dev)) {390390+ spin_lock_irq(&lp->lock);391391+392392+ if (!lp->reset_in_progress && !netif_carrier_ok(dev)) {391393 netif_carrier_on(dev);392394 netdev_info(dev, "link up\n");393395 }396396+397397+ spin_unlock_irq(&lp->lock);398398+}399399+400400+static void reset_device_work(struct work_struct *work)401401+{402402+ struct arcnet_local *lp;403403+ struct net_device *dev;404404+405405+ lp = container_of(work, struct arcnet_local, reset_work);406406+ dev = lp->dev;407407+408408+ /* Do not bring the network interface back up if an ifdown409409+ * was already done.410410+ */411411+ if (!netif_running(dev) || !lp->reset_in_progress)412412+ return;413413+414414+ rtnl_lock();415415+416416+ /* Do another check, in case of an ifdown that was triggered in417417+ * the small race window between the exit condition above and418418+ * acquiring RTNL.419419+ */420420+ if (!netif_running(dev) || !lp->reset_in_progress)421421+ goto out;422422+423423+ dev_close(dev);424424+ dev_open(dev, NULL);425425+426426+out:427427+ rtnl_unlock();394428}395429396430static void arcnet_reply_tasklet(unsigned long data)···486452 lp->dev = dev;487453 spin_lock_init(&lp->lock);488454 timer_setup(&lp->timer, arcnet_timer, 0);455455+ INIT_WORK(&lp->reset_work, reset_device_work);489456 }490457491458 return dev;492459}493460EXPORT_SYMBOL(alloc_arcdev);461461+462462+void free_arcdev(struct net_device *dev)463463+{464464+ struct arcnet_local *lp = netdev_priv(dev);465465+466466+ /* Do not cancel this at ->ndo_close(), as the workqueue itself467467+ * indirectly calls the ifdown path through dev_close().468468+ */469469+ cancel_work_sync(&lp->reset_work);470470+ free_netdev(dev);471471+}472472+EXPORT_SYMBOL(free_arcdev);494473495474/* Open/initialize the board. This is called sometime after booting when496475 * the 'ifconfig' program is run.···634587635588 /* shut down the card */636589 lp->hw.close(dev);590590+591591+ /* reset counters */592592+ lp->reset_in_progress = 0;593593+637594 module_put(lp->hw.owner);638595 return 0;639596}···871820872821 spin_lock_irqsave(&lp->lock, flags);873822823823+ if (lp->reset_in_progress)824824+ goto out;825825+874826 /* RESET flag was enabled - if device is not running, we must875827 * clear it right away (but nothing else).876828 */···906852 if (status & RESETflag) {907853 arc_printk(D_NORMAL, dev, "spurious reset (status=%Xh)\n",908854 status);909909- arcnet_close(dev);910910- arcnet_open(dev);855855+856856+ lp->reset_in_progress = 1;857857+ netif_stop_queue(dev);858858+ netif_carrier_off(dev);859859+ schedule_work(&lp->reset_work);911860912861 /* get out of the interrupt handler! */913913- break;862862+ goto out;914863 }915864 /* RX is inhibited - we must have received something.916865 * Prepare to receive into the next buffer.···11091052 udelay(1);11101053 lp->hw.intmask(dev, lp->intmask);1111105410551055+out:11121056 spin_unlock_irqrestore(&lp->lock, flags);11131057 return retval;11141058}
···9898 unsigned int tx_rate; /* Tx bandwidth limit in Mbps */9999 bool link_forced;100100 bool link_up; /* only valid if VF link is forced */101101- bool queues_enabled; /* true if the VF queues are enabled */102101 bool spoofchk;103102 u16 num_vlan;104103
+2-1
drivers/net/ethernet/intel/igc/igc_ethtool.c
···17141714 Asym_Pause);17151715 }1716171617171717- status = rd32(IGC_STATUS);17171717+ status = pm_runtime_suspended(&adapter->pdev->dev) ?17181718+ 0 : rd32(IGC_STATUS);1718171917191720 if (status & IGC_STATUS_LU) {17201721 if (status & IGC_STATUS_SPEED_1000) {
+1-2
drivers/net/ethernet/intel/igc/igc_i225.c
···219219 u16 *data)220220{221221 struct igc_nvm_info *nvm = &hw->nvm;222222+ s32 ret_val = -IGC_ERR_NVM;222223 u32 attempts = 100000;223224 u32 i, k, eewr = 0;224224- s32 ret_val = 0;225225226226 /* A check for invalid values: offset too large, too many words,227227 * too many words for the offset, and not enough words.···229229 if (offset >= nvm->word_size || (words > (nvm->word_size - offset)) ||230230 words == 0) {231231 hw_dbg("nvm parameter(s) out of bounds\n");232232- ret_val = -IGC_ERR_NVM;233232 goto out;234233 }235234
···162162 mask = DMA_BIT_MASK(ilog2(end) + 1);163163 dev->coherent_dma_mask &= mask;164164 *dev->dma_mask &= mask;165165- /* ...but only set bus limit if we found valid dma-ranges earlier */166166- if (!ret)165165+ /* ...but only set bus limit and range map if we found valid dma-ranges earlier */166166+ if (!ret) {167167 dev->bus_dma_limit = end;168168+ dev->dma_range_map = map;169169+ }168170169171 coherent = of_dma_is_coherent(np);170172 dev_dbg(dev, "device is%sdma coherent\n",···174172175173 iommu = of_iommu_configure(dev, np, id);176174 if (PTR_ERR(iommu) == -EPROBE_DEFER) {175175+ /* Don't touch range map if it wasn't set from a valid dma-ranges */176176+ if (!ret)177177+ dev->dma_range_map = NULL;177178 kfree(map);178179 return -EPROBE_DEFER;179180 }···186181187182 arch_setup_dma_ops(dev, dma_start, size, iommu, coherent);188183189189- dev->dma_range_map = map;190184 return 0;191185}192186EXPORT_SYMBOL_GPL(of_dma_configure_id);
+8
drivers/rtc/rtc-cmos.c
···805805806806 spin_lock_irq(&rtc_lock);807807808808+ /* Ensure that the RTC is accessible. Bit 0-6 must be 0! */809809+ if ((CMOS_READ(RTC_VALID) & 0x7f) != 0) {810810+ spin_unlock_irq(&rtc_lock);811811+ dev_warn(dev, "not accessible\n");812812+ retval = -ENXIO;813813+ goto cleanup1;814814+ }815815+808816 if (!(flags & CMOS_RTC_FLAGS_NOFREQ)) {809817 /* force periodic irq to CMOS reset default of 1024Hz;810818 *
+7
drivers/rtc/rtc-mc146818-lib.c
···21212222again:2323 spin_lock_irqsave(&rtc_lock, flags);2424+ /* Ensure that the RTC is accessible. Bit 0-6 must be 0! */2525+ if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x7f) != 0)) {2626+ spin_unlock_irqrestore(&rtc_lock, flags);2727+ memset(time, 0xff, sizeof(*time));2828+ return 0;2929+ }3030+2431 /*2532 * Check whether there is an update in progress during which the2633 * readout is unspecified. The maximum update time is ~2ms. Poll
+14-6
drivers/s390/block/dasd_devmap.c
···18741874}18751875EXPORT_SYMBOL(dasd_path_create_kobjects);1876187618771877-/*18781878- * As we keep kobjects for the lifetime of a device, this function must not be18791879- * called anywhere but in the context of offlining a device.18801880- */18811881-void dasd_path_remove_kobj(struct dasd_device *device, int chp)18771877+static void dasd_path_remove_kobj(struct dasd_device *device, int chp)18821878{18831879 if (device->path[chp].in_sysfs) {18841880 kobject_put(&device->path[chp].kobj);18851881 device->path[chp].in_sysfs = false;18861882 }18871883}18881888-EXPORT_SYMBOL(dasd_path_remove_kobj);18841884+18851885+/*18861886+ * As we keep kobjects for the lifetime of a device, this function must not be18871887+ * called anywhere but in the context of offlining a device.18881888+ */18891889+void dasd_path_remove_kobjects(struct dasd_device *device)18901890+{18911891+ int i;18921892+18931893+ for (i = 0; i < 8; i++)18941894+ dasd_path_remove_kobj(device, i);18951895+}18961896+EXPORT_SYMBOL(dasd_path_remove_kobjects);1889189718901898int dasd_add_sysfs_files(struct ccw_device *cdev)18911899{
···88config LITEX_SOC_CONTROLLER99 tristate "Enable LiteX SoC Controller driver"1010 depends on OF || COMPILE_TEST1111+ depends on HAS_IOMEM1112 select LITEX1213 help1314 This option enables the SoC Controller Driver which verifies
+2-2
drivers/staging/rtl8723bs/os_dep/sdio_intf.c
···339339340340 padapter = rtw_netdev_priv(pnetdev);341341342342- rtw_wdev_alloc(padapter, dvobj_to_dev(dvobj));343343-344342 /* 3 3. init driver special setting, interface, OS and hardware relative */345343346344 /* 4 3.1 set hardware operation functions */···375377 ("rtw_drv_init: Initialize driver software resource Failed!\n"));376378 goto free_hal_data;377379 }380380+381381+ rtw_wdev_alloc(padapter, dvobj_to_dev(dvobj));378382379383 /* 3 8. get WLan MAC address */380384 /* set mac addr */
+1-1
drivers/target/iscsi/iscsi_target_login.c
···896896 else897897 len = sizeof(struct sockaddr_in);898898 /*899899- * Set SO_REUSEADDR, and disable Nagel Algorithm with TCP_NODELAY.899899+ * Set SO_REUSEADDR, and disable Nagle Algorithm with TCP_NODELAY.900900 */901901 if (np->np_network_transport == ISCSI_TCP)902902 tcp_sock_set_nodelay(sock->sk);
+17-3
drivers/tty/tty_io.c
···10261026 * write method will not be invoked in parallel for each device.10271027 */1028102810291029-static ssize_t tty_write(struct kiocb *iocb, struct iov_iter *from)10291029+static ssize_t file_tty_write(struct file *file, struct kiocb *iocb, struct iov_iter *from)10301030{10311031- struct file *file = iocb->ki_filp;10321031 struct tty_struct *tty = file_tty(file);10331032 struct tty_ldisc *ld;10341033 ssize_t ret;···10501051 return ret;10511052}1052105310541054+static ssize_t tty_write(struct kiocb *iocb, struct iov_iter *from)10551055+{10561056+ return file_tty_write(iocb->ki_filp, iocb, from);10571057+}10581058+10531059ssize_t redirected_tty_write(struct kiocb *iocb, struct iov_iter *iter)10541060{10551061 struct file *p = NULL;···10641060 p = get_file(redirect);10651061 spin_unlock(&redirect_lock);1066106210631063+ /*10641064+ * We know the redirected tty is just another tty, we can can10651065+ * call file_tty_write() directly with that file pointer.10661066+ */10671067 if (p) {10681068 ssize_t res;10691069- res = vfs_iocb_iter_write(p, iocb, iter);10691069+ res = file_tty_write(p, iocb, iter);10701070 fput(p);10711071 return res;10721072 }···23162308 fput(f);23172309 return 0;23182310 }23112311+ if (file->f_op->write_iter != tty_write)23122312+ return -ENOTTY;23132313+ if (!(file->f_mode & FMODE_WRITE))23142314+ return -EBADF;23152315+ if (!(file->f_mode & FMODE_CAN_WRITE))23162316+ return -EINVAL;23192317 spin_lock(&redirect_lock);23202318 if (redirect) {23212319 spin_unlock(&redirect_lock);
+1
drivers/vdpa/mlx5/core/mlx5_vdpa.h
···1515 struct sg_table sg_head;1616 int log_size;1717 int nsg;1818+ int nent;1819 struct list_head list;1920 u64 offset;2021};
···193193 goto error_cache;194194#endif195195196196- ret = register_pernet_subsys(&afs_net_ops);196196+ ret = register_pernet_device(&afs_net_ops);197197 if (ret < 0)198198 goto error_net;199199···213213error_proc:214214 afs_fs_exit();215215error_fs:216216- unregister_pernet_subsys(&afs_net_ops);216216+ unregister_pernet_device(&afs_net_ops);217217error_net:218218#ifdef CONFIG_AFS_FSCACHE219219 fscache_unregister_netfs(&afs_cache_netfs);···244244245245 proc_remove(afs_proc_symlink);246246 afs_fs_exit();247247- unregister_pernet_subsys(&afs_net_ops);247247+ unregister_pernet_device(&afs_net_ops);248248#ifdef CONFIG_AFS_FSCACHE249249 fscache_unregister_netfs(&afs_cache_netfs);250250#endif
+9-1
fs/block_dev.c
···130130131131static void set_init_blocksize(struct block_device *bdev)132132{133133- bdev->bd_inode->i_blkbits = blksize_bits(bdev_logical_block_size(bdev));133133+ unsigned int bsize = bdev_logical_block_size(bdev);134134+ loff_t size = i_size_read(bdev->bd_inode);135135+136136+ while (bsize < PAGE_SIZE) {137137+ if (size & bsize)138138+ break;139139+ bsize <<= 1;140140+ }141141+ bdev->bd_inode->i_blkbits = blksize_bits(bsize);134142}135143136144int set_blocksize(struct block_device *bdev, int size)
+9-1
fs/btrfs/block-group.c
···673673 wake_up(&caching_ctl->wait);674674 }675675676676- if (btrfs_fs_compat_ro(fs_info, FREE_SPACE_TREE))676676+ /*677677+ * If we are in the transaction that populated the free space tree we678678+ * can't actually cache from the free space tree as our commit root and679679+ * real root are the same, so we could change the contents of the blocks680680+ * while caching. Instead do the slow caching in this case, and after681681+ * the transaction has committed we will be safe.682682+ */683683+ if (btrfs_fs_compat_ro(fs_info, FREE_SPACE_TREE) &&684684+ !(test_bit(BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED, &fs_info->flags)))677685 ret = load_free_space_tree(caching_ctl);678686 else679687 ret = load_extent_tree_free(caching_ctl);
+3
fs/btrfs/ctree.h
···563563564564 /* Indicate that we need to cleanup space cache v1 */565565 BTRFS_FS_CLEANUP_SPACE_CACHE_V1,566566+567567+ /* Indicate that we can't trust the free space tree for caching yet */568568+ BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED,566569};567570568571/*
+18-43
fs/btrfs/extent-tree.c
···26022602 struct btrfs_block_group *cache;26032603 int ret;2604260426052605- btrfs_add_excluded_extent(trans->fs_info, bytenr, num_bytes);26062606-26072605 cache = btrfs_lookup_block_group(trans->fs_info, bytenr);26082606 if (!cache)26092607 return -EINVAL;···26132615 * the pinned extents.26142616 */26152617 btrfs_cache_block_group(cache, 1);26182618+ /*26192619+ * Make sure we wait until the cache is completely built in case it is26202620+ * missing or is invalid and therefore needs to be rebuilt.26212621+ */26222622+ ret = btrfs_wait_block_group_cache_done(cache);26232623+ if (ret)26242624+ goto out;2616262526172626 pin_down_extent(trans, cache, bytenr, num_bytes, 0);2618262726192628 /* remove us from the free space cache (if we're there at all) */26202629 ret = btrfs_remove_free_space(cache, bytenr, num_bytes);26302630+out:26212631 btrfs_put_block_group(cache);26222632 return ret;26232633}···26352629{26362630 int ret;26372631 struct btrfs_block_group *block_group;26382638- struct btrfs_caching_control *caching_ctl;2639263226402633 block_group = btrfs_lookup_block_group(fs_info, start);26412634 if (!block_group)26422635 return -EINVAL;2643263626442644- btrfs_cache_block_group(block_group, 0);26452645- caching_ctl = btrfs_get_caching_control(block_group);26372637+ btrfs_cache_block_group(block_group, 1);26382638+ /*26392639+ * Make sure we wait until the cache is completely built in case it is26402640+ * missing or is invalid and therefore needs to be rebuilt.26412641+ */26422642+ ret = btrfs_wait_block_group_cache_done(block_group);26432643+ if (ret)26442644+ goto out;2646264526472647- if (!caching_ctl) {26482648- /* Logic error */26492649- BUG_ON(!btrfs_block_group_done(block_group));26502650- ret = btrfs_remove_free_space(block_group, start, num_bytes);26512651- } else {26522652- /*26532653- * We must wait for v1 caching to finish, otherwise we may not26542654- * remove our space.26552655- */26562656- btrfs_wait_space_cache_v1_finished(block_group, caching_ctl);26572657- mutex_lock(&caching_ctl->mutex);26582658-26592659- if (start >= caching_ctl->progress) {26602660- ret = btrfs_add_excluded_extent(fs_info, start,26612661- num_bytes);26622662- } else if (start + num_bytes <= caching_ctl->progress) {26632663- ret = btrfs_remove_free_space(block_group,26642664- start, num_bytes);26652665- } else {26662666- num_bytes = caching_ctl->progress - start;26672667- ret = btrfs_remove_free_space(block_group,26682668- start, num_bytes);26692669- if (ret)26702670- goto out_lock;26712671-26722672- num_bytes = (start + num_bytes) -26732673- caching_ctl->progress;26742674- start = caching_ctl->progress;26752675- ret = btrfs_add_excluded_extent(fs_info, start,26762676- num_bytes);26772677- }26782678-out_lock:26792679- mutex_unlock(&caching_ctl->mutex);26802680- btrfs_put_caching_control(caching_ctl);26812681- }26462646+ ret = btrfs_remove_free_space(block_group, start, num_bytes);26472647+out:26822648 btrfs_put_block_group(block_group);26832649 return ret;26842650}···28412863 mutex_unlock(&fs_info->unused_bg_unpin_mutex);28422864 break;28432865 }28442844- if (test_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags))28452845- clear_extent_bits(&fs_info->excluded_extents, start,28462846- end, EXTENT_UPTODATE);2847286628482867 if (btrfs_test_opt(fs_info, DISCARD_SYNC))28492868 ret = btrfs_discard_extent(fs_info, start,
+9-1
fs/btrfs/free-space-tree.c
···11501150 return PTR_ERR(trans);1151115111521152 set_bit(BTRFS_FS_CREATING_FREE_SPACE_TREE, &fs_info->flags);11531153+ set_bit(BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED, &fs_info->flags);11531154 free_space_root = btrfs_create_tree(trans,11541155 BTRFS_FREE_SPACE_TREE_OBJECTID);11551156 if (IS_ERR(free_space_root)) {···11721171 btrfs_set_fs_compat_ro(fs_info, FREE_SPACE_TREE);11731172 btrfs_set_fs_compat_ro(fs_info, FREE_SPACE_TREE_VALID);11741173 clear_bit(BTRFS_FS_CREATING_FREE_SPACE_TREE, &fs_info->flags);11741174+ ret = btrfs_commit_transaction(trans);1175117511761176- return btrfs_commit_transaction(trans);11761176+ /*11771177+ * Now that we've committed the transaction any reading of our commit11781178+ * root will be safe, so we can cache from the free space tree now.11791179+ */11801180+ clear_bit(BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED, &fs_info->flags);11811181+ return ret;1177118211781183abort:11791184 clear_bit(BTRFS_FS_CREATING_FREE_SPACE_TREE, &fs_info->flags);11851185+ clear_bit(BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED, &fs_info->flags);11801186 btrfs_abort_transaction(trans, ret);11811187 btrfs_end_transaction(trans);11821188 return ret;
···10261026 const struct iovec *fast_iov,10271027 struct iov_iter *iter, bool force);10281028static void io_req_drop_files(struct io_kiocb *req);10291029+static void io_req_task_queue(struct io_kiocb *req);1029103010301031static struct kmem_cache *req_cachep;10311032···10701069{10711070 struct io_kiocb *req;1072107110731073- if (task && head->task != task)10721072+ if (task && head->task != task) {10731073+ /* in terms of cancelation, always match if req task is dead */10741074+ if (head->task->flags & PF_EXITING)10751075+ return true;10741076 return false;10771077+ }10751078 if (!files)10761079 return true;10771080···16351630 do {16361631 struct io_defer_entry *de = list_first_entry(&ctx->defer_list,16371632 struct io_defer_entry, list);16381638- struct io_kiocb *link;1639163316401634 if (req_need_defer(de->req, de->seq))16411635 break;16421636 list_del_init(&de->list);16431643- /* punt-init is done before queueing for defer */16441644- link = __io_queue_async_work(de->req);16451645- if (link) {16461646- __io_queue_linked_timeout(link);16471647- /* drop submission reference */16481648- io_put_req_deferred(link, 1);16491649- }16371637+ io_req_task_queue(de->req);16501638 kfree(de);16511639 } while (!list_empty(&ctx->defer_list));16521640}···17731775 struct io_kiocb *req, *tmp;17741776 struct io_uring_cqe *cqe;17751777 unsigned long flags;17761776- bool all_flushed;17781778+ bool all_flushed, posted;17771779 LIST_HEAD(list);1778178017791781 if (!force && __io_cqring_events(ctx) == rings->cq_ring_entries)17801782 return false;1781178317841784+ posted = false;17821785 spin_lock_irqsave(&ctx->completion_lock, flags);17831786 list_for_each_entry_safe(req, tmp, &ctx->cq_overflow_list, compl.list) {17841787 if (!io_match_task(req, tsk, files))···17991800 WRITE_ONCE(ctx->rings->cq_overflow,18001801 ctx->cached_cq_overflow);18011802 }18031803+ posted = true;18021804 }1803180518041806 all_flushed = list_empty(&ctx->cq_overflow_list);···18091809 ctx->rings->sq_flags &= ~IORING_SQ_CQ_OVERFLOW;18101810 }1811181118121812- io_commit_cqring(ctx);18121812+ if (posted)18131813+ io_commit_cqring(ctx);18131814 spin_unlock_irqrestore(&ctx->completion_lock, flags);18141814- io_cqring_ev_posted(ctx);18151815+ if (posted)18161816+ io_cqring_ev_posted(ctx);1815181718161818 while (!list_empty(&list)) {18171819 req = list_first_entry(&list, struct io_kiocb, compl.list);···64606458 file = __io_file_get(state, fd);64616459 }6462646064636463- if (file && file->f_op == &io_uring_fops) {64616461+ if (file && file->f_op == &io_uring_fops &&64626462+ !(req->flags & REQ_F_INFLIGHT)) {64646463 io_req_init_async(req);64656464 req->flags |= REQ_F_INFLIGHT;64666465···72697266 TASK_INTERRUPTIBLE);72707267 /* make sure we run task_work before checking for signals */72717268 ret = io_run_task_work_sig();72727272- if (ret > 0)72697269+ if (ret > 0) {72707270+ finish_wait(&ctx->wait, &iowq.wq);72737271 continue;72727272+ }72747273 else if (ret < 0)72757274 break;72767275 if (io_should_wake(&iowq))72777276 break;72787278- if (test_bit(0, &ctx->cq_check_overflow))72777277+ if (test_bit(0, &ctx->cq_check_overflow)) {72787278+ finish_wait(&ctx->wait, &iowq.wq);72797279 continue;72807280+ }72807281 if (uts) {72817282 timeout = schedule_timeout(timeout);72827283 if (timeout == 0) {···88728865 }88738866}8874886788688868+static int io_uring_count_inflight(struct io_ring_ctx *ctx,88698869+ struct task_struct *task,88708870+ struct files_struct *files)88718871+{88728872+ struct io_kiocb *req;88738873+ int cnt = 0;88748874+88758875+ spin_lock_irq(&ctx->inflight_lock);88768876+ list_for_each_entry(req, &ctx->inflight_list, inflight_entry)88778877+ cnt += io_match_task(req, task, files);88788878+ spin_unlock_irq(&ctx->inflight_lock);88798879+ return cnt;88808880+}88818881+88758882static void io_uring_cancel_files(struct io_ring_ctx *ctx,88768883 struct task_struct *task,88778884 struct files_struct *files)88788885{88798886 while (!list_empty_careful(&ctx->inflight_list)) {88808887 struct io_task_cancel cancel = { .task = task, .files = files };88818881- struct io_kiocb *req;88828888 DEFINE_WAIT(wait);88838883- bool found = false;88898889+ int inflight;8884889088858885- spin_lock_irq(&ctx->inflight_lock);88868886- list_for_each_entry(req, &ctx->inflight_list, inflight_entry) {88878887- if (!io_match_task(req, task, files))88888888- continue;88898889- found = true;88908890- break;88918891- }88928892- if (found)88938893- prepare_to_wait(&task->io_uring->wait, &wait,88948894- TASK_UNINTERRUPTIBLE);88958895- spin_unlock_irq(&ctx->inflight_lock);88968896-88978897- /* We need to keep going until we don't find a matching req */88988898- if (!found)88918891+ inflight = io_uring_count_inflight(ctx, task, files);88928892+ if (!inflight)88998893 break;8900889489018895 io_wq_cancel_cb(ctx->io_wq, io_cancel_task_cb, &cancel, true);···89058897 io_cqring_overflow_flush(ctx, true, task, files);89068898 /* cancellations _may_ trigger task work */89078899 io_run_task_work();89088908- schedule();89008900+89018901+ prepare_to_wait(&task->io_uring->wait, &wait,89028902+ TASK_UNINTERRUPTIBLE);89038903+ if (inflight == io_uring_count_inflight(ctx, task, files))89048904+ schedule();89098905 finish_wait(&task->io_uring->wait, &wait);89108906 }89118907}···89678955 struct task_struct *task = current;8968895689698957 if ((ctx->flags & IORING_SETUP_SQPOLL) && ctx->sq_data) {89708970- /* for SQPOLL only sqo_task has task notes */89718971- WARN_ON_ONCE(ctx->sqo_task != current);89728958 io_disable_sqo_submit(ctx);89738959 task = ctx->sq_data->thread;89748960 atomic_inc(&task->io_uring->in_idle);···89768966 io_cancel_defer_files(ctx, task, files);89778967 io_cqring_overflow_flush(ctx, true, task, files);8978896889698969+ io_uring_cancel_files(ctx, task, files);89798970 if (!files)89808971 __io_uring_cancel_task_requests(ctx, task);89818981- else89828982- io_uring_cancel_files(ctx, task, files);8983897289848973 if ((ctx->flags & IORING_SETUP_SQPOLL) && ctx->sq_data) {89858974 atomic_dec(&task->io_uring->in_idle);···91259116 prepare_to_wait(&tctx->wait, &wait, TASK_UNINTERRUPTIBLE);9126911791279118 /*91289128- * If we've seen completions, retry. This avoids a race where91299129- * a completion comes in before we did prepare_to_wait().91199119+ * If we've seen completions, retry without waiting. This91209120+ * avoids a race where a completion comes in before we did91219121+ * prepare_to_wait().91309122 */91319131- if (inflight != tctx_inflight(tctx))91329132- continue;91339133- schedule();91239123+ if (inflight == tctx_inflight(tctx))91249124+ schedule();91349125 finish_wait(&tctx->wait, &wait);91359126 } while (1);9136912791379137- finish_wait(&tctx->wait, &wait);91389128 atomic_dec(&tctx->in_idle);9139912991409130 io_uring_remove_task_files(tctx);···91439135{91449136 struct io_uring_task *tctx = current->io_uring;91459137 struct io_ring_ctx *ctx = file->private_data;91389138+91399139+ if (fatal_signal_pending(current) || (current->flags & PF_EXITING))91409140+ io_uring_cancel_task_requests(ctx, NULL);9146914191479142 if (!tctx)91489143 return 0;
+44-25
fs/nfs/pnfs.c
···324324 return NULL;325325}326326327327+/*328328+ * Compare 2 layout stateid sequence ids, to see which is newer,329329+ * taking into account wraparound issues.330330+ */331331+static bool pnfs_seqid_is_newer(u32 s1, u32 s2)332332+{333333+ return (s32)(s1 - s2) > 0;334334+}335335+336336+static void pnfs_barrier_update(struct pnfs_layout_hdr *lo, u32 newseq)337337+{338338+ if (pnfs_seqid_is_newer(newseq, lo->plh_barrier))339339+ lo->plh_barrier = newseq;340340+}341341+327342static void328343pnfs_set_plh_return_info(struct pnfs_layout_hdr *lo, enum pnfs_iomode iomode,329344 u32 seq)···350335 if (seq != 0) {351336 WARN_ON_ONCE(lo->plh_return_seq != 0 && lo->plh_return_seq != seq);352337 lo->plh_return_seq = seq;338338+ pnfs_barrier_update(lo, seq);353339 }354340}355341···653637 rv = 1;654638 }655639 return rv;656656-}657657-658658-/*659659- * Compare 2 layout stateid sequence ids, to see which is newer,660660- * taking into account wraparound issues.661661- */662662-static bool pnfs_seqid_is_newer(u32 s1, u32 s2)663663-{664664- return (s32)(s1 - s2) > 0;665640}666641667642static bool···991984 new_barrier = be32_to_cpu(new->seqid);992985 else if (new_barrier == 0)993986 return;994994- if (pnfs_seqid_is_newer(new_barrier, lo->plh_barrier))995995- lo->plh_barrier = new_barrier;987987+ pnfs_barrier_update(lo, new_barrier);996988}997989998990static bool···1000994{1001995 u32 seqid = be32_to_cpu(stateid->seqid);100299610031003- return !pnfs_seqid_is_newer(seqid, lo->plh_barrier);997997+ return !pnfs_seqid_is_newer(seqid, lo->plh_barrier) && lo->plh_barrier;1004998}100599910061000/* lget is set to 1 if called from inside send_layoutget call chain */···11891183 return false;11901184 set_bit(NFS_LAYOUT_RETURN, &lo->plh_flags);11911185 pnfs_get_layout_hdr(lo);11861186+ nfs4_stateid_copy(stateid, &lo->plh_stateid);11871187+ *cred = get_cred(lo->plh_lc_cred);11921188 if (test_bit(NFS_LAYOUT_RETURN_REQUESTED, &lo->plh_flags)) {11931193- nfs4_stateid_copy(stateid, &lo->plh_stateid);11941194- *cred = get_cred(lo->plh_lc_cred);11951189 if (lo->plh_return_seq != 0)11961190 stateid->seqid = cpu_to_be32(lo->plh_return_seq);11971191 if (iomode != NULL)11981192 *iomode = lo->plh_return_iomode;11991193 pnfs_clear_layoutreturn_info(lo);12001200- return true;12011201- }12021202- nfs4_stateid_copy(stateid, &lo->plh_stateid);12031203- *cred = get_cred(lo->plh_lc_cred);12041204- if (iomode != NULL)11941194+ } else if (iomode != NULL)12051195 *iomode = IOMODE_ANY;11961196+ pnfs_barrier_update(lo, be32_to_cpu(stateid->seqid));12061197 return true;12071198}12081199···19121909 wake_up_var(&lo->plh_outstanding);19131910}1914191119121912+static bool pnfs_is_first_layoutget(struct pnfs_layout_hdr *lo)19131913+{19141914+ return test_bit(NFS_LAYOUT_FIRST_LAYOUTGET, &lo->plh_flags);19151915+}19161916+19151917static void pnfs_clear_first_layoutget(struct pnfs_layout_hdr *lo)19161918{19171919 unsigned long *bitlock = &lo->plh_flags;···23912383 goto out_forget;23922384 }2393238523942394- if (!pnfs_layout_is_valid(lo)) {23952395- /* We have a completely new layout */23962396- pnfs_set_layout_stateid(lo, &res->stateid, lgp->cred, true);23972397- } else if (nfs4_stateid_match_other(&lo->plh_stateid, &res->stateid)) {23862386+ if (nfs4_stateid_match_other(&lo->plh_stateid, &res->stateid)) {23982387 /* existing state ID, make sure the sequence number matches. */23992388 if (pnfs_layout_stateid_blocked(lo, &res->stateid)) {23892389+ if (!pnfs_layout_is_valid(lo) &&23902390+ pnfs_is_first_layoutget(lo))23912391+ lo->plh_barrier = 0;24002392 dprintk("%s forget reply due to sequence\n", __func__);24012393 goto out_forget;24022394 }24032395 pnfs_set_layout_stateid(lo, &res->stateid, lgp->cred, false);24042404- } else {23962396+ } else if (pnfs_layout_is_valid(lo)) {24052397 /*24062398 * We got an entirely new state ID. Mark all segments for the24072399 * inode invalid, and retry the layoutget24082400 */24092409- pnfs_mark_layout_stateid_invalid(lo, &free_me);24012401+ struct pnfs_layout_range range = {24022402+ .iomode = IOMODE_ANY,24032403+ .length = NFS4_MAX_UINT64,24042404+ };24052405+ pnfs_set_plh_return_info(lo, IOMODE_ANY, 0);24062406+ pnfs_mark_matching_lsegs_return(lo, &lo->plh_return_segs,24072407+ &range, 0);24102408 goto out_forget;24092409+ } else {24102410+ /* We have a completely new layout */24112411+ if (!pnfs_is_first_layoutget(lo))24122412+ goto out_forget;24132413+ pnfs_set_layout_stateid(lo, &res->stateid, lgp->cred, true);24112414 }2412241524132416 pnfs_get_lseg(lseg);
+5
include/linux/linkage.h
···178178 * Objtool generates debug info for both FUNC & CODE, but needs special179179 * annotations for each CODE's start (to describe the actual stack frame).180180 *181181+ * Objtool requires that all code must be contained in an ELF symbol. Symbol182182+ * names that have a .L prefix do not emit symbol table entries. .L183183+ * prefixed symbols can be used within a code region, but should be avoided for184184+ * denoting a range of code via ``SYM_*_START/END`` annotations.185185+ *181186 * ALIAS -- does not generate debug info -- the aliased function will182187 */183188
+1-2
include/linux/sunrpc/xdr.h
···2525#define XDR_QUADLEN(l) (((l) + 3) >> 2)26262727/*2828- * Generic opaque `network object.' At the kernel level, this type2929- * is used only by lockd.2828+ * Generic opaque `network object.'3029 */3130#define XDR_MAX_NETOBJ 10243231struct xdr_netobj {
···4949#define RKISP1_CIF_ISP_CTK_COEFF_MAX 0x1005050#define RKISP1_CIF_ISP_CTK_OFFSET_MAX 0x80051515252-#define RKISP1_CIF_ISP_AE_MEAN_MAX 255353-#define RKISP1_CIF_ISP_HIST_BIN_N_MAX 165252+#define RKISP1_CIF_ISP_AE_MEAN_MAX_V10 255353+#define RKISP1_CIF_ISP_AE_MEAN_MAX_V12 815454+#define RKISP1_CIF_ISP_AE_MEAN_MAX RKISP1_CIF_ISP_AE_MEAN_MAX_V125555+5656+#define RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 165757+#define RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 325858+#define RKISP1_CIF_ISP_HIST_BIN_N_MAX RKISP1_CIF_ISP_HIST_BIN_N_MAX_V125959+5460#define RKISP1_CIF_ISP_AFM_MAX_WINDOWS 35561#define RKISP1_CIF_ISP_DEGAMMA_CURVE_SIZE 175662···9286 * Gamma out9387 */9488/* Maximum number of color samples supported */9595-#define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES 178989+#define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10 179090+#define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 349191+#define RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V1296929793/*9894 * Lens shade correction···110102/*111103 * Histogram calculation112104 */113113-/* Last 3 values unused. */114114-#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE 28105105+#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10 25106106+#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 81107107+#define RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12115108116109/*117110 * Defect Pixel Cluster Correction···132123#define RKISP1_CIF_ISP_STAT_AUTOEXP (1U << 1)133124#define RKISP1_CIF_ISP_STAT_AFM (1U << 2)134125#define RKISP1_CIF_ISP_STAT_HIST (1U << 3)126126+127127+/**128128+ * enum rkisp1_cif_isp_version - ISP variants129129+ *130130+ * @RKISP1_V10: used at least in rk3288 and rk3399131131+ * @RKISP1_V11: declared in the original vendor code, but not used132132+ * @RKISP1_V12: used at least in rk3326 and px30133133+ * @RKISP1_V13: used at least in rk1808134134+ */135135+enum rkisp1_cif_isp_version {136136+ RKISP1_V10 = 10,137137+ RKISP1_V11,138138+ RKISP1_V12,139139+ RKISP1_V13,140140+};135141136142enum rkisp1_cif_isp_histogram_mode {137143 RKISP1_CIF_ISP_HISTOGRAM_MODE_DISABLE,···534510 *535511 * @mode: goc mode (from enum rkisp1_cif_isp_goc_mode)536512 * @gamma_y: gamma out curve y-axis for all color components513513+ *514514+ * The number of entries of @gamma_y depends on the hardware revision515515+ * as is reported by the hw_revision field of the struct media_device_info516516+ * that is returned by ioctl MEDIA_IOC_DEVICE_INFO.517517+ *518518+ * Versions <= V11 have RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10519519+ * entries, versions >= V12 have RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12520520+ * entries. RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES is equal to the maximum521521+ * of the two.537522 */538523struct rkisp1_cif_isp_goc_config {539524 __u32 mode;···557524 * skipped558525 * @meas_window: coordinates of the measure window559526 * @hist_weight: weighting factor for sub-windows527527+ *528528+ * The number of entries of @hist_weight depends on the hardware revision529529+ * as is reported by the hw_revision field of the struct media_device_info530530+ * that is returned by ioctl MEDIA_IOC_DEVICE_INFO.531531+ *532532+ * Versions <= V11 have RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10533533+ * entries, versions >= V12 have RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12534534+ * entries. RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE is equal to the maximum535535+ * of the two.560536 */561537struct rkisp1_cif_isp_hst_config {562538 __u32 mode;···853811 * @exp_mean: Mean luminance value of block xx854812 * @bls_val: BLS measured values855813 *856856- * Image is divided into 5x5 blocks.814814+ * The number of entries of @exp_mean depends on the hardware revision815815+ * as is reported by the hw_revision field of the struct media_device_info816816+ * that is returned by ioctl MEDIA_IOC_DEVICE_INFO.817817+ *818818+ * Versions <= V11 have RKISP1_CIF_ISP_AE_MEAN_MAX_V10 entries,819819+ * versions >= V12 have RKISP1_CIF_ISP_AE_MEAN_MAX_V12 entries.820820+ * RKISP1_CIF_ISP_AE_MEAN_MAX is equal to the maximum of the two.821821+ *822822+ * Image is divided into 5x5 blocks on V10 and 9x9 blocks on V12.857823 */858824struct rkisp1_cif_isp_ae_stat {859825 __u8 exp_mean[RKISP1_CIF_ISP_AE_MEAN_MAX];···894844/**895845 * struct rkisp1_cif_isp_hist_stat - statistics histogram data896846 *897897- * @hist_bins: measured bin counters847847+ * @hist_bins: measured bin counters. Each bin is a 20 bits unsigned fixed point848848+ * type. Bits 0-4 are the fractional part and bits 5-19 are the849849+ * integer part.898850 *899899- * Measurement window divided into 25 sub-windows, set900900- * with ISP_HIST_XXX851851+ * The window of the measurements area is divided to 5x5 sub-windows for852852+ * V10/V11 and to 9x9 sub-windows for V12. The histogram is then computed for853853+ * each sub-window independently and the final result is a weighted average of854854+ * the histogram measurements on all sub-windows. The window of the855855+ * measurements area and the weight of each sub-window are configurable using856856+ * struct @rkisp1_cif_isp_hst_config.857857+ *858858+ * The histogram contains 16 bins in V10/V11 and 32 bins in V12/V13.859859+ *860860+ * The number of entries of @hist_bins depends on the hardware revision861861+ * as is reported by the hw_revision field of the struct media_device_info862862+ * that is returned by ioctl MEDIA_IOC_DEVICE_INFO.863863+ *864864+ * Versions <= V11 have RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 entries,865865+ * versions >= V12 have RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 entries.866866+ * RKISP1_CIF_ISP_HIST_BIN_N_MAX is equal to the maximum of the two.901867 */902868struct rkisp1_cif_isp_hist_stat {903903- __u16 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX];869869+ __u32 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX];904870};905871906872/**
+5-1
kernel/bpf/bpf_inode_storage.c
···125125126126 fd = *(int *)key;127127 f = fget_raw(fd);128128- if (!f || !inode_storage_ptr(f->f_inode))128128+ if (!f)129129 return -EBADF;130130+ if (!inode_storage_ptr(f->f_inode)) {131131+ fput(f);132132+ return -EBADF;133133+ }130134131135 sdata = bpf_local_storage_update(f->f_inode,132136 (struct bpf_local_storage_map *)map,
···44LIBBPF_A = $(obj)/libbpf.a55LIBBPF_OUT = $(abspath $(obj))6677+# Although not in use by libbpf's Makefile, set $(O) so that the "dummy" test88+# in tools/scripts/Makefile.include always succeeds when building the kernel99+# with $(O) pointing to a relative path, as in "make O=build bindeb-pkg".710$(LIBBPF_A):88- $(Q)$(MAKE) -C $(LIBBPF_SRCS) OUTPUT=$(LIBBPF_OUT)/ $(LIBBPF_OUT)/libbpf.a1111+ $(Q)$(MAKE) -C $(LIBBPF_SRCS) O=$(LIBBPF_OUT)/ OUTPUT=$(LIBBPF_OUT)/ $(LIBBPF_OUT)/libbpf.a9121013userccflags += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi \1114 -I $(srctree)/tools/lib/ -Wno-unused-result
+5-1
kernel/dma/map_benchmark.c
···147147 atomic64_set(&map->sum_sq_unmap, 0);148148 atomic64_set(&map->loops, 0);149149150150- for (i = 0; i < threads; i++)150150+ for (i = 0; i < threads; i++) {151151+ get_task_struct(tsk[i]);151152 wake_up_process(tsk[i]);153153+ }152154153155 msleep_interruptible(map->bparam.seconds * 1000);154156···185183 }186184187185out:186186+ for (i = 0; i < threads; i++)187187+ put_task_struct(tsk[i]);188188 put_device(map->dev);189189 kfree(tsk);190190 return ret;
+1-1
kernel/entry/common.c
···222222 */223223static inline bool report_single_step(unsigned long work)224224{225225- if (!(work & SYSCALL_WORK_SYSCALL_EMU))225225+ if (work & SYSCALL_WORK_SYSCALL_EMU)226226 return false;227227228228 return !!(current_thread_info()->flags & _TIF_SINGLESTEP);
···497497 unsigned int flags, int error)498498{499499 if (!error) {500500- flush_swap_writer(handle);501500 pr_info("S");502501 error = mark_swapfiles(handle, flags);503502 pr_cont("|\n");503503+ flush_swap_writer(handle);504504 }505505506506 if (error)
+5-4
net/core/neighbour.c
···12441244 old = neigh->nud_state;12451245 err = -EPERM;1246124612471247+ if (neigh->dead) {12481248+ NL_SET_ERR_MSG(extack, "Neighbor entry is now dead");12491249+ new = old;12501250+ goto out;12511251+ }12471252 if (!(flags & NEIGH_UPDATE_F_ADMIN) &&12481253 (old & (NUD_NOARP | NUD_PERMANENT)))12491254 goto out;12501250- if (neigh->dead) {12511251- NL_SET_ERR_MSG(extack, "Neighbor entry is now dead");12521252- goto out;12531253- }1254125512551256 ext_learn_change = neigh_update_ext_learned(neigh, flags, ¬ify);12561257
+4-1
net/hsr/hsr_main.h
···217217 u8 net_id; /* for PRP, it occupies most significant 3 bits218218 * of lan_id219219 */220220- unsigned char sup_multicast_addr[ETH_ALEN];220220+ unsigned char sup_multicast_addr[ETH_ALEN] __aligned(sizeof(u16));221221+ /* Align to u16 boundary to avoid unaligned access222222+ * in ether_addr_equal223223+ */221224#ifdef CONFIG_DEBUG_FS222225 struct dentry *node_tbl_root;223226#endif
+7-9
net/ipv4/ip_tunnel.c
···317317 }318318319319 dev->needed_headroom = t_hlen + hlen;320320- mtu -= (dev->hard_header_len + t_hlen);320320+ mtu -= t_hlen;321321322322 if (mtu < IPV4_MIN_MTU)323323 mtu = IPV4_MIN_MTU;···347347 nt = netdev_priv(dev);348348 t_hlen = nt->hlen + sizeof(struct iphdr);349349 dev->min_mtu = ETH_MIN_MTU;350350- dev->max_mtu = IP_MAX_MTU - dev->hard_header_len - t_hlen;350350+ dev->max_mtu = IP_MAX_MTU - t_hlen;351351 ip_tunnel_add(itn, nt);352352 return nt;353353···488488 int mtu;489489490490 tunnel_hlen = md ? tunnel_hlen : tunnel->hlen;491491- pkt_size = skb->len - tunnel_hlen - dev->hard_header_len;491491+ pkt_size = skb->len - tunnel_hlen;492492493493 if (df)494494- mtu = dst_mtu(&rt->dst) - dev->hard_header_len495495- - sizeof(struct iphdr) - tunnel_hlen;494494+ mtu = dst_mtu(&rt->dst) - (sizeof(struct iphdr) + tunnel_hlen);496495 else497496 mtu = skb_valid_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;498497···971972{972973 struct ip_tunnel *tunnel = netdev_priv(dev);973974 int t_hlen = tunnel->hlen + sizeof(struct iphdr);974974- int max_mtu = IP_MAX_MTU - dev->hard_header_len - t_hlen;975975+ int max_mtu = IP_MAX_MTU - t_hlen;975976976977 if (new_mtu < ETH_MIN_MTU)977978 return -EINVAL;···1148114911491150 mtu = ip_tunnel_bind_dev(dev);11501151 if (tb[IFLA_MTU]) {11511151- unsigned int max = IP_MAX_MTU - dev->hard_header_len - nt->hlen;11521152+ unsigned int max = IP_MAX_MTU - (nt->hlen + sizeof(struct iphdr));1152115311531153- mtu = clamp(dev->mtu, (unsigned int)ETH_MIN_MTU,11541154- (unsigned int)(max - sizeof(struct iphdr)));11541154+ mtu = clamp(dev->mtu, (unsigned int)ETH_MIN_MTU, max);11551155 }1156115611571157 err = dev_set_mtu(dev, mtu);