469c469 < index 67c1001..7410a06 100644 --- > index 67c1001..dc179e5 100644 477c477 < +EXTRAVERSION = -rc3-git8 --- > +EXTRAVERSION = -rc3-git9 11322a11323,11376 > diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c > index 837de66..78c5550 100644 > --- a/drivers/acpi/acpica/evgpe.c > +++ b/drivers/acpi/acpica/evgpe.c > @@ -117,19 +117,14 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) > if (ACPI_FAILURE(status)) > return_ACPI_STATUS(status); > > - /* Mark wake-enabled or HW enable, or both */ > - > - if (gpe_event_info->runtime_count) { > - /* Clear the GPE (of stale events), then enable it */ > - status = acpi_hw_clear_gpe(gpe_event_info); > - if (ACPI_FAILURE(status)) > - return_ACPI_STATUS(status); > - > - /* Enable the requested runtime GPE */ > - status = acpi_hw_write_gpe_enable_reg(gpe_event_info); > - } > + /* Clear the GPE (of stale events), then enable it */ > + status = acpi_hw_clear_gpe(gpe_event_info); > + if (ACPI_FAILURE(status)) > + return_ACPI_STATUS(status); > > - return_ACPI_STATUS(AE_OK); > + /* Enable the requested GPE */ > + status = acpi_hw_write_gpe_enable_reg(gpe_event_info); > + return_ACPI_STATUS(status); > } > > /******************************************************************************* > diff --git a/drivers/acpi/acpica/exprep.c b/drivers/acpi/acpica/exprep.c > index edf62bf..a610ebe 100644 > --- a/drivers/acpi/acpica/exprep.c > +++ b/drivers/acpi/acpica/exprep.c > @@ -468,6 +468,18 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) > > acpi_ut_add_reference(obj_desc->field.region_obj); > > + /* allow full data read from EC address space */ > + if (obj_desc->field.region_obj->region.space_id == > + ACPI_ADR_SPACE_EC) { > + if (obj_desc->common_field.bit_length > 8) > + obj_desc->common_field.access_bit_width = > + ACPI_ROUND_UP(obj_desc->common_field. > + bit_length, 8); > + obj_desc->common_field.access_byte_width = > + ACPI_DIV_8(obj_desc->common_field. > + access_bit_width); > + } > + > ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, > "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n", > obj_desc->field.start_field_bit_offset, 11324c11378 < index 75f39f2..5717bd3 100644 --- > index 75f39f2..3026e3f 100644 11334a11389,11413 > @@ -567,13 +568,13 @@ static int acpi_battery_update(struct acpi_battery *battery) > result = acpi_battery_get_status(battery); > if (result) > return result; > -#ifdef CONFIG_ACPI_SYSFS_POWER > if (!acpi_battery_present(battery)) { > +#ifdef CONFIG_ACPI_SYSFS_POWER > sysfs_remove_battery(battery); > +#endif > battery->update_time = 0; > return 0; > } > -#endif > if (!battery->update_time || > old_present != acpi_battery_present(battery)) { > result = acpi_battery_get_info(battery); > @@ -879,7 +880,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) > #ifdef CONFIG_ACPI_SYSFS_POWER > /* acpi_battery_update could remove power_supply object */ > if (battery->bat.dev) > - kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE); > + power_supply_changed(&battery->bat); > #endif > } > 11384c11463 < index d9a85f1..a9c429c 100644 --- > index d9a85f1..3fe29e9 100644 11394a11474,11489 > @@ -1025,13 +1026,10 @@ static int dock_remove(struct dock_station *ds) > static acpi_status > find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) > { > - acpi_status status = AE_OK; > - > if (is_dock(handle)) > - if (dock_add(handle) >= 0) > - status = AE_CTRL_TERMINATE; > + dock_add(handle); > > - return status; > + return AE_OK; > } > > static acpi_status 11396c11491 < index 1ac28c6..35ba254 100644 --- > index 1ac28c6..f2234db 100644 11406a11502,11556 > @@ -628,12 +629,12 @@ static u32 acpi_ec_gpe_handler(void *data) > > static acpi_status > acpi_ec_space_handler(u32 function, acpi_physical_address address, > - u32 bits, u64 *value, > + u32 bits, u64 *value64, > void *handler_context, void *region_context) > { > struct acpi_ec *ec = handler_context; > - int result = 0, i; > - u8 temp = 0; > + int result = 0, i, bytes = bits / 8; > + u8 *value = (u8 *)value64; > > if ((address > 0xFF) || !value || !handler_context) > return AE_BAD_PARAMETER; > @@ -641,32 +642,15 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address, > if (function != ACPI_READ && function != ACPI_WRITE) > return AE_BAD_PARAMETER; > > - if (bits != 8 && acpi_strict) > - return AE_BAD_PARAMETER; > - > - if (EC_FLAGS_MSI) > + if (EC_FLAGS_MSI || bits > 8) > acpi_ec_burst_enable(ec); > > - if (function == ACPI_READ) { > - result = acpi_ec_read(ec, address, &temp); > - *value = temp; > - } else { > - temp = 0xff & (*value); > - result = acpi_ec_write(ec, address, temp); > - } > - > - for (i = 8; unlikely(bits - i > 0); i += 8) { > - ++address; > - if (function == ACPI_READ) { > - result = acpi_ec_read(ec, address, &temp); > - (*value) |= ((u64)temp) << i; > - } else { > - temp = 0xff & ((*value) >> i); > - result = acpi_ec_write(ec, address, temp); > - } > - } > + for (i = 0; i < bytes; ++i, ++address, ++value) > + result = (function == ACPI_READ) ? > + acpi_ec_read(ec, address, value) : > + acpi_ec_write(ec, address, *value); > > - if (EC_FLAGS_MSI) > + if (EC_FLAGS_MSI || bits > 8) > acpi_ec_burst_disable(ec); > > switch (result) { 11430a11581,11638 > diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c > index b872546..b0337d3 100644 > --- a/drivers/acpi/numa.c > +++ b/drivers/acpi/numa.c > @@ -61,8 +61,10 @@ int node_to_pxm(int node) > > void __acpi_map_pxm_to_node(int pxm, int node) > { > - pxm_to_node_map[pxm] = node; > - node_to_pxm_map[node] = pxm; > + if (pxm_to_node_map[pxm] == NUMA_NO_NODE || node < pxm_to_node_map[pxm]) > + pxm_to_node_map[pxm] = node; > + if (node_to_pxm_map[node] == PXM_INVAL || pxm < node_to_pxm_map[node]) > + node_to_pxm_map[node] = pxm; > } > > int acpi_map_pxm_to_node(int pxm) > diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c > index 8e6d866..7594f65 100644 > --- a/drivers/acpi/osl.c > +++ b/drivers/acpi/osl.c > @@ -758,7 +758,14 @@ static acpi_status __acpi_os_execute(acpi_execute_type type, > queue = hp ? kacpi_hotplug_wq : > (type == OSL_NOTIFY_HANDLER ? kacpi_notify_wq : kacpid_wq); > dpc->wait = hp ? 1 : 0; > - INIT_WORK(&dpc->work, acpi_os_execute_deferred); > + > + if (queue == kacpi_hotplug_wq) > + INIT_WORK(&dpc->work, acpi_os_execute_deferred); > + else if (queue == kacpi_notify_wq) > + INIT_WORK(&dpc->work, acpi_os_execute_deferred); > + else > + INIT_WORK(&dpc->work, acpi_os_execute_deferred); > + > ret = queue_work(queue, &dpc->work); > > if (!ret) { > @@ -1151,16 +1158,10 @@ int acpi_check_resource_conflict(const struct resource *res) > > if (clash) { > if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { > - printk("%sACPI: %s resource %s [0x%llx-0x%llx]" > - " conflicts with ACPI region %s" > - " [0x%llx-0x%llx]\n", > - acpi_enforce_resources == ENFORCE_RESOURCES_LAX > - ? KERN_WARNING : KERN_ERR, > - ioport ? "I/O" : "Memory", res->name, > - (long long) res->start, (long long) res->end, > - res_list_elem->name, > - (long long) res_list_elem->start, > - (long long) res_list_elem->end); > + printk(KERN_WARNING "ACPI: resource %s %pR" > + " conflicts with ACPI region %s %pR\n", > + res->name, res, res_list_elem->name, > + res_list_elem); > if (acpi_enforce_resources == ENFORCE_RESOURCES_LAX) > printk(KERN_NOTICE "ACPI: This conflict may" > " cause random problems and system" 11588c11796 < index 189cbc2..0261b11 100644 --- > index 189cbc2..0338f51 100644 11598a11807,11832 > @@ -1080,12 +1081,6 @@ static void acpi_device_set_id(struct acpi_device *device) > if (ACPI_IS_ROOT_DEVICE(device)) { > acpi_add_id(device, ACPI_SYSTEM_HID); > break; > - } else if (ACPI_IS_ROOT_DEVICE(device->parent)) { > - /* \_SB_, the only root-level namespace device */ > - acpi_add_id(device, ACPI_BUS_HID); > - strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); > - strcpy(device->pnp.device_class, ACPI_BUS_CLASS); > - break; > } > > status = acpi_get_object_info(device->handle, &info); > @@ -1120,6 +1115,12 @@ static void acpi_device_set_id(struct acpi_device *device) > acpi_add_id(device, ACPI_DOCK_HID); > else if (!acpi_ibm_smbus_match(device)) > acpi_add_id(device, ACPI_SMBUS_IBM_HID); > + else if (!acpi_device_hid(device) && > + ACPI_IS_ROOT_DEVICE(device->parent)) { > + acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */ > + strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); > + strcpy(device->pnp.device_class, ACPI_BUS_CLASS); > + } > > break; > case ACPI_BUS_TYPE_POWER: 11636c11870 < index cbe6f39..6a01437 100644 --- > index cbe6f39..a0c93b3 100644 11639c11873 < @@ -39,6 +39,7 @@ --- > @@ -39,10 +39,12 @@ 11646a11881,12063 > #include > +#include > > #define PREFIX "ACPI: " > > @@ -88,7 +90,6 @@ module_param(allow_duplicates, bool, 0644); > static int register_count = 0; > static int acpi_video_bus_add(struct acpi_device *device); > static int acpi_video_bus_remove(struct acpi_device *device, int type); > -static int acpi_video_resume(struct acpi_device *device); > static void acpi_video_bus_notify(struct acpi_device *device, u32 event); > > static const struct acpi_device_id video_device_ids[] = { > @@ -104,7 +105,6 @@ static struct acpi_driver acpi_video_bus = { > .ops = { > .add = acpi_video_bus_add, > .remove = acpi_video_bus_remove, > - .resume = acpi_video_resume, > .notify = acpi_video_bus_notify, > }, > }; > @@ -159,6 +159,7 @@ struct acpi_video_bus { > struct proc_dir_entry *dir; > struct input_dev *input; > char phys[32]; /* for input device */ > + struct notifier_block pm_nb; > }; > > struct acpi_video_device_flags { > @@ -1020,6 +1021,13 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) > if (IS_ERR(device->backlight)) > return; > > + /* > + * Save current brightness level in case we have to restore it > + * before acpi_video_device_lcd_set_level() is called next time. > + */ > + device->backlight->props.brightness = > + acpi_video_get_brightness(device->backlight); > + > result = sysfs_create_link(&device->backlight->dev.kobj, > &device->dev->dev.kobj, "device"); > if (result) > @@ -2122,7 +2130,7 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event) > { > struct acpi_video_bus *video = acpi_driver_data(device); > struct input_dev *input; > - int keycode; > + int keycode = 0; > > if (!video) > return; > @@ -2158,17 +2166,19 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event) > break; > > default: > - keycode = KEY_UNKNOWN; > ACPI_DEBUG_PRINT((ACPI_DB_INFO, > "Unsupported event [0x%x]\n", event)); > break; > } > > acpi_notifier_call_chain(device, event, 0); > - input_report_key(input, keycode, 1); > - input_sync(input); > - input_report_key(input, keycode, 0); > - input_sync(input); > + > + if (keycode) { > + input_report_key(input, keycode, 1); > + input_sync(input); > + input_report_key(input, keycode, 0); > + input_sync(input); > + } > > return; > } > @@ -2179,7 +2189,7 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) > struct acpi_device *device = NULL; > struct acpi_video_bus *bus; > struct input_dev *input; > - int keycode; > + int keycode = 0; > > if (!video_device) > return; > @@ -2220,39 +2230,48 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) > keycode = KEY_DISPLAY_OFF; > break; > default: > - keycode = KEY_UNKNOWN; > ACPI_DEBUG_PRINT((ACPI_DB_INFO, > "Unsupported event [0x%x]\n", event)); > break; > } > > acpi_notifier_call_chain(device, event, 0); > - input_report_key(input, keycode, 1); > - input_sync(input); > - input_report_key(input, keycode, 0); > - input_sync(input); > + > + if (keycode) { > + input_report_key(input, keycode, 1); > + input_sync(input); > + input_report_key(input, keycode, 0); > + input_sync(input); > + } > > return; > } > > -static int instance; > -static int acpi_video_resume(struct acpi_device *device) > +static int acpi_video_resume(struct notifier_block *nb, > + unsigned long val, void *ign) > { > struct acpi_video_bus *video; > struct acpi_video_device *video_device; > int i; > > - if (!device || !acpi_driver_data(device)) > - return -EINVAL; > + switch (val) { > + case PM_HIBERNATION_PREPARE: > + case PM_SUSPEND_PREPARE: > + case PM_RESTORE_PREPARE: > + return NOTIFY_DONE; > + } > > - video = acpi_driver_data(device); > + video = container_of(nb, struct acpi_video_bus, pm_nb); > + > + dev_info(&video->device->dev, "Restoring backlight state\n"); > > for (i = 0; i < video->attached_count; i++) { > video_device = video->attached_array[i].bind_info; > if (video_device && video_device->backlight) > acpi_video_set_brightness(video_device->backlight); > } > - return AE_OK; > + > + return NOTIFY_OK; > } > > static acpi_status > @@ -2276,6 +2295,8 @@ acpi_video_bus_match(acpi_handle handle, u32 level, void *context, > return AE_OK; > } > > +static int instance; > + > static int acpi_video_bus_add(struct acpi_device *device) > { > struct acpi_video_bus *video; > @@ -2357,7 +2378,6 @@ static int acpi_video_bus_add(struct acpi_device *device) > set_bit(KEY_BRIGHTNESSDOWN, input->keybit); > set_bit(KEY_BRIGHTNESS_ZERO, input->keybit); > set_bit(KEY_DISPLAY_OFF, input->keybit); > - set_bit(KEY_UNKNOWN, input->keybit); > > error = input_register_device(input); > if (error) > @@ -2369,6 +2389,10 @@ static int acpi_video_bus_add(struct acpi_device *device) > video->flags.rom ? "yes" : "no", > video->flags.post ? "yes" : "no"); > > + video->pm_nb.notifier_call = acpi_video_resume; > + video->pm_nb.priority = 0; > + register_pm_notifier(&video->pm_nb); > + > return 0; > > err_free_input_dev: > @@ -2395,6 +2419,8 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type) > > video = acpi_driver_data(device); > > + unregister_pm_notifier(&video->pm_nb); > + > acpi_video_bus_stop_devices(video); > acpi_video_bus_put_devices(video); > acpi_video_bus_remove_fs(device); 23640c24057 < index eb2181a..a4046e9 100644 --- > index eb2181a..f9daffd 100644 23650a24068,24077 > @@ -263,8 +264,8 @@ void ide_retry_pc(ide_drive_t *drive) > * of it. The failed command will be retried after sense data > * is acquired. > */ > - blk_requeue_request(failed_rq->q, failed_rq); > drive->hwif->rq = NULL; > + ide_requeue_and_plug(drive, failed_rq); > if (ide_queue_sense_rq(drive, pc)) { > blk_start_request(failed_rq); > ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq)); 23686c24113 < index ee58c88..2c17e3f 100644 --- > index ee58c88..06b14bc 100644 23696a24124,24131 > @@ -492,6 +493,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) > if (rq) { > hwif->rq = NULL; > rq->errors = 0; > + ide_requeue_and_plug(drive, rq); > } > return ret; > } 23720a24156,24168 > diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c > index db96138..172ac92 100644 > --- a/drivers/ide/ide-io.c > +++ b/drivers/ide/ide-io.c > @@ -566,7 +566,7 @@ plug_device_2: > blk_plug_device(q); > } > > -static void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) > +void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) > { > struct request_queue *q = drive->queue; > unsigned long flags; 23764a24213,24232 > diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c > index cc8633c..67fb735 100644 > --- a/drivers/ide/ide-taskfile.c > +++ b/drivers/ide/ide-taskfile.c > @@ -428,13 +428,11 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf, > { > struct request *rq; > int error; > + int rw = !(cmd->tf_flags & IDE_TFLAG_WRITE) ? READ : WRITE; > > - rq = blk_get_request(drive->queue, READ, __GFP_WAIT); > + rq = blk_get_request(drive->queue, rw, __GFP_WAIT); > rq->cmd_type = REQ_TYPE_ATA_TASKFILE; > > - if (cmd->tf_flags & IDE_TFLAG_WRITE) > - rq->cmd_flags |= REQ_RW; > - > /* > * (ks) We transfer currently only whole sectors. > * This is suffient for now. But, it would be great, 53334c53802 < index 54514aa..c6c552f 100644 --- > index 54514aa..35bb44a 100644 53344a53813,53898 > @@ -273,12 +274,33 @@ static void pnpacpi_parse_allocated_busresource(struct pnp_dev *dev, > pnp_add_bus_resource(dev, start, end); > } > > +static u64 addr_space_length(struct pnp_dev *dev, u64 min, u64 max, u64 len) > +{ > + u64 max_len; > + > + max_len = max - min + 1; > + if (len <= max_len) > + return len; > + > + /* > + * Per 6.4.3.5, _LEN cannot exceed _MAX - _MIN + 1, but some BIOSes > + * don't do this correctly, e.g., > + * https://bugzilla.kernel.org/show_bug.cgi?id=15480 > + */ > + dev_info(&dev->dev, > + "resource length %#llx doesn't fit in %#llx-%#llx, trimming\n", > + (unsigned long long) len, (unsigned long long) min, > + (unsigned long long) max); > + return max_len; > +} > + > static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, > struct acpi_resource *res) > { > struct acpi_resource_address64 addr, *p = &addr; > acpi_status status; > int window; > + u64 len; > > status = acpi_resource_to_address64(res, p); > if (!ACPI_SUCCESS(status)) { > @@ -287,20 +309,18 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, > return; > } > > + len = addr_space_length(dev, p->minimum, p->maximum, p->address_length); > window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; > > if (p->resource_type == ACPI_MEMORY_RANGE) > - pnpacpi_parse_allocated_memresource(dev, > - p->minimum, p->address_length, > + pnpacpi_parse_allocated_memresource(dev, p->minimum, len, > p->info.mem.write_protect, window); > else if (p->resource_type == ACPI_IO_RANGE) > - pnpacpi_parse_allocated_ioresource(dev, > - p->minimum, p->address_length, > + pnpacpi_parse_allocated_ioresource(dev, p->minimum, len, > p->granularity == 0xfff ? ACPI_DECODE_10 : > ACPI_DECODE_16, window); > else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) > - pnpacpi_parse_allocated_busresource(dev, p->minimum, > - p->address_length); > + pnpacpi_parse_allocated_busresource(dev, p->minimum, len); > } > > static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, > @@ -308,21 +328,20 @@ static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, > { > struct acpi_resource_extended_address64 *p = &res->data.ext_address64; > int window; > + u64 len; > > + len = addr_space_length(dev, p->minimum, p->maximum, p->address_length); > window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; > > if (p->resource_type == ACPI_MEMORY_RANGE) > - pnpacpi_parse_allocated_memresource(dev, > - p->minimum, p->address_length, > + pnpacpi_parse_allocated_memresource(dev, p->minimum, len, > p->info.mem.write_protect, window); > else if (p->resource_type == ACPI_IO_RANGE) > - pnpacpi_parse_allocated_ioresource(dev, > - p->minimum, p->address_length, > + pnpacpi_parse_allocated_ioresource(dev, p->minimum, len, > p->granularity == 0xfff ? ACPI_DECODE_10 : > ACPI_DECODE_16, window); > else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) > - pnpacpi_parse_allocated_busresource(dev, p->minimum, > - p->address_length); > + pnpacpi_parse_allocated_busresource(dev, p->minimum, len); > } > > static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, 70368a70923,70937 > diff --git a/include/linux/ata.h b/include/linux/ata.h > index b4c85e2..700c5b9 100644 > --- a/include/linux/ata.h > +++ b/include/linux/ata.h > @@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status) > > static inline int lba_28_ok(u64 block, u32 n_block) > { > - /* check the ending block number */ > - return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); > + /* check the ending block number: must be LESS THAN 0x0fffffff */ > + return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); > } > > static inline int lba_48_ok(u64 block, u32 n_block) 70449a71019,71030 > diff --git a/include/linux/ide.h b/include/linux/ide.h > index 97e6ab4..3239d1c 100644 > --- a/include/linux/ide.h > +++ b/include/linux/ide.h > @@ -1169,6 +1169,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); > extern void ide_timer_expiry(unsigned long); > extern irqreturn_t ide_intr(int irq, void *dev_id); > extern void do_ide_request(struct request_queue *); > +extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq); > > void ide_init_disk(struct gendisk *, ide_drive_t *); > 72272c72853 < index 49d2fa7..a3dff1f 100644 --- > index 49d2fa7..6af210a 100644 72282a72864,72872 > @@ -4902,7 +4903,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, > int ret; > cpumask_var_t mask; > > - if (len < nr_cpu_ids) > + if ((len * BITS_PER_BYTE) < nr_cpu_ids) > return -EINVAL; > if (len & (sizeof(unsigned long)-1)) > return -EINVAL;