···542 2 : search cores in a package.543 3 : search cpus in a node [= system wide on non-NUMA system]544 ( 4 : search nodes in a chunk of node [on NUMA system] )545- ( 5~ : search system wide [on NUMA system])546547This file is per-cpuset and affect the sched domain where the cpuset548belongs to. Therefore if the flag 'sched_load_balance' of a cpuset
···542 2 : search cores in a package.543 3 : search cpus in a node [= system wide on non-NUMA system]544 ( 4 : search nodes in a chunk of node [on NUMA system] )545+ ( 5 : search system wide [on NUMA system] )546547This file is per-cpuset and affect the sched domain where the cpuset548belongs to. Therefore if the flag 'sched_load_balance' of a cpuset
+13-20
Documentation/hwmon/sysfs-interface
···2------------------------------------------------34The libsensors library offers an interface to the raw sensors data5-through the sysfs interface. See libsensors documentation and source for6-further information. As of writing this document, libsensors7-(from lm_sensors 2.8.3) is heavily chip-dependent. Adding or updating8-support for any given chip requires modifying the library's code.9-This is because libsensors was written for the procfs interface10-older kernel modules were using, which wasn't standardized enough.11-Recent versions of libsensors (from lm_sensors 2.8.2 and later) have12-support for the sysfs interface, though.13-14-The new sysfs interface was designed to be as chip-independent as15-possible.1617Note that motherboards vary widely in the connections to sensor chips.18There is no standard that ensures, for example, that the second···30will have to implement conversion, labeling and hiding of inputs. For31this reason, it is still not recommended to bypass the library.3233-If you are developing a userspace application please send us feedback on34-this standard.35-36-Note that this standard isn't completely established yet, so it is subject37-to changes. If you are writing a new hardware monitoring driver those38-features can't seem to fit in this interface, please contact us with your39-extension proposal. Keep in mind that backward compatibility must be40-preserved.41-42Each chip gets its own directory in the sysfs /sys/devices tree. To43find all sensor chips, it is easier to follow the device symlinks from44/sys/class/hwmon/hwmon*.00000004546All sysfs values are fixed point numbers.47
···2------------------------------------------------34The libsensors library offers an interface to the raw sensors data5+through the sysfs interface. Since lm-sensors 3.0.0, libsensors is6+completely chip-independent. It assumes that all the kernel drivers7+implement the standard sysfs interface described in this document.8+This makes adding or updating support for any given chip very easy, as9+libsensors, and applications using it, do not need to be modified.10+This is a major improvement compared to lm-sensors 2.000001112Note that motherboards vary widely in the connections to sensor chips.13There is no standard that ensures, for example, that the second···35will have to implement conversion, labeling and hiding of inputs. For36this reason, it is still not recommended to bypass the library.3700000000038Each chip gets its own directory in the sysfs /sys/devices tree. To39find all sensor chips, it is easier to follow the device symlinks from40/sys/class/hwmon/hwmon*.41+42+Up to lm-sensors 3.0.0, libsensors looks for hardware monitoring attributes43+in the "physical" device directory. Since lm-sensors 3.0.1, attributes found44+in the hwmon "class" device directory are also supported. Complex drivers45+(e.g. drivers for multifunction chips) may want to use this possibility to46+avoid namespace pollution. The only drawback will be that older versions of47+libsensors won't support the driver in question.4849All sysfs values are fixed point numbers.50
+3-3
MAINTAINERS
···4431S: Maintained44324433W83791D HARDWARE MONITORING DRIVER4434-P: Charles Spirakis4435-M: bezaur@gmail.com4436L: lm-sensors@lm-sensors.org4437-S: Odd Fixes44384439W83793 HARDWARE MONITORING DRIVER4440P: Rudolf Marek
···4431S: Maintained44324433W83791D HARDWARE MONITORING DRIVER4434+P: Marc Hulsman4435+M: m.hulsman@tudelft.nl4436L: lm-sensors@lm-sensors.org4437+S: Maintained44384439W83793 HARDWARE MONITORING DRIVER4440P: Rudolf Marek
···74# define DBG(args)75#endif760077static volatile unsigned int t2_mcheck_any_expected;78static volatile unsigned int t2_mcheck_last_taken;79
···74# define DBG(args)75#endif7677+DEFINE_SPINLOCK(t2_hae_lock);78+79static volatile unsigned int t2_mcheck_any_expected;80static volatile unsigned int t2_mcheck_last_taken;81
+17
arch/alpha/kernel/pci.c
···71static void __init72quirk_cypress(struct pci_dev *dev)73{0000000000000000074 /* The Cypress bridge responds on the PCI bus in the address range75 0xffff0000-0xffffffff (conventional x86 BIOS ROM). There is no76 way to turn this off. The bridge also supports several extended
···71static void __init72quirk_cypress(struct pci_dev *dev)73{74+ /* The Notorious Cy82C693 chip. */75+76+ /* The generic legacy mode IDE fixup in drivers/pci/probe.c77+ doesn't work correctly with the Cypress IDE controller as78+ it has non-standard register layout. Fix that. */79+ if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE) {80+ dev->resource[2].start = dev->resource[3].start = 0;81+ dev->resource[2].end = dev->resource[3].end = 0;82+ dev->resource[2].flags = dev->resource[3].flags = 0;83+ if (PCI_FUNC(dev->devfn) == 2) {84+ dev->resource[0].start = 0x170;85+ dev->resource[0].end = 0x177;86+ dev->resource[1].start = 0x376;87+ dev->resource[1].end = 0x376;88+ }89+ }90+91 /* The Cypress bridge responds on the PCI bus in the address range92 0xffff0000-0xffffffff (conventional x86 BIOS ROM). There is no93 way to turn this off. The bridge also supports several extended
+2-1
arch/alpha/kernel/traps.c
···447448449/* Macro for exception fixup code to access integer registers. */450-#define una_reg(r) (regs->regs[(r) >= 16 && (r) <= 18 ? (r)+19 : (r)])451452453asmlinkage void···456{457 long error, tmp1, tmp2, tmp3, tmp4;458 unsigned long pc = regs->pc - 4;0459 const struct exception_table_entry *fixup;460461 unaligned[0].count++;
···447448449/* Macro for exception fixup code to access integer registers. */450+#define una_reg(r) (_regs[(r) >= 16 && (r) <= 18 ? (r)+19 : (r)])451452453asmlinkage void···456{457 long error, tmp1, tmp2, tmp3, tmp4;458 unsigned long pc = regs->pc - 4;459+ unsigned long *_regs = regs->regs;460 const struct exception_table_entry *fixup;461462 unaligned[0].count++;
+2
arch/ia64/sn/kernel/sn2/sn2_smp.c
···512 int cpu;513 char optstr[64];51400515 if (copy_from_user(optstr, user, count))516 return -EFAULT;517 optstr[count - 1] = '\0';
···512 int cpu;513 char optstr[64];514515+ if (count > sizeof(optstr))516+ return -EINVAL;517 if (copy_from_user(optstr, user, count))518 return -EFAULT;519 optstr[count - 1] = '\0';
···166 static int has_vsa2 = -1;167168 if (has_vsa2 == -1) {00169 /*170 * The VSA has virtual registers that we can query for a171 * signature.···175 outw(VSA_VR_UNLOCK, VSA_VRC_INDEX);176 outw(VSA_VR_SIGNATURE, VSA_VRC_INDEX);177178- has_vsa2 = (inw(VSA_VRC_DATA) == VSA_SIG);0179 }180181 return has_vsa2;
···166 static int has_vsa2 = -1;167168 if (has_vsa2 == -1) {169+ u16 val;170+171 /*172 * The VSA has virtual registers that we can query for a173 * signature.···173 outw(VSA_VR_UNLOCK, VSA_VRC_INDEX);174 outw(VSA_VR_SIGNATURE, VSA_VRC_INDEX);175176+ val = inw(VSA_VRC_DATA);177+ has_vsa2 = (val == AMD_VSA_SIG || val == GSW_VSA_SIG);178 }179180 return has_vsa2;
···532 (unsigned long)(crash_size >> 20),533 (unsigned long)(crash_base >> 20),534 (unsigned long)(total_mem >> 20));535+536+ if (reserve_bootmem(crash_base, crash_size,537+ BOOTMEM_EXCLUSIVE) < 0) {538+ printk(KERN_INFO "crashkernel reservation "539+ "failed - memory is in use\n");540+ return;541+ }542+543 crashk_res.start = crash_base;544 crashk_res.end = crash_base + crash_size - 1;00545 } else546 printk(KERN_INFO "crashkernel reservation failed - "547 "you have to specify a base address\n");
+8-10
arch/x86/kernel/tsc_32.c
···1415#include "mach_timer.h"1617-static int tsc_disabled;0001819/*20 * On some systems the TSC frequency does not···405{406 int cpu;407408- if (!cpu_has_tsc || tsc_disabled) {409- /* Disable the TSC in case of !cpu_has_tsc */410- tsc_disabled = 1;411 return;412- }413414 cpu_khz = calculate_cpu_khz();415 tsc_khz = cpu_khz;416417 if (!cpu_khz) {418 mark_tsc_unstable("could not calculate TSC khz");419- /*420- * We need to disable the TSC completely in this case421- * to prevent sched_clock() from using it.422- */423- tsc_disabled = 1;424 return;425 }000426427 printk("Detected %lu.%03lu MHz processor.\n",428 (unsigned long)cpu_khz / 1000,
···1415#include "mach_timer.h"1617+/* native_sched_clock() is called before tsc_init(), so18+ we must start with the TSC soft disabled to prevent19+ erroneous rdtsc usage on !cpu_has_tsc processors */20+static int tsc_disabled = -1;2122/*23 * On some systems the TSC frequency does not···402{403 int cpu;404405+ if (!cpu_has_tsc || tsc_disabled > 0)00406 return;0407408 cpu_khz = calculate_cpu_khz();409 tsc_khz = cpu_khz;410411 if (!cpu_khz) {412 mark_tsc_unstable("could not calculate TSC khz");00000413 return;414 }415+416+ /* now allow native_sched_clock() to use rdtsc */417+ tsc_disabled = 0;418419 printk("Detected %lu.%03lu MHz processor.\n",420 (unsigned long)cpu_khz / 1000,
+3-5
drivers/acpi/ac.c
···233234 device = ac->device;235 switch (event) {000236 case ACPI_AC_NOTIFY_STATUS:237 case ACPI_NOTIFY_BUS_CHECK:238 case ACPI_NOTIFY_DEVICE_CHECK:···247#ifdef CONFIG_ACPI_SYSFS_POWER248 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);249#endif250- break;251- default:252- ACPI_DEBUG_PRINT((ACPI_DB_INFO,253- "Unsupported event [0x%x]\n", event));254- break;255 }256257 return;
···233234 device = ac->device;235 switch (event) {236+ default:237+ ACPI_DEBUG_PRINT((ACPI_DB_INFO,238+ "Unsupported event [0x%x]\n", event));239 case ACPI_AC_NOTIFY_STATUS:240 case ACPI_NOTIFY_BUS_CHECK:241 case ACPI_NOTIFY_DEVICE_CHECK:···244#ifdef CONFIG_ACPI_SYSFS_POWER245 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);246#endif00000247 }248249 return;
+2-1
drivers/acpi/video.c
···17131714 status = acpi_video_bus_get_one_device(dev, video);1715 if (ACPI_FAILURE(status)) {1716- ACPI_EXCEPTION((AE_INFO, status, "Cant attach device"));01717 continue;1718 }1719 }
···17131714 status = acpi_video_bus_get_one_device(dev, video);1715 if (ACPI_FAILURE(status)) {1716+ ACPI_DEBUG_PRINT((ACPI_DB_WARN,1717+ "Cant attach device"));1718 continue;1719 }1720 }
+9-1
drivers/ata/Kconfig
···651 Support for the Winbond W83759A controller on Vesa Local Bus652 systems.65300000000654config PATA_PLATFORM655 tristate "Generic platform device PATA support"656- depends on EMBEDDED || ARCH_RPC || PPC657 help658 This option enables support for generic directly connected ATA659 devices commonly found on embedded systems.
···651 Support for the Winbond W83759A controller on Vesa Local Bus652 systems.653654+config HAVE_PATA_PLATFORM655+ bool656+ help657+ This is an internal configuration node for any machine that658+ uses pata-platform driver to enable the relevant driver in the659+ configuration structure without having to submit endless patches660+ to update the PATA_PLATFORM entry.661+662config PATA_PLATFORM663 tristate "Generic platform device PATA support"664+ depends on EMBEDDED || ARCH_RPC || PPC || HAVE_PATA_PLATFORM665 help666 This option enables support for generic directly connected ATA667 devices commonly found on embedded systems.
···1322 goto out_port_free_dma_mem;1323 memset(pp->crpb, 0, MV_CRPB_Q_SZ);13240001325 /*1326 * For GEN_I, there's no NCQ, so we only allocate a single sg_tbl.1327 * For later hardware, we need one unique sg_tbl per NCQ tag.···15951596 if ((qc->tf.protocol != ATA_PROT_DMA) &&1597 (qc->tf.protocol != ATA_PROT_NCQ)) {0000000000000000001598 /*1599 * We're about to send a non-EDMA capable command to the1600 * port. Turn off EDMA so there won't be problems accessing
···1322 goto out_port_free_dma_mem;1323 memset(pp->crpb, 0, MV_CRPB_Q_SZ);13241325+ /* 6041/6081 Rev. "C0" (and newer) are okay with async notify */1326+ if (hpriv->hp_flags & MV_HP_ERRATA_60X1C0)1327+ ap->flags |= ATA_FLAG_AN;1328 /*1329 * For GEN_I, there's no NCQ, so we only allocate a single sg_tbl.1330 * For later hardware, we need one unique sg_tbl per NCQ tag.···15921593 if ((qc->tf.protocol != ATA_PROT_DMA) &&1594 (qc->tf.protocol != ATA_PROT_NCQ)) {1595+ static int limit_warnings = 10;1596+ /*1597+ * Errata SATA#16, SATA#24: warn if multiple DRQs expected.1598+ *1599+ * Someday, we might implement special polling workarounds1600+ * for these, but it all seems rather unnecessary since we1601+ * normally use only DMA for commands which transfer more1602+ * than a single block of data.1603+ *1604+ * Much of the time, this could just work regardless.1605+ * So for now, just log the incident, and allow the attempt.1606+ */1607+ if (limit_warnings && (qc->nbytes / qc->sect_size) > 1) {1608+ --limit_warnings;1609+ ata_link_printk(qc->dev->link, KERN_WARNING, DRV_NAME1610+ ": attempting PIO w/multiple DRQ: "1611+ "this may fail due to h/w errata\n");1612+ }1613 /*1614 * We're about to send a non-EDMA capable command to the1615 * port. Turn off EDMA so there won't be problems accessing
···76 for (i = 0; i < pages; i++) {77 if (!entry->busaddr[i])78 break;79- pci_unmap_single(dev->pdev, entry->busaddr[i],80 PAGE_SIZE, PCI_DMA_TODEVICE);81 }82···137138 for (i = 0; i < pages; i++) {139 /* we need to support large memory configurations */140- entry->busaddr[i] = pci_map_single(dev->pdev,141- page_address(entry->142- pagelist[i]),143- PAGE_SIZE, PCI_DMA_TODEVICE);144 if (entry->busaddr[i] == 0) {145 DRM_ERROR("unable to map PCIGART pages!\n");146 drm_ati_pcigart_cleanup(dev, gart_info);
···76 for (i = 0; i < pages; i++) {77 if (!entry->busaddr[i])78 break;79+ pci_unmap_page(dev->pdev, entry->busaddr[i],80 PAGE_SIZE, PCI_DMA_TODEVICE);81 }82···137138 for (i = 0; i < pages; i++) {139 /* we need to support large memory configurations */140+ entry->busaddr[i] = pci_map_page(dev->pdev, entry->pagelist[i],141+ 0, PAGE_SIZE, PCI_DMA_TODEVICE);00142 if (entry->busaddr[i] == 0) {143 DRM_ERROR("unable to map PCIGART pages!\n");144 drm_ati_pcigart_cleanup(dev, gart_info);
···1-comment "An alternative FireWire stack is available with EXPERIMENTAL=y"2 depends on EXPERIMENTAL=n30004config FIREWIRE5- tristate "IEEE 1394 (FireWire) support - alternative stack, EXPERIMENTAL"6 depends on EXPERIMENTAL7 select CRC_ITU_T8 help9 This is the "Juju" FireWire stack, a new alternative implementation10 designed for robustness and simplicity. You can build either this11- stack, or the classic stack (the ieee1394 driver, ohci1394 etc.)12- or both. Please read http://wiki.linux1394.org/JujuMigration before13- you enable the new stack.1415 To compile this driver as a module, say M here: the module will be16 called firewire-core. It functionally replaces ieee1394, raw1394,17 and video1394.1819- NOTE:20-21- You should only build ONE of the stacks, unless you REALLY know what22- you are doing.23-24config FIREWIRE_OHCI25- tristate "Support for OHCI FireWire host controllers"26 depends on PCI && FIREWIRE27 help28 Enable this driver if you have a FireWire controller based···31 called firewire-ohci. It replaces ohci1394 of the classic IEEE 139432 stack.3334- NOTE:3536- You should only build ohci1394 or firewire-ohci, but not both.37- If you nevertheless want to install both, you should configure them38- only as modules and blacklist the driver(s) which you don't want to39- have auto-loaded. Add either4041 blacklist firewire-ohci42 or···58 default y5960config FIREWIRE_SBP261- tristate "Support for storage devices (SBP-2 protocol driver)"62 depends on FIREWIRE && SCSI63 help64 This option enables you to use SBP-2 devices connected to a
···1+comment "A new alternative FireWire stack is available with EXPERIMENTAL=y"2 depends on EXPERIMENTAL=n34+comment "Enable only one of the two stacks, unless you know what you are doing"5+ depends on EXPERIMENTAL6+7config FIREWIRE8+ tristate "New FireWire stack, EXPERIMENTAL"9 depends on EXPERIMENTAL10 select CRC_ITU_T11 help12 This is the "Juju" FireWire stack, a new alternative implementation13 designed for robustness and simplicity. You can build either this14+ stack, or the old stack (the ieee1394 driver, ohci1394 etc.) or both.15+ Please read http://wiki.linux1394.org/JujuMigration before you16+ enable the new stack.1718 To compile this driver as a module, say M here: the module will be19 called firewire-core. It functionally replaces ieee1394, raw1394,20 and video1394.210000022config FIREWIRE_OHCI23+ tristate "OHCI-1394 controllers"24 depends on PCI && FIREWIRE25 help26 Enable this driver if you have a FireWire controller based···33 called firewire-ohci. It replaces ohci1394 of the classic IEEE 139434 stack.3536+ NOTE:3738+ You should only build either firewire-ohci or the old ohci1394 driver,39+ but not both. If you nevertheless want to install both, you should40+ configure them only as modules and blacklist the driver(s) which you41+ don't want to have auto-loaded. Add either4243 blacklist firewire-ohci44 or···60 default y6162config FIREWIRE_SBP263+ tristate "Storage devices (SBP-2 protocol)"64 depends on FIREWIRE && SCSI65 help66 This option enables you to use SBP-2 devices connected to a
+7-2
drivers/firewire/fw-cdev.c
···205 return dequeue_event(client, buffer, count);206}2070208static void209fill_bus_reset_event(struct fw_cdev_event_bus_reset *event,210 struct client *client)···215 event->closure = client->bus_reset_closure;216 event->type = FW_CDEV_EVENT_BUS_RESET;217 event->generation = client->device->generation;218- smp_rmb(); /* node_id must not be older than generation */219 event->node_id = client->device->node_id;220 event->local_node_id = card->local_node->node_id;221 event->bm_node_id = 0; /* FIXME: We don't track the BM. */···274{275 struct fw_cdev_get_info *get_info = buffer;276 struct fw_cdev_event_bus_reset bus_reset;0277 unsigned long ret = 0;278279 client->version = get_info->version;···300 client->bus_reset_closure = get_info->bus_reset_closure;301 if (get_info->bus_reset != 0) {302 void __user *uptr = u64_to_uptr(get_info->bus_reset);03030304 fill_bus_reset_event(&bus_reset, client);00305 if (copy_to_user(uptr, &bus_reset, sizeof(bus_reset)))306 return -EFAULT;307 }308309- get_info->card = client->device->card->index;310311 return 0;312}
···205 return dequeue_event(client, buffer, count);206}207208+/* caller must hold card->lock so that node pointers can be dereferenced here */209static void210fill_bus_reset_event(struct fw_cdev_event_bus_reset *event,211 struct client *client)···214 event->closure = client->bus_reset_closure;215 event->type = FW_CDEV_EVENT_BUS_RESET;216 event->generation = client->device->generation;0217 event->node_id = client->device->node_id;218 event->local_node_id = card->local_node->node_id;219 event->bm_node_id = 0; /* FIXME: We don't track the BM. */···274{275 struct fw_cdev_get_info *get_info = buffer;276 struct fw_cdev_event_bus_reset bus_reset;277+ struct fw_card *card = client->device->card;278 unsigned long ret = 0;279280 client->version = get_info->version;···299 client->bus_reset_closure = get_info->bus_reset_closure;300 if (get_info->bus_reset != 0) {301 void __user *uptr = u64_to_uptr(get_info->bus_reset);302+ unsigned long flags;303304+ spin_lock_irqsave(&card->lock, flags);305 fill_bus_reset_event(&bus_reset, client);306+ spin_unlock_irqrestore(&card->lock, flags);307+308 if (copy_to_user(uptr, &bus_reset, sizeof(bus_reset)))309 return -EFAULT;310 }311312+ get_info->card = card->index;313314 return 0;315}
···251 the SMBus standard. */252static int lm75_read_value(struct i2c_client *client, u8 reg)253{00254 if (reg == LM75_REG_CONF)255 return i2c_smbus_read_byte_data(client, reg);256- else257- return swab16(i2c_smbus_read_word_data(client, reg));0258}259260static int lm75_write_value(struct i2c_client *client, u8 reg, u16 value)···290 int i;291 dev_dbg(&client->dev, "Starting lm75 update\n");292293- for (i = 0; i < ARRAY_SIZE(data->temp); i++)294- data->temp[i] = lm75_read_value(client,295- LM75_REG_TEMP[i]);0000000296 data->last_updated = jiffies;297 data->valid = 1;298 }
···251 the SMBus standard. */252static int lm75_read_value(struct i2c_client *client, u8 reg)253{254+ int value;255+256 if (reg == LM75_REG_CONF)257 return i2c_smbus_read_byte_data(client, reg);258+259+ value = i2c_smbus_read_word_data(client, reg);260+ return (value < 0) ? value : swab16(value);261}262263static int lm75_write_value(struct i2c_client *client, u8 reg, u16 value)···287 int i;288 dev_dbg(&client->dev, "Starting lm75 update\n");289290+ for (i = 0; i < ARRAY_SIZE(data->temp); i++) {291+ int status;292+293+ status = lm75_read_value(client, LM75_REG_TEMP[i]);294+ if (status < 0)295+ dev_dbg(&client->dev, "reg %d, err %d\n",296+ LM75_REG_TEMP[i], status);297+ else298+ data->temp[i] = status;299+ }300 data->last_updated = jiffies;301 data->valid = 1;302 }
+11-14
drivers/hwmon/lm85.c
···192{193 int i;194195- if ( range < lm85_range_map[0] ) { 196- return 0 ;197- } else if ( range > lm85_range_map[15] ) {198 return 15 ;199- } else { /* find closest match */200- for ( i = 14 ; i >= 0 ; --i ) {201- if ( range > lm85_range_map[i] ) { /* range bracketed */202- if ((lm85_range_map[i+1] - range) < 203- (range - lm85_range_map[i])) {204- i++;205- break;206- }207- break;208- }209 }210 }211- return( i & 0x0f );0212}213#define RANGE_FROM_REG(val) (lm85_range_map[(val)&0x0f])214
···192{193 int i;194195+ if (range >= lm85_range_map[15])00196 return 15 ;197+198+ /* Find the closest match */199+ for (i = 14; i >= 0; --i) {200+ if (range >= lm85_range_map[i]) {201+ if ((lm85_range_map[i + 1] - range) <202+ (range - lm85_range_map[i]))203+ return i + 1;204+ return i;00205 }206 }207+208+ return 0;209}210#define RANGE_FROM_REG(val) (lm85_range_map[(val)&0x0f])211
-7
drivers/ide/Kconfig
···823 Say Y here if you want to support the Yellowstone RapIDE controller824 manufactured for use with Acorn computers.825826-config BLK_DEV_IDE_BAST827- tristate "Simtec BAST / Thorcom VR1000 IDE support"828- depends on ARM && (ARCH_BAST || MACH_VR1000)829- help830- Say Y here if you want to support the onboard IDE channels on the831- Simtec BAST or the Thorcom VR1000832-833config IDE_H8300834 tristate "H8300 IDE support"835 depends on H8300
···823 Say Y here if you want to support the Yellowstone RapIDE controller824 manufactured for use with Acorn computers.8250000000826config IDE_H8300827 tristate "H8300 IDE support"828 depends on H8300
···12obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o3obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o04obj-$(CONFIG_BLK_DEV_PALMCHIP_BK3710) += palm_bk3710.o56ifeq ($(CONFIG_IDE_ARM), m)
-90
drivers/ide/arm/bast-ide.c
···1-/*2- * Copyright (c) 2003-2004 Simtec Electronics3- * Ben Dooks <ben@simtec.co.uk>4- *5- * This program is free software; you can redistribute it and/or modify6- * it under the terms of the GNU General Public License version 2 as7- * published by the Free Software Foundation.8- *9-*/10-11-#include <linux/module.h>12-#include <linux/errno.h>13-#include <linux/ide.h>14-#include <linux/init.h>15-16-#include <asm/mach-types.h>17-18-#include <asm/io.h>19-#include <asm/irq.h>20-#include <asm/arch/map.h>21-#include <asm/arch/bast-map.h>22-#include <asm/arch/bast-irq.h>23-24-#define DRV_NAME "bast-ide"25-26-static int __init bastide_register(unsigned int base, unsigned int aux, int irq)27-{28- ide_hwif_t *hwif;29- hw_regs_t hw;30- int i;31- u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };32-33- memset(&hw, 0, sizeof(hw));34-35- base += BAST_IDE_CS;36- aux += BAST_IDE_CS;37-38- for (i = 0; i <= 7; i++) {39- hw.io_ports_array[i] = (unsigned long)base;40- base += 0x20;41- }42-43- hw.io_ports.ctl_addr = aux + (6 * 0x20);44- hw.irq = irq;45- hw.chipset = ide_generic;46-47- hwif = ide_find_port();48- if (hwif == NULL)49- goto out;50-51- i = hwif->index;52-53- ide_init_port_data(hwif, i);54- ide_init_port_hw(hwif, &hw);55- hwif->port_ops = NULL;56-57- idx[0] = i;58-59- ide_device_add(idx, NULL);60-out:61- return 0;62-}63-64-static int __init bastide_init(void)65-{66- unsigned long base = BAST_VA_IDEPRI + BAST_IDE_CS;67-68- /* we can treat the VR1000 and the BAST the same */69-70- if (!(machine_is_bast() || machine_is_vr1000()))71- return 0;72-73- printk("BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n");74-75- if (!request_mem_region(base, 0x400000, DRV_NAME)) {76- printk(KERN_ERR "%s: resources busy\n", DRV_NAME);77- return -EBUSY;78- }79-80- bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0);81- bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1);82-83- return 0;84-}85-86-module_init(bastide_init);87-88-MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");89-MODULE_LICENSE("GPL");90-MODULE_DESCRIPTION("Simtec BAST / Thorcom VR1000 IDE driver");
···353 struct clk *clkp;354 struct resource *mem, *irq;355 ide_hwif_t *hwif;356- void __iomem *base;357- int pribase, i;358 hw_regs_t hw;359 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };360···374 printk(KERN_ERR "failed to get memory region resource\n");375 return -ENODEV;376 }0377 irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);378 if (irq == NULL) {379 printk(KERN_ERR "failed to get IRQ resource\n");380 return -ENODEV;381 }382383- base = (void *)mem->start;000000384385 /* Configure the Palm Chip controller */386- palm_bk3710_chipinit(base);387388- pribase = mem->start + IDE_PALM_ATA_PRI_REG_OFFSET;389 for (i = 0; i < IDE_NR_PORTS - 2; i++)390- hw.io_ports_array[i] = pribase + i;391- hw.io_ports.ctl_addr = mem->start +392- IDE_PALM_ATA_PRI_CTL_OFFSET;393 hw.irq = irq->start;394 hw.chipset = ide_palm3710;395···439440module_init(palm_bk3710_init);441MODULE_LICENSE("GPL");442-
···353 struct clk *clkp;354 struct resource *mem, *irq;355 ide_hwif_t *hwif;356+ unsigned long base;357+ int i;358 hw_regs_t hw;359 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };360···374 printk(KERN_ERR "failed to get memory region resource\n");375 return -ENODEV;376 }377+378 irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);379 if (irq == NULL) {380 printk(KERN_ERR "failed to get IRQ resource\n");381 return -ENODEV;382 }383384+ if (request_mem_region(mem->start, mem->end - mem->start + 1,385+ "palm_bk3710") == NULL) {386+ printk(KERN_ERR "failed to request memory region\n");387+ return -EBUSY;388+ }389+390+ base = IO_ADDRESS(mem->start);391392 /* Configure the Palm Chip controller */393+ palm_bk3710_chipinit((void __iomem *)base);3940395 for (i = 0; i < IDE_NR_PORTS - 2; i++)396+ hw.io_ports_array[i] = base + IDE_PALM_ATA_PRI_REG_OFFSET + i;397+ hw.io_ports.ctl_addr = base + IDE_PALM_ATA_PRI_CTL_OFFSET;0398 hw.irq = irq->start;399 hw.chipset = ide_palm3710;400···434435module_init(palm_bk3710_init);436MODULE_LICENSE("GPL");0
+3-3
drivers/ide/ide-taskfile.c
···225 u8 stat;226227 /*228- * Last sector was transfered, wait until drive is ready.229- * This can take up to 10 usec, but we will wait max 1 ms.230 */231- for (retries = 0; retries < 100; retries++) {232 stat = ide_read_status(drive);233234 if (stat & BUSY_STAT)
···225 u8 stat;226227 /*228+ * Last sector was transfered, wait until device is ready. This can229+ * take up to 6 ms on some ATAPI devices, so we will wait max 10 ms.230 */231+ for (retries = 0; retries < 1000; retries++) {232 stat = ide_read_status(drive);233234 if (stat & BUSY_STAT)
···4source "drivers/firewire/Kconfig"56config IEEE13947- tristate "IEEE 1394 (FireWire) support"8 depends on PCI || BROKEN9 help10 IEEE 1394 describes a high performance serial bus, which is also···19 To compile this driver as a module, say M here: the20 module will be called ieee1394.2122-comment "Subsystem Options"23- depends on IEEE139424-25-config IEEE1394_VERBOSEDEBUG26- bool "Excessive debugging output"27- depends on IEEE139428 help29- If you say Y here, you will get very verbose debugging logs from30- the subsystem which includes a dump of the header of every sent31- and received packet. This can amount to a high amount of data32- collected in a very short time which is usually also saved to33- disk by the system logging daemons.3435- Say Y if you really want or need the debugging output, everyone36- else says N.3738-comment "Controllers"39- depends on IEEE13944041-comment "Texas Instruments PCILynx requires I2C"000000000000000000042 depends on IEEE1394 && I2C=n4344config IEEE1394_PCILYNX45- tristate "Texas Instruments PCILynx support"46 depends on PCI && IEEE1394 && I2C47 select I2C_ALGOBIT48 help···72 PowerMacs G3 B&W contain the PCILynx controller. Therefore73 almost everybody can say N here.7475-config IEEE1394_OHCI139476- tristate "OHCI-1394 support"77- depends on PCI && IEEE139478- help79- Enable this driver if you have an IEEE 1394 controller based on the80- OHCI-1394 specification. The current driver is only tested with OHCI81- chipsets made by Texas Instruments and NEC. Most third-party vendors82- use one of these chipsets. It should work with any OHCI-139483- compliant card, however.84-85- To compile this driver as a module, say M here: the86- module will be called ohci1394.87-88-comment "Protocols"89- depends on IEEE139490-91-config IEEE1394_VIDEO139492- tristate "OHCI-1394 Video support"93- depends on IEEE1394 && IEEE1394_OHCI139494- help95- This option enables video device usage for OHCI-1394 cards. Enable96- this option only if you have an IEEE 1394 video device connected to97- an OHCI-1394 card.98-99comment "SBP-2 support (for storage devices) requires SCSI"100 depends on IEEE1394 && SCSI=n101102config IEEE1394_SBP2103- tristate "SBP-2 support (Harddisks etc.)"104 depends on IEEE1394 && SCSI105 help106 This option enables you to use SBP-2 devices connected to an IEEE···118119 The module is called eth1394 although it does not emulate Ethernet.1200000000000000000000000000121config IEEE1394_DV1394122- tristate "OHCI-DV I/O support (deprecated)"123 depends on IEEE1394 && IEEE1394_OHCI1394124 help125 The dv1394 driver is unsupported and may be removed from Linux in a126 future release. Its functionality is now provided by raw1394 together127 with libraries such as libiec61883.128129-config IEEE1394_RAWIO130- tristate "Raw IEEE1394 I/O support"131 depends on IEEE1394132 help133- This option adds support for the raw1394 device file which enables134- direct communication of user programs with the IEEE 1394 bus and thus135- with the attached peripherals. Almost all application programs which136- access FireWire require this option.137138- To compile this driver as a module, say M here: the module will be139- called raw1394.140141endmenu
···4source "drivers/firewire/Kconfig"56config IEEE13947+ tristate "Stable FireWire stack"8 depends on PCI || BROKEN9 help10 IEEE 1394 describes a high performance serial bus, which is also···19 To compile this driver as a module, say M here: the20 module will be called ieee1394.2122+config IEEE1394_OHCI139423+ tristate "OHCI-1394 controllers"24+ depends on PCI && IEEE139400025 help26+ Enable this driver if you have an IEEE 1394 controller based on the27+ OHCI-1394 specification. The current driver is only tested with OHCI28+ chipsets made by Texas Instruments and NEC. Most third-party vendors29+ use one of these chipsets. It should work with any OHCI-139430+ compliant card, however.3132+ To compile this driver as a module, say M here: the33+ module will be called ohci1394.3435+ NOTE:03637+ You should only build either ohci1394 or the new firewire-ohci driver,38+ but not both. If you nevertheless want to install both, you should39+ configure them only as modules and blacklist the driver(s) which you40+ don't want to have auto-loaded. Add either41+42+ blacklist firewire-ohci43+ or44+ blacklist ohci139445+ blacklist video139446+ blacklist dv139447+48+ to /etc/modprobe.conf or /etc/modprobe.d/* and update modprobe.conf49+ depending on your distribution. The latter two modules should be50+ blacklisted together with ohci1394 because they depend on ohci1394.51+52+ If you have an old modprobe which doesn't implement the blacklist53+ directive, use "install modulename /bin/true" for the modules to be54+ blacklisted.55+56+comment "PCILynx controller requires I2C"57 depends on IEEE1394 && I2C=n5859config IEEE1394_PCILYNX60+ tristate "PCILynx controller"61 depends on PCI && IEEE1394 && I2C62 select I2C_ALGOBIT63 help···57 PowerMacs G3 B&W contain the PCILynx controller. Therefore58 almost everybody can say N here.5900000000000000000000000060comment "SBP-2 support (for storage devices) requires SCSI"61 depends on IEEE1394 && SCSI=n6263config IEEE1394_SBP264+ tristate "Storage devices (SBP-2 protocol)"65 depends on IEEE1394 && SCSI66 help67 This option enables you to use SBP-2 devices connected to an IEEE···127128 The module is called eth1394 although it does not emulate Ethernet.129130+config IEEE1394_RAWIO131+ tristate "raw1394 userspace interface"132+ depends on IEEE1394133+ help134+ This option adds support for the raw1394 device file which enables135+ direct communication of user programs with IEEE 1394 devices136+ (isochronous and asynchronous). Almost all application programs137+ which access FireWire require this option.138+139+ To compile this driver as a module, say M here: the module will be140+ called raw1394.141+142+config IEEE1394_VIDEO1394143+ tristate "video1394 userspace interface"144+ depends on IEEE1394 && IEEE1394_OHCI1394145+ help146+ This option adds support for the video1394 device files which enable147+ isochronous communication of user programs with IEEE 1394 devices,148+ especially video capture or export. This interface is used by all149+ libdc1394 based programs and by several other programs, in addition to150+ the raw1394 interface. It is generally not required for DV capture.151+152+ To compile this driver as a module, say M here: the module will be153+ called video1394.154+155config IEEE1394_DV1394156+ tristate "dv1394 userspace interface (deprecated)"157 depends on IEEE1394 && IEEE1394_OHCI1394158 help159 The dv1394 driver is unsupported and may be removed from Linux in a160 future release. Its functionality is now provided by raw1394 together161 with libraries such as libiec61883.162163+config IEEE1394_VERBOSEDEBUG164+ bool "Excessive debugging output"165 depends on IEEE1394166 help167+ If you say Y here, you will get very verbose debugging logs from the168+ ieee1394 drivers, including sent and received packet headers. This169+ will quickly result in large amounts of data sent to the system log.0170171+ Say Y if you really need the debugging output. Everyone else says N.0172173endmenu
···855 */856857 /* Update group descriptor block for new group */858- gdp = (struct ext4_group_desc *)primary->b_data + gdb_off;0859860 ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */861 ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */
···855 */856857 /* Update group descriptor block for new group */858+ gdp = (struct ext4_group_desc *)((char *)primary->b_data +859+ gdb_off * EXT4_DESC_SIZE(sb));860861 ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */862 ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */
+1-1
include/asm-alpha/core_mcpcia.h
···261 }262#endif263264-static inline int __mcpcia_is_mmio(unsigned long addr)265{266 return (addr & 0x80000000UL) == 0;267}
···261 }262#endif263264+extern inline int __mcpcia_is_mmio(unsigned long addr)265{266 return (addr & 0x80000000UL) == 0;267}
+7-7
include/asm-alpha/core_t2.h
···356#define vip volatile int *357#define vuip volatile unsigned int *358359-static inline u8 t2_inb(unsigned long addr)360{361 long result = *(vip) ((addr << 5) + T2_IO + 0x00);362 return __kernel_extbl(result, addr & 3);363}364365-static inline void t2_outb(u8 b, unsigned long addr)366{367 unsigned long w;368···371 mb();372}373374-static inline u16 t2_inw(unsigned long addr)375{376 long result = *(vip) ((addr << 5) + T2_IO + 0x08);377 return __kernel_extwl(result, addr & 3);378}379380-static inline void t2_outw(u16 b, unsigned long addr)381{382 unsigned long w;383···386 mb();387}388389-static inline u32 t2_inl(unsigned long addr)390{391 return *(vuip) ((addr << 5) + T2_IO + 0x18);392}393394-static inline void t2_outl(u32 b, unsigned long addr)395{396 *(vuip) ((addr << 5) + T2_IO + 0x18) = b;397 mb();···435 set_hae(msb); \436}437438-static DEFINE_SPINLOCK(t2_hae_lock);439440/*441 * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since
···356#define vip volatile int *357#define vuip volatile unsigned int *358359+extern inline u8 t2_inb(unsigned long addr)360{361 long result = *(vip) ((addr << 5) + T2_IO + 0x00);362 return __kernel_extbl(result, addr & 3);363}364365+extern inline void t2_outb(u8 b, unsigned long addr)366{367 unsigned long w;368···371 mb();372}373374+extern inline u16 t2_inw(unsigned long addr)375{376 long result = *(vip) ((addr << 5) + T2_IO + 0x08);377 return __kernel_extwl(result, addr & 3);378}379380+extern inline void t2_outw(u16 b, unsigned long addr)381{382 unsigned long w;383···386 mb();387}388389+extern inline u32 t2_inl(unsigned long addr)390{391 return *(vuip) ((addr << 5) + T2_IO + 0x18);392}393394+extern inline void t2_outl(u32 b, unsigned long addr)395{396 *(vuip) ((addr << 5) + T2_IO + 0x18) = b;397 mb();···435 set_hae(msb); \436}437438+extern spinlock_t t2_hae_lock;439440/*441 * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since
+3-3
include/asm-alpha/io.h
···35 * register not being up-to-date with respect to the hardware36 * value.37 */38-static inline void __set_hae(unsigned long new_hae)39{40 unsigned long flags;41 local_irq_save(flags);···49 local_irq_restore(flags);50}5152-static inline void set_hae(unsigned long new_hae)53{54 if (new_hae != alpha_mv.hae_cache)55 __set_hae(new_hae);···176#undef REMAP1177#undef REMAP2178179-static inline void __iomem *generic_ioportmap(unsigned long a)180{181 return alpha_mv.mv_ioportmap(a);182}
···35 * register not being up-to-date with respect to the hardware36 * value.37 */38+extern inline void __set_hae(unsigned long new_hae)39{40 unsigned long flags;41 local_irq_save(flags);···49 local_irq_restore(flags);50}5152+extern inline void set_hae(unsigned long new_hae)53{54 if (new_hae != alpha_mv.hae_cache)55 __set_hae(new_hae);···176#undef REMAP1177#undef REMAP2178179+extern inline void __iomem *generic_ioportmap(unsigned long a)180{181 return alpha_mv.mv_ioportmap(a);182}
+3-3
include/asm-alpha/mmu_context.h
···23#endif242526-extern inline unsigned long27__reload_thread(struct pcb_struct *pcb)28{29 register unsigned long a0 __asm__("$16");···114#define __MMU_EXTERN_INLINE115#endif116117-static inline unsigned long118__get_new_mm_context(struct mm_struct *mm, long cpu)119{120 unsigned long asn = cpu_last_asn(cpu);···226# endif227#endif228229-extern inline int230init_new_context(struct task_struct *tsk, struct mm_struct *mm)231{232 int i;
···23#endif242526+static inline unsigned long27__reload_thread(struct pcb_struct *pcb)28{29 register unsigned long a0 __asm__("$16");···114#define __MMU_EXTERN_INLINE115#endif116117+extern inline unsigned long118__get_new_mm_context(struct mm_struct *mm, long cpu)119{120 unsigned long asn = cpu_last_asn(cpu);···226# endif227#endif228229+static inline int230init_new_context(struct task_struct *tsk, struct mm_struct *mm)231{232 int i;
···1#ifndef __ALPHA_PERCPU_H2#define __ALPHA_PERCPU_H3+#include <linux/compiler.h>4+#include <linux/threads.h>56+/*7+ * Determine the real variable name from the name visible in the8+ * kernel sources.9+ */10+#define per_cpu_var(var) per_cpu__##var11+12+#ifdef CONFIG_SMP13+14+/*15+ * per_cpu_offset() is the offset that has to be added to a16+ * percpu variable to get to the instance for a certain processor.17+ */18+extern unsigned long __per_cpu_offset[NR_CPUS];19+20+#define per_cpu_offset(x) (__per_cpu_offset[x])21+22+#define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())23+#ifdef CONFIG_DEBUG_PREEMPT24+#define my_cpu_offset per_cpu_offset(smp_processor_id())25+#else26+#define my_cpu_offset __my_cpu_offset27+#endif28+29+#ifndef MODULE30+#define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset))31+#define PER_CPU_ATTRIBUTES32+#else33+/*34+ * To calculate addresses of locally defined variables, GCC uses 32-bit35+ * displacement from the GP. Which doesn't work for per cpu variables in36+ * modules, as an offset to the kernel per cpu area is way above 4G.37+ *38+ * This forces allocation of a GOT entry for per cpu variable using39+ * ldq instruction with a 'literal' relocation.40+ */41+#define SHIFT_PERCPU_PTR(var, offset) ({ \42+ extern int simple_identifier_##var(void); \43+ unsigned long __ptr, tmp_gp; \44+ asm ( "br %1, 1f \n\45+ 1: ldgp %1, 0(%1) \n\46+ ldq %0, per_cpu__" #var"(%1)\t!literal" \47+ : "=&r"(__ptr), "=&r"(tmp_gp)); \48+ (typeof(&per_cpu_var(var)))(__ptr + (offset)); })49+50+#define PER_CPU_ATTRIBUTES __used51+52+#endif /* MODULE */53+54+/*55+ * A percpu variable may point to a discarded regions. The following are56+ * established ways to produce a usable pointer from the percpu variable57+ * offset.58+ */59+#define per_cpu(var, cpu) \60+ (*SHIFT_PERCPU_PTR(var, per_cpu_offset(cpu)))61+#define __get_cpu_var(var) \62+ (*SHIFT_PERCPU_PTR(var, my_cpu_offset))63+#define __raw_get_cpu_var(var) \64+ (*SHIFT_PERCPU_PTR(var, __my_cpu_offset))65+66+#else /* ! SMP */67+68+#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var)))69+#define __get_cpu_var(var) per_cpu_var(var)70+#define __raw_get_cpu_var(var) per_cpu_var(var)71+72+#endif /* SMP */73+74+#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu_var(name)7576#endif /* __ALPHA_PERCPU_H */
···14#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)1516#ifdef CONFIG_X86_PAE17+/* 44=32+12, the limit we can fit into an unsigned long pfn */18+#define __PHYSICAL_MASK_SHIFT 4419#define __VIRTUAL_MASK_SHIFT 3220#define PAGETABLE_LEVELS 321
+1-1
include/linux/bootmem.h
···94 unsigned long freepfn,95 unsigned long startpfn,96 unsigned long endpfn);97-extern void reserve_bootmem_node(pg_data_t *pgdat,98 unsigned long physaddr,99 unsigned long size,100 int flags);
···94 unsigned long freepfn,95 unsigned long startpfn,96 unsigned long endpfn);97+extern int reserve_bootmem_node(pg_data_t *pgdat,98 unsigned long physaddr,99 unsigned long size,100 int flags);
···95#ifdef CONFIG_NET_NS96extern void __put_net(struct net *net);970000098static inline struct net *get_net(struct net *net)99{100 atomic_inc(&net->count);···130 return net1 == net2;131}132#else000000133static inline struct net *get_net(struct net *net)134{135 return net;
···95#ifdef CONFIG_NET_NS96extern void __put_net(struct net *net);9798+static inline int net_alive(struct net *net)99+{100+ return net && atomic_read(&net->count);101+}102+103static inline struct net *get_net(struct net *net)104{105 atomic_inc(&net->count);···125 return net1 == net2;126}127#else128+129+static inline int net_alive(struct net *net)130+{131+ return 1;132+}133+134static inline struct net *get_net(struct net *net)135{136 return net;
+2-2
kernel/cpuset.c
···10371038static int update_relax_domain_level(struct cpuset *cs, s64 val)1039{1040- if ((int)val < 0)1041- val = -1;10421043 if (val != cs->relax_domain_level) {1044 cs->relax_domain_level = val;
···10371038static int update_relax_domain_level(struct cpuset *cs, s64 val)1039{1040+ if (val < -1 || val >= SD_LV_MAX)1041+ return -EINVAL;10421043 if (val != cs->relax_domain_level) {1044 cs->relax_domain_level = val;
-2
kernel/rcupreempt.c
···217}218EXPORT_SYMBOL_GPL(rcu_batches_completed);219220-EXPORT_SYMBOL_GPL(rcu_batches_completed_bh);221-222void __rcu_read_lock(void)223{224 int idx;
···217}218EXPORT_SYMBOL_GPL(rcu_batches_completed);21900220void __rcu_read_lock(void)221{222 int idx;
···20772078 rcu_read_lock();20792080+ /* Don't receive packets in an exiting network namespace */2081+ if (!net_alive(dev_net(skb->dev)))2082+ goto out;2083+2084#ifdef CONFIG_NET_CLS_ACT2085 if (skb->tc_verd & TC_NCLS) {2086 skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
+3
net/core/net_namespace.c
···140 struct pernet_operations *ops;141 struct net *net;142000143 net = container_of(work, struct net, work);144145 mutex_lock(&net_mutex);
···140 struct pernet_operations *ops;141 struct net *net;142143+ /* Be very certain incoming network packets will not find us */144+ rcu_barrier();145+146 net = container_of(work, struct net, work);147148 mutex_lock(&net_mutex);
···102 if (hdr->version != 6)103 goto err;104105+ /*106+ * RFC4291 2.5.3107+ * A packet received on an interface with a destination address108+ * of loopback must be dropped.109+ */110+ if (!(dev->flags & IFF_LOOPBACK) &&111+ ipv6_addr_loopback(&hdr->daddr))112+ goto err;113+114 skb->transport_header = skb->network_header + sizeof(*hdr);115 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);116
···345 case IPV6_DSTOPTS:346 {347 struct ipv6_txoptions *opt;348+349+ /* remove any sticky options header with a zero option350+ * length, per RFC3542.351+ */352 if (optlen == 0)353 optval = NULL;354+ else if (optlen < sizeof(struct ipv6_opt_hdr) ||355+ optlen & 0x7 || optlen > 8 * 255)356+ goto e_inval;357358 /* hop-by-hop / destination options are privileged option */359 retv = -EPERM;360 if (optname != IPV6_RTHDR && !capable(CAP_NET_RAW))361 break;0000362363 opt = ipv6_renew_options(sk, np->opt, optname,364 (struct ipv6_opt_hdr __user *)optval,
+8-1
net/mac80211/tx.c
···1132 ieee80211_tx_handler *handler;1133 struct ieee80211_tx_data tx;1134 ieee80211_tx_result res = TX_DROP, res_prepare;1135- int ret, i;11361137 WARN_ON(__ieee80211_queue_pending(local, control->queue));1138···1216 if (!__ieee80211_queue_stopped(local, control->queue)) {1217 clear_bit(IEEE80211_LINK_STATE_PENDING,1218 &local->state[control->queue]);00000001219 goto retry;1220 }1221 memcpy(&store->control, control,
···1132 ieee80211_tx_handler *handler;1133 struct ieee80211_tx_data tx;1134 ieee80211_tx_result res = TX_DROP, res_prepare;1135+ int ret, i, retries = 0;11361137 WARN_ON(__ieee80211_queue_pending(local, control->queue));1138···1216 if (!__ieee80211_queue_stopped(local, control->queue)) {1217 clear_bit(IEEE80211_LINK_STATE_PENDING,1218 &local->state[control->queue]);1219+ retries++;1220+ /*1221+ * Driver bug, it's rejecting packets but1222+ * not stopping queues.1223+ */1224+ if (WARN_ON_ONCE(retries > 5))1225+ goto drop;1226 goto retry;1227 }1228 memcpy(&store->control, control,
+3-1
net/sctp/socket.c
···4401 if (copy_from_user(&getaddrs, optval, len))4402 return -EFAULT;44034404- if (getaddrs.addr_num <= 0) return -EINVAL;004405 /*4406 * For UDP-style sockets, id specifies the association to query.4407 * If the id field is set to the value '0' then the locally bound
···4401 if (copy_from_user(&getaddrs, optval, len))4402 return -EFAULT;44034404+ if (getaddrs.addr_num <= 0 ||4405+ getaddrs.addr_num >= (INT_MAX / sizeof(union sctp_addr)))4406+ return -EINVAL;4407 /*4408 * For UDP-style sockets, id specifies the association to query.4409 * If the id field is set to the value '0' then the locally bound