Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 14 Mar 2012 00:06:02 +0000 (17:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 14 Mar 2012 00:06:02 +0000 (17:06 -0700)
Pull arch/tile update from Chris Metcalf
 "These include a couple of queued-up minor bug fixes from the
  community, a fix to unbreak the sysfs hooks in tile, and syncing up
  the defconfigs."

Ugh.  defconfigs updates without "make minconfig".  Tons of ugly
pointless lines there, I suspect.

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: Use set_current_blocked() and block_sigmask()
  arch/tile: misplaced parens near likely
  arch/tile: sync up the defconfig files to the tip
  arch/tile: Fix up from commit 8a25a2fd126c621f44f3aeaef80d51f00fc11639

23 files changed:
MAINTAINERS
arch/arm/mach-shmobile/board-ag5evm.c
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-bonito.c
arch/arm/mach-shmobile/board-mackerel.c
arch/sh/kernel/cpu/sh2a/ex.S
arch/sh/kernel/cpu/sh4a/clock-sh7757.c
arch/sh/kernel/cpu/sh4a/clock-sh7785.c
arch/x86/kernel/cpu/perf_event_intel.c
drivers/pci/pcie/aspm.c
drivers/platform/x86/Kconfig
drivers/platform/x86/Makefile
drivers/platform/x86/acer-wmi.c
drivers/platform/x86/amilo-rfkill.c [new file with mode: 0644]
drivers/platform/x86/fujitsu-tablet.c [new file with mode: 0644]
drivers/platform/x86/panasonic-laptop.c
drivers/tty/serial/sh-sci.c
fs/cifs/file.c
fs/cifs/xattr.c
fs/inode.c
fs/namei.c
fs/udf/file.c
tools/perf/util/parse-events.c

index 3321d75c6c7ffc3f32a8b5a3a3cd279a45913cfd..95e4e43a12b456270b0d7df48c1c11c6f88e1fce 100644 (file)
@@ -2845,6 +2845,12 @@ S:       Maintained
 F:     drivers/media/video/m5mols/
 F:     include/media/m5mols.h
 
+FUJITSU TABLET EXTRAS
+M:     Robert Gerlach <khnz@gmx.de>
+L:     platform-driver-x86@vger.kernel.org
+S:     Maintained
+F:     drivers/platform/x86/fujitsu-tablet.c
+
 FUSE: FILESYSTEM IN USERSPACE
 M:     Miklos Szeredi <miklos@szeredi.hu>
 L:     fuse-devel@lists.sourceforge.net
index 068b754bc348ff20f1c091264cb80e3a09edf134..8aea3a2dd889ef73bb0be3a961497bd3ad8bbc7e 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/mfd/tmio.h>
 #include <linux/sh_clk.h>
+#include <linux/videodev2.h>
 #include <video/sh_mobile_lcdc.h>
 #include <video/sh_mipi_dsi.h>
 #include <sound/sh_fsi.h>
index eeb4d96645845dbaa974e138d6903ce331329cb9..b4718b00e827b90e73edf01b252379cca75e4bcc 100644 (file)
@@ -794,7 +794,7 @@ static struct fsi_ak4642_info fsi2_ak4643_info = {
 static struct platform_device fsi_ak4643_device = {
        .name   = "fsi-ak4642-audio",
        .dev    = {
-               .platform_data  = &fsi_info,
+               .platform_data  = &fsi2_ak4643_info,
        },
 };
 
index 4d2201622323114eced0c40af35693fb06d85d95..4bd1162ce0dfb53eff3d8faa6849da09a9d17638 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
 #include <linux/smsc911x.h>
+#include <linux/videodev2.h>
 #include <mach/common.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -241,7 +242,7 @@ static struct sh_mobile_lcdc_info lcdc0_info = {
        .clock_source   = LCDC_CLK_BUS,
        .ch[0] = {
                .chan                   = LCDC_CHAN_MAINLCD,
-               .bpp                    = 16,
+               .fourcc = V4L2_PIX_FMT_RGB565,
                .interface_type         = RGB24,
                .clock_divider          = 5,
                .flags                  = 0,
index a2813247b4558d540682c391c0ca07e5ffbc261b..7b53cda418513a63f69d34a90e903aa4d7b76f1c 100644 (file)
@@ -1352,6 +1352,10 @@ static struct map_desc mackerel_io_desc[] __initdata = {
 static void __init mackerel_map_io(void)
 {
        iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
+       /* DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't
+        * enough to allocate the frame buffer memory.
+        */
+       init_consistent_dma_size(12 << 20);
 
        /* setup early devices and console here as well */
        sh7372_add_early_devices();
index 3ead9e63965a6f6cf9c1e62349b7f145d37d634f..4568066700cfe4eb0e14e582d7dff6bf1b194e25 100644 (file)
@@ -66,6 +66,7 @@ vector        =       0
        .long   exception_entry0 + vector * 6
 vector =       vector + 1
        .endr
+vector =       0
        .rept   256
        .long   exception_entry1 + vector * 6
 vector =       vector + 1
index 0fbff1422f5454c239a54bb77a182b30fc696a6c..0bd21c82151b6db75609c3411cb900184119dd6e 100644 (file)
@@ -79,7 +79,7 @@ struct clk div4_clks[DIV4_NR] = {
 #define MSTPCR1                0xffc80034
 #define MSTPCR2                0xffc10028
 
-enum { MSTP004, MSTP000, MSTP114, MSTP113, MSTP112,
+enum { MSTP004, MSTP000, MSTP127, MSTP114, MSTP113, MSTP112,
        MSTP111, MSTP110, MSTP103, MSTP102, MSTP220,
        MSTP_NR };
 
@@ -89,6 +89,7 @@ static struct clk mstp_clks[MSTP_NR] = {
        [MSTP000] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 0, 0),
 
        /* MSTPCR1 */
+       [MSTP127] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 27, 0),
        [MSTP114] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 14, 0),
        [MSTP113] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 13, 0),
        [MSTP112] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 12, 0),
@@ -131,6 +132,7 @@ static struct clk_lookup lookups[] = {
        CLKDEV_CON_ID("usb_fck", &mstp_clks[MSTP103]),
        CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[MSTP102]),
        CLKDEV_CON_ID("mmc0", &mstp_clks[MSTP220]),
+       CLKDEV_CON_ID("rspi2", &mstp_clks[MSTP127]),
 };
 
 int __init arch_clk_init(void)
index e5b420cc12654fd38d245370e08f3d2d1c875c2a..2b314439d359a30227357bb137771390c126990e 100644 (file)
@@ -156,7 +156,7 @@ static struct clk_lookup lookups[] = {
        CLKDEV_CON_ID("siof_fck", &mstp_clks[MSTP003]),
        CLKDEV_CON_ID("hspi_fck", &mstp_clks[MSTP002]),
        CLKDEV_CON_ID("hudi_fck", &mstp_clks[MSTP119]),
-       CLKDEV_CON_ID("ubc_fck", &mstp_clks[MSTP117]),
+       CLKDEV_CON_ID("ubc0", &mstp_clks[MSTP117]),
        CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]),
        CLKDEV_CON_ID("dmac_5_0_fck", &mstp_clks[MSTP104]),
        CLKDEV_CON_ID("gdta_fck", &mstp_clks[MSTP100]),
index 3bd37bdf1b8ee170765fc064aeef7ca01cee1b7f..61d4f79a550e39ed298e571236ab778c4067ee0b 100644 (file)
@@ -385,14 +385,15 @@ static __initconst const u64 westmere_hw_cache_event_ids
 #define NHM_LOCAL_DRAM         (1 << 14)
 #define NHM_NON_DRAM           (1 << 15)
 
-#define NHM_ALL_DRAM           (NHM_REMOTE_DRAM|NHM_LOCAL_DRAM)
+#define NHM_LOCAL              (NHM_LOCAL_DRAM|NHM_REMOTE_CACHE_FWD)
+#define NHM_REMOTE             (NHM_REMOTE_DRAM)
 
 #define NHM_DMND_READ          (NHM_DMND_DATA_RD)
 #define NHM_DMND_WRITE         (NHM_DMND_RFO|NHM_DMND_WB)
 #define NHM_DMND_PREFETCH      (NHM_PF_DATA_RD|NHM_PF_DATA_RFO)
 
 #define NHM_L3_HIT     (NHM_UNCORE_HIT|NHM_OTHER_CORE_HIT_SNP|NHM_OTHER_CORE_HITM)
-#define NHM_L3_MISS    (NHM_NON_DRAM|NHM_ALL_DRAM|NHM_REMOTE_CACHE_FWD)
+#define NHM_L3_MISS    (NHM_NON_DRAM|NHM_LOCAL_DRAM|NHM_REMOTE_DRAM|NHM_REMOTE_CACHE_FWD)
 #define NHM_L3_ACCESS  (NHM_L3_HIT|NHM_L3_MISS)
 
 static __initconst const u64 nehalem_hw_cache_extra_regs
@@ -416,16 +417,16 @@ static __initconst const u64 nehalem_hw_cache_extra_regs
  },
  [ C(NODE) ] = {
        [ C(OP_READ) ] = {
-               [ C(RESULT_ACCESS) ] = NHM_DMND_READ|NHM_ALL_DRAM,
-               [ C(RESULT_MISS)   ] = NHM_DMND_READ|NHM_REMOTE_DRAM,
+               [ C(RESULT_ACCESS) ] = NHM_DMND_READ|NHM_LOCAL|NHM_REMOTE,
+               [ C(RESULT_MISS)   ] = NHM_DMND_READ|NHM_REMOTE,
        },
        [ C(OP_WRITE) ] = {
-               [ C(RESULT_ACCESS) ] = NHM_DMND_WRITE|NHM_ALL_DRAM,
-               [ C(RESULT_MISS)   ] = NHM_DMND_WRITE|NHM_REMOTE_DRAM,
+               [ C(RESULT_ACCESS) ] = NHM_DMND_WRITE|NHM_LOCAL|NHM_REMOTE,
+               [ C(RESULT_MISS)   ] = NHM_DMND_WRITE|NHM_REMOTE,
        },
        [ C(OP_PREFETCH) ] = {
-               [ C(RESULT_ACCESS) ] = NHM_DMND_PREFETCH|NHM_ALL_DRAM,
-               [ C(RESULT_MISS)   ] = NHM_DMND_PREFETCH|NHM_REMOTE_DRAM,
+               [ C(RESULT_ACCESS) ] = NHM_DMND_PREFETCH|NHM_LOCAL|NHM_REMOTE,
+               [ C(RESULT_MISS)   ] = NHM_DMND_PREFETCH|NHM_REMOTE,
        },
  },
 };
index 1cfbf228fbb1d7f6531ae5196ca7aa12d637df4d..24f049e7395291d59be49a4db9c3d13dce841532 100644 (file)
@@ -500,6 +500,9 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
        int pos;
        u32 reg32;
 
+       if (aspm_disabled)
+               return 0;
+
        /*
         * Some functions in a slot might not all be PCIe functions,
         * very strange. Disable ASPM for the whole slot
index f995e6e2f78c1d53a1a8c5843a77fe2c3684d620..15dbd8cc445f1a18aa5a8c2c1d4250fc614ccd64 100644 (file)
@@ -143,6 +143,30 @@ config FUJITSU_LAPTOP_DEBUG
 
          If you are not sure, say N here.
 
+config FUJITSU_TABLET
+       tristate "Fujitsu Tablet Extras"
+       depends on ACPI
+       depends on INPUT
+       ---help---
+         This is a driver for tablets built by Fujitsu:
+
+           * Lifebook P1510/P1610/P1620/Txxxx
+           * Stylistic ST5xxx
+           * Possibly other Fujitsu tablet models
+
+         It adds support for the panel buttons, docking station detection,
+         tablet/notebook mode detection for convertible and
+         orientation detection for docked slates.
+
+         If you have a Fujitsu convertible or slate, say Y or M here.
+
+config AMILO_RFKILL
+       tristate "Fujitsu-Siemens Amilo rfkill support"
+       depends on RFKILL
+       ---help---
+         This is a driver for enabling wifi on some Fujitsu-Siemens Amilo
+         laptops.
+
 config TC1100_WMI
        tristate "HP Compaq TC1100 Tablet WMI Extras (EXPERIMENTAL)"
        depends on !X86_64
index 293a320d9faaec9003fff3fa402d3e73322c66ae..d328f21e9fdd5a4a85f66956bdb7956d581f8119 100644 (file)
@@ -17,12 +17,14 @@ obj-$(CONFIG_ACER_WMI)              += acer-wmi.o
 obj-$(CONFIG_ACERHDF)          += acerhdf.o
 obj-$(CONFIG_HP_ACCEL)         += hp_accel.o
 obj-$(CONFIG_HP_WMI)           += hp-wmi.o
+obj-$(CONFIG_AMILO_RFKILL)     += amilo-rfkill.o
 obj-$(CONFIG_TC1100_WMI)       += tc1100-wmi.o
 obj-$(CONFIG_SONY_LAPTOP)      += sony-laptop.o
 obj-$(CONFIG_IDEAPAD_LAPTOP)   += ideapad-laptop.o
 obj-$(CONFIG_THINKPAD_ACPI)    += thinkpad_acpi.o
 obj-$(CONFIG_SENSORS_HDAPS)    += hdaps.o
 obj-$(CONFIG_FUJITSU_LAPTOP)   += fujitsu-laptop.o
+obj-$(CONFIG_FUJITSU_TABLET)   += fujitsu-tablet.o
 obj-$(CONFIG_PANASONIC_LAPTOP) += panasonic-laptop.o
 obj-$(CONFIG_INTEL_MENLOW)     += intel_menlow.o
 obj-$(CONFIG_ACPI_WMI)         += wmi.o
index b848277171a4e74cbd373338fe1a3425381e3cf7..1e5290b5396dc2e290864782500b5caf28c0a747 100644 (file)
@@ -679,6 +679,32 @@ static acpi_status AMW0_find_mailled(void)
        return AE_OK;
 }
 
+static int AMW0_set_cap_acpi_check_device_found;
+
+static acpi_status AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
+       u32 level, void *context, void **retval)
+{
+       AMW0_set_cap_acpi_check_device_found = 1;
+       return AE_OK;
+}
+
+static const struct acpi_device_id norfkill_ids[] = {
+       { "VPC2004", 0},
+       { "IBM0068", 0},
+       { "LEN0068", 0},
+       { "", 0},
+};
+
+static int AMW0_set_cap_acpi_check_device(void)
+{
+       const struct acpi_device_id *id;
+
+       for (id = norfkill_ids; id->id[0]; id++)
+               acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
+                               NULL, NULL);
+       return AMW0_set_cap_acpi_check_device_found;
+}
+
 static acpi_status AMW0_set_capabilities(void)
 {
        struct wmab_args args;
@@ -692,7 +718,9 @@ static acpi_status AMW0_set_capabilities(void)
         * work.
         */
        if (wmi_has_guid(AMW0_GUID2)) {
-               interface->capability |= ACER_CAP_WIRELESS;
+               if ((quirks != &quirk_unknown) ||
+                   !AMW0_set_cap_acpi_check_device())
+                       interface->capability |= ACER_CAP_WIRELESS;
                return AE_OK;
        }
 
diff --git a/drivers/platform/x86/amilo-rfkill.c b/drivers/platform/x86/amilo-rfkill.c
new file mode 100644 (file)
index 0000000..19170bb
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * Support for rfkill on some Fujitsu-Siemens Amilo laptops.
+ * Copyright 2011 Ben Hutchings.
+ *
+ * Based in part on the fsam7440 driver, which is:
+ * Copyright 2005 Alejandro Vidal Mata & Javier Vidal Mata.
+ * and on the fsaa1655g driver, which is:
+ * Copyright 2006 Martin Večeřa.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/module.h>
+#include <linux/dmi.h>
+#include <linux/i8042.h>
+#include <linux/io.h>
+#include <linux/moduleparam.h>
+#include <linux/platform_device.h>
+#include <linux/rfkill.h>
+
+/*
+ * These values were obtained from disassembling and debugging the
+ * PM.exe program installed in the Fujitsu-Siemens AMILO A1655G
+ */
+#define A1655_WIFI_COMMAND     0x10C5
+#define A1655_WIFI_ON          0x25
+#define A1655_WIFI_OFF         0x45
+
+static int amilo_a1655_rfkill_set_block(void *data, bool blocked)
+{
+       u8 param = blocked ? A1655_WIFI_OFF : A1655_WIFI_ON;
+       int rc;
+
+       i8042_lock_chip();
+       rc = i8042_command(&param, A1655_WIFI_COMMAND);
+       i8042_unlock_chip();
+       return rc;
+}
+
+static const struct rfkill_ops amilo_a1655_rfkill_ops = {
+       .set_block = amilo_a1655_rfkill_set_block
+};
+
+/*
+ * These values were obtained from disassembling the PM.exe program
+ * installed in the Fujitsu-Siemens AMILO M 7440
+ */
+#define M7440_PORT1            0x118f
+#define M7440_PORT2            0x118e
+#define M7440_RADIO_ON1                0x12
+#define M7440_RADIO_ON2                0x80
+#define M7440_RADIO_OFF1       0x10
+#define M7440_RADIO_OFF2       0x00
+
+static int amilo_m7440_rfkill_set_block(void *data, bool blocked)
+{
+       u8 val1 = blocked ? M7440_RADIO_OFF1 : M7440_RADIO_ON1;
+       u8 val2 = blocked ? M7440_RADIO_OFF2 : M7440_RADIO_ON2;
+
+       outb(val1, M7440_PORT1);
+       outb(val2, M7440_PORT2);
+
+       /* Check whether the state has changed correctly */
+       if (inb(M7440_PORT1) != val1 || inb(M7440_PORT2) != val2)
+               return -EIO;
+
+       return 0;
+}
+
+static const struct rfkill_ops amilo_m7440_rfkill_ops = {
+       .set_block = amilo_m7440_rfkill_set_block
+};
+
+static const struct dmi_system_id __devinitdata amilo_rfkill_id_table[] = {
+       {
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+                       DMI_MATCH(DMI_BOARD_NAME, "AMILO A1655"),
+               },
+               .driver_data = (void *)&amilo_a1655_rfkill_ops
+       },
+       {
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+                       DMI_MATCH(DMI_BOARD_NAME, "AMILO M7440"),
+               },
+               .driver_data = (void *)&amilo_m7440_rfkill_ops
+       },
+       {}
+};
+
+static struct platform_device *amilo_rfkill_pdev;
+static struct rfkill *amilo_rfkill_dev;
+
+static int __devinit amilo_rfkill_probe(struct platform_device *device)
+{
+       const struct dmi_system_id *system_id =
+               dmi_first_match(amilo_rfkill_id_table);
+       int rc;
+
+       amilo_rfkill_dev = rfkill_alloc(KBUILD_MODNAME, &device->dev,
+                                       RFKILL_TYPE_WLAN,
+                                       system_id->driver_data, NULL);
+       if (!amilo_rfkill_dev)
+               return -ENOMEM;
+
+       rc = rfkill_register(amilo_rfkill_dev);
+       if (rc)
+               goto fail;
+
+       return 0;
+
+fail:
+       rfkill_destroy(amilo_rfkill_dev);
+       return rc;
+}
+
+static int amilo_rfkill_remove(struct platform_device *device)
+{
+       rfkill_unregister(amilo_rfkill_dev);
+       rfkill_destroy(amilo_rfkill_dev);
+       return 0;
+}
+
+static struct platform_driver amilo_rfkill_driver = {
+       .driver = {
+               .name   = KBUILD_MODNAME,
+               .owner  = THIS_MODULE,
+       },
+       .probe  = amilo_rfkill_probe,
+       .remove = amilo_rfkill_remove,
+};
+
+static int __init amilo_rfkill_init(void)
+{
+       int rc;
+
+       if (dmi_first_match(amilo_rfkill_id_table) == NULL)
+               return -ENODEV;
+
+       rc = platform_driver_register(&amilo_rfkill_driver);
+       if (rc)
+               return rc;
+
+       amilo_rfkill_pdev = platform_device_register_simple(KBUILD_MODNAME, -1,
+                                                           NULL, 0);
+       if (IS_ERR(amilo_rfkill_pdev)) {
+               rc = PTR_ERR(amilo_rfkill_pdev);
+               goto fail;
+       }
+
+       return 0;
+
+fail:
+       platform_driver_unregister(&amilo_rfkill_driver);
+       return rc;
+}
+
+static void __exit amilo_rfkill_exit(void)
+{
+       platform_device_unregister(amilo_rfkill_pdev);
+       platform_driver_unregister(&amilo_rfkill_driver);
+}
+
+MODULE_AUTHOR("Ben Hutchings <ben@decadent.org.uk>");
+MODULE_LICENSE("GPL");
+MODULE_DEVICE_TABLE(dmi, amilo_rfkill_id_table);
+
+module_init(amilo_rfkill_init);
+module_exit(amilo_rfkill_exit);
diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c
new file mode 100644 (file)
index 0000000..580d80a
--- /dev/null
@@ -0,0 +1,478 @@
+/*
+ * Copyright (C) 2006-2012 Robert Gerlach <khnz@gmx.de>
+ * Copyright (C) 2005-2006 Jan Rychter <jan@rychter.com>
+ *
+ * You can redistribute and/or modify this program under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+ * Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/bitops.h>
+#include <linux/io.h>
+#include <linux/ioport.h>
+#include <linux/acpi.h>
+#include <linux/device.h>
+#include <linux/interrupt.h>
+#include <linux/input.h>
+#include <linux/delay.h>
+#include <linux/dmi.h>
+
+#define MODULENAME "fujitsu-tablet"
+
+#define ACPI_FUJITSU_CLASS "fujitsu"
+
+#define INVERT_TABLET_MODE_BIT      0x01
+#define FORCE_TABLET_MODE_IF_UNDOCK 0x02
+
+#define KEYMAP_LEN 16
+
+static const struct acpi_device_id fujitsu_ids[] = {
+       { .id = "FUJ02BD" },
+       { .id = "FUJ02BF" },
+       { .id = "" }
+};
+
+struct fujitsu_config {
+       unsigned short keymap[KEYMAP_LEN];
+       unsigned int quirks;
+};
+
+static unsigned short keymap_Lifebook_Tseries[KEYMAP_LEN] __initconst = {
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_SCROLLDOWN,
+       KEY_SCROLLUP,
+       KEY_DIRECTION,
+       KEY_LEFTCTRL,
+       KEY_BRIGHTNESSUP,
+       KEY_BRIGHTNESSDOWN,
+       KEY_BRIGHTNESS_ZERO,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_LEFTALT
+};
+
+static unsigned short keymap_Lifebook_U810[KEYMAP_LEN] __initconst = {
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_PROG1,
+       KEY_PROG2,
+       KEY_DIRECTION,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_UP,
+       KEY_DOWN,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_LEFTCTRL,
+       KEY_LEFTALT
+};
+
+static unsigned short keymap_Stylistic_Tseries[KEYMAP_LEN] __initconst = {
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_PRINT,
+       KEY_BACKSPACE,
+       KEY_SPACE,
+       KEY_ENTER,
+       KEY_BRIGHTNESSUP,
+       KEY_BRIGHTNESSDOWN,
+       KEY_DOWN,
+       KEY_UP,
+       KEY_SCROLLUP,
+       KEY_SCROLLDOWN,
+       KEY_LEFTCTRL,
+       KEY_LEFTALT
+};
+
+static unsigned short keymap_Stylistic_ST5xxx[KEYMAP_LEN] __initconst = {
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_RESERVED,
+       KEY_MAIL,
+       KEY_DIRECTION,
+       KEY_ESC,
+       KEY_ENTER,
+       KEY_BRIGHTNESSUP,
+       KEY_BRIGHTNESSDOWN,
+       KEY_DOWN,
+       KEY_UP,
+       KEY_SCROLLUP,
+       KEY_SCROLLDOWN,
+       KEY_LEFTCTRL,
+       KEY_LEFTALT
+};
+
+static struct {
+       struct input_dev *idev;
+       struct fujitsu_config config;
+       unsigned long prev_keymask;
+
+       char phys[21];
+
+       int irq;
+       int io_base;
+       int io_length;
+} fujitsu;
+
+static u8 fujitsu_ack(void)
+{
+       return inb(fujitsu.io_base + 2);
+}
+
+static u8 fujitsu_status(void)
+{
+       return inb(fujitsu.io_base + 6);
+}
+
+static u8 fujitsu_read_register(const u8 addr)
+{
+       outb(addr, fujitsu.io_base);
+       return inb(fujitsu.io_base + 4);
+}
+
+static void fujitsu_send_state(void)
+{
+       int state;
+       int dock, tablet_mode;
+
+       state = fujitsu_read_register(0xdd);
+
+       dock = state & 0x02;
+
+       if ((fujitsu.config.quirks & FORCE_TABLET_MODE_IF_UNDOCK) && (!dock)) {
+               tablet_mode = 1;
+       } else{
+               tablet_mode = state & 0x01;
+               if (fujitsu.config.quirks & INVERT_TABLET_MODE_BIT)
+                       tablet_mode = !tablet_mode;
+       }
+
+       input_report_switch(fujitsu.idev, SW_DOCK, dock);
+       input_report_switch(fujitsu.idev, SW_TABLET_MODE, tablet_mode);
+       input_sync(fujitsu.idev);
+}
+
+static void fujitsu_reset(void)
+{
+       int timeout = 50;
+
+       fujitsu_ack();
+
+       while ((fujitsu_status() & 0x02) && (--timeout))
+               msleep(20);
+
+       fujitsu_send_state();
+}
+
+static int __devinit input_fujitsu_setup(struct device *parent,
+                                        const char *name, const char *phys)
+{
+       struct input_dev *idev;
+       int error;
+       int i;
+
+       idev = input_allocate_device();
+       if (!idev)
+               return -ENOMEM;
+
+       idev->dev.parent = parent;
+       idev->phys = phys;
+       idev->name = name;
+       idev->id.bustype = BUS_HOST;
+       idev->id.vendor  = 0x1734;      /* Fujitsu Siemens Computer GmbH */
+       idev->id.product = 0x0001;
+       idev->id.version = 0x0101;
+
+       idev->keycode = fujitsu.config.keymap;
+       idev->keycodesize = sizeof(fujitsu.config.keymap[0]);
+       idev->keycodemax = ARRAY_SIZE(fujitsu.config.keymap);
+
+       __set_bit(EV_REP, idev->evbit);
+
+       for (i = 0; i < ARRAY_SIZE(fujitsu.config.keymap); i++)
+               if (fujitsu.config.keymap[i])
+                       input_set_capability(idev, EV_KEY, fujitsu.config.keymap[i]);
+
+       input_set_capability(idev, EV_MSC, MSC_SCAN);
+
+       input_set_capability(idev, EV_SW, SW_DOCK);
+       input_set_capability(idev, EV_SW, SW_TABLET_MODE);
+
+       input_set_capability(idev, EV_SW, SW_DOCK);
+       input_set_capability(idev, EV_SW, SW_TABLET_MODE);
+
+       error = input_register_device(idev);
+       if (error) {
+               input_free_device(idev);
+               return error;
+       }
+
+       fujitsu.idev = idev;
+       return 0;
+}
+
+static void input_fujitsu_remove(void)
+{
+       input_unregister_device(fujitsu.idev);
+}
+
+static irqreturn_t fujitsu_interrupt(int irq, void *dev_id)
+{
+       unsigned long keymask, changed;
+       unsigned int keycode;
+       int pressed;
+       int i;
+
+       if (unlikely(!(fujitsu_status() & 0x01)))
+               return IRQ_NONE;
+
+       fujitsu_send_state();
+
+       keymask  = fujitsu_read_register(0xde);
+       keymask |= fujitsu_read_register(0xdf) << 8;
+       keymask ^= 0xffff;
+
+       changed = keymask ^ fujitsu.prev_keymask;
+       if (changed) {
+               fujitsu.prev_keymask = keymask;
+
+               for_each_set_bit(i, &changed, KEYMAP_LEN) {
+                       keycode = fujitsu.config.keymap[i];
+                       pressed = keymask & changed & BIT(i);
+
+                       if (pressed)
+                               input_event(fujitsu.idev, EV_MSC, MSC_SCAN, i);
+
+                       input_report_key(fujitsu.idev, keycode, pressed);
+                       input_sync(fujitsu.idev);
+               }
+       }
+
+       fujitsu_ack();
+       return IRQ_HANDLED;
+}
+
+static int __devinit fujitsu_dmi_default(const struct dmi_system_id *dmi)
+{
+       printk(KERN_INFO MODULENAME ": %s\n", dmi->ident);
+       memcpy(fujitsu.config.keymap, dmi->driver_data,
+                       sizeof(fujitsu.config.keymap));
+       return 1;
+}
+
+static int __devinit fujitsu_dmi_stylistic(const struct dmi_system_id *dmi)
+{
+       fujitsu_dmi_default(dmi);
+       fujitsu.config.quirks |= FORCE_TABLET_MODE_IF_UNDOCK;
+       fujitsu.config.quirks |= INVERT_TABLET_MODE_BIT;
+       return 1;
+}
+
+static struct dmi_system_id dmi_ids[] __initconst = {
+       {
+               .callback = fujitsu_dmi_default,
+               .ident = "Fujitsu Siemens P/T Series",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK")
+               },
+               .driver_data = keymap_Lifebook_Tseries
+       },
+       {
+               .callback = fujitsu_dmi_default,
+               .ident = "Fujitsu Lifebook T Series",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook T")
+               },
+               .driver_data = keymap_Lifebook_Tseries
+       },
+       {
+               .callback = fujitsu_dmi_stylistic,
+               .ident = "Fujitsu Siemens Stylistic T Series",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Stylistic T")
+               },
+               .driver_data = keymap_Stylistic_Tseries
+       },
+       {
+               .callback = fujitsu_dmi_default,
+               .ident = "Fujitsu LifeBook U810",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook U810")
+               },
+               .driver_data = keymap_Lifebook_U810
+       },
+       {
+               .callback = fujitsu_dmi_stylistic,
+               .ident = "Fujitsu Siemens Stylistic ST5xxx Series",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "STYLISTIC ST5")
+               },
+               .driver_data = keymap_Stylistic_ST5xxx
+       },
+       {
+               .callback = fujitsu_dmi_stylistic,
+               .ident = "Fujitsu Siemens Stylistic ST5xxx Series",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Stylistic ST5")
+               },
+               .driver_data = keymap_Stylistic_ST5xxx
+       },
+       {
+               .callback = fujitsu_dmi_default,
+               .ident = "Unknown (using defaults)",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, ""),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "")
+               },
+               .driver_data = keymap_Lifebook_Tseries
+       },
+       { NULL }
+};
+
+static acpi_status __devinit
+fujitsu_walk_resources(struct acpi_resource *res, void *data)
+{
+       switch (res->type) {
+       case ACPI_RESOURCE_TYPE_IRQ:
+               fujitsu.irq = res->data.irq.interrupts[0];
+               return AE_OK;
+
+       case ACPI_RESOURCE_TYPE_IO:
+               fujitsu.io_base = res->data.io.minimum;
+               fujitsu.io_length = res->data.io.address_length;
+               return AE_OK;
+
+       case ACPI_RESOURCE_TYPE_END_TAG:
+               if (fujitsu.irq && fujitsu.io_base)
+                       return AE_OK;
+               else
+                       return AE_NOT_FOUND;
+
+       default:
+               return AE_ERROR;
+       }
+}
+
+static int __devinit acpi_fujitsu_add(struct acpi_device *adev)
+{
+       acpi_status status;
+       int error;
+
+       if (!adev)
+               return -EINVAL;
+
+       status = acpi_walk_resources(adev->handle, METHOD_NAME__CRS,
+                       fujitsu_walk_resources, NULL);
+       if (ACPI_FAILURE(status) || !fujitsu.irq || !fujitsu.io_base)
+               return -ENODEV;
+
+       sprintf(acpi_device_name(adev), "Fujitsu %s", acpi_device_hid(adev));
+       sprintf(acpi_device_class(adev), "%s", ACPI_FUJITSU_CLASS);
+
+       snprintf(fujitsu.phys, sizeof(fujitsu.phys),
+                       "%s/input0", acpi_device_hid(adev));
+
+       error = input_fujitsu_setup(&adev->dev,
+               acpi_device_name(adev), fujitsu.phys);
+       if (error)
+               return error;
+
+       if (!request_region(fujitsu.io_base, fujitsu.io_length, MODULENAME)) {
+               input_fujitsu_remove();
+               return -EBUSY;
+       }
+
+       fujitsu_reset();
+
+       error = request_irq(fujitsu.irq, fujitsu_interrupt,
+                       IRQF_SHARED, MODULENAME, fujitsu_interrupt);
+       if (error) {
+               release_region(fujitsu.io_base, fujitsu.io_length);
+               input_fujitsu_remove();
+               return error;
+       }
+
+       return 0;
+}
+
+static int __devexit acpi_fujitsu_remove(struct acpi_device *adev, int type)
+{
+       free_irq(fujitsu.irq, fujitsu_interrupt);
+       release_region(fujitsu.io_base, fujitsu.io_length);
+       input_fujitsu_remove();
+       return 0;
+}
+
+static int acpi_fujitsu_resume(struct acpi_device *adev)
+{
+       fujitsu_reset();
+       return 0;
+}
+
+static struct acpi_driver acpi_fujitsu_driver = {
+       .name  = MODULENAME,
+       .class = "hotkey",
+       .ids   = fujitsu_ids,
+       .ops   = {
+               .add    = acpi_fujitsu_add,
+               .remove = acpi_fujitsu_remove,
+               .resume = acpi_fujitsu_resume,
+       }
+};
+
+static int __init fujitsu_module_init(void)
+{
+       int error;
+
+       dmi_check_system(dmi_ids);
+
+       error = acpi_bus_register_driver(&acpi_fujitsu_driver);
+       if (error)
+               return error;
+
+       return 0;
+}
+
+static void __exit fujitsu_module_exit(void)
+{
+       acpi_bus_unregister_driver(&acpi_fujitsu_driver);
+}
+
+module_init(fujitsu_module_init);
+module_exit(fujitsu_module_exit);
+
+MODULE_AUTHOR("Robert Gerlach <khnz@gmx.de>");
+MODULE_DESCRIPTION("Fujitsu tablet pc extras driver");
+MODULE_LICENSE("GPL");
+MODULE_VERSION("2.4");
+
+MODULE_DEVICE_TABLE(acpi, fujitsu_ids);
index 05be30ee158b54e4e7a3d8344b2476c62fef6c78..ffff8b4b4949502dbc56997f873594da7314b4b4 100644 (file)
@@ -562,8 +562,8 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
 
        num_sifr = acpi_pcc_get_sqty(device);
 
-       if (num_sifr > 255) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "num_sifr too large"));
+       if (num_sifr < 0 || num_sifr > 255) {
+               ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "num_sifr out of range"));
                return -ENODEV;
        }
 
index 75085795528edd172568dedd2a82f5b160246029..61b7fd2729cdd5af934766e5ec5b04d154841f25 100644 (file)
@@ -1710,6 +1710,8 @@ static int sci_startup(struct uart_port *port)
 
        dev_dbg(port->dev, "%s(%d)\n", __func__, port->line);
 
+       pm_runtime_put_noidle(port->dev);
+
        sci_port_enable(s);
 
        ret = sci_request_irq(s);
@@ -1737,6 +1739,8 @@ static void sci_shutdown(struct uart_port *port)
        sci_free_irq(s);
 
        sci_port_disable(s);
+
+       pm_runtime_get_noresume(port->dev);
 }
 
 static unsigned int sci_scbrr_calc(unsigned int algo_id, unsigned int bps,
@@ -2075,6 +2079,7 @@ static int __devinit sci_init_single(struct platform_device *dev,
                sci_init_gpios(sci_port);
 
                pm_runtime_irq_safe(&dev->dev);
+               pm_runtime_get_noresume(&dev->dev);
                pm_runtime_enable(&dev->dev);
        }
 
index 4dd9283885e745bafdd7dce81e5456f98c5635c9..5e64748a29173d75ad976c0375f7152d5ae0171d 100644 (file)
@@ -920,16 +920,26 @@ cifs_push_mandatory_locks(struct cifsFileInfo *cfile)
        for (lockp = &inode->i_flock; *lockp != NULL; \
             lockp = &(*lockp)->fl_next)
 
+struct lock_to_push {
+       struct list_head llist;
+       __u64 offset;
+       __u64 length;
+       __u32 pid;
+       __u16 netfid;
+       __u8 type;
+};
+
 static int
 cifs_push_posix_locks(struct cifsFileInfo *cfile)
 {
        struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
        struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
        struct file_lock *flock, **before;
-       struct cifsLockInfo *lck, *tmp;
+       unsigned int count = 0, i = 0;
        int rc = 0, xid, type;
+       struct list_head locks_to_send, *el;
+       struct lock_to_push *lck, *tmp;
        __u64 length;
-       struct list_head locks_to_send;
 
        xid = GetXid();
 
@@ -940,29 +950,55 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile)
                return rc;
        }
 
+       lock_flocks();
+       cifs_for_each_lock(cfile->dentry->d_inode, before) {
+               if ((*before)->fl_flags & FL_POSIX)
+                       count++;
+       }
+       unlock_flocks();
+
        INIT_LIST_HEAD(&locks_to_send);
 
+       /*
+        * Allocating count locks is enough because no locks can be added to
+        * the list while we are holding cinode->lock_mutex that protects
+        * locking operations of this inode.
+        */
+       for (; i < count; i++) {
+               lck = kmalloc(sizeof(struct lock_to_push), GFP_KERNEL);
+               if (!lck) {
+                       rc = -ENOMEM;
+                       goto err_out;
+               }
+               list_add_tail(&lck->llist, &locks_to_send);
+       }
+
+       i = 0;
+       el = locks_to_send.next;
        lock_flocks();
        cifs_for_each_lock(cfile->dentry->d_inode, before) {
+               if (el == &locks_to_send) {
+                       /* something is really wrong */
+                       cERROR(1, "Can't push all brlocks!");
+                       break;
+               }
                flock = *before;
+               if ((flock->fl_flags & FL_POSIX) == 0)
+                       continue;
                length = 1 + flock->fl_end - flock->fl_start;
                if (flock->fl_type == F_RDLCK || flock->fl_type == F_SHLCK)
                        type = CIFS_RDLCK;
                else
                        type = CIFS_WRLCK;
-
-               lck = cifs_lock_init(flock->fl_start, length, type,
-                                    cfile->netfid);
-               if (!lck) {
-                       rc = -ENOMEM;
-                       goto send_locks;
-               }
+               lck = list_entry(el, struct lock_to_push, llist);
                lck->pid = flock->fl_pid;
-
-               list_add_tail(&lck->llist, &locks_to_send);
+               lck->netfid = cfile->netfid;
+               lck->length = length;
+               lck->type = type;
+               lck->offset = flock->fl_start;
+               i++;
+               el = el->next;
        }
-
-send_locks:
        unlock_flocks();
 
        list_for_each_entry_safe(lck, tmp, &locks_to_send, llist) {
@@ -979,11 +1015,18 @@ send_locks:
                kfree(lck);
        }
 
+out:
        cinode->can_cache_brlcks = false;
        mutex_unlock(&cinode->lock_mutex);
 
        FreeXid(xid);
        return rc;
+err_out:
+       list_for_each_entry_safe(lck, tmp, &locks_to_send, llist) {
+               list_del(&lck->llist);
+               kfree(lck);
+       }
+       goto out;
 }
 
 static int
index 45f07c46f3ed5d9e4afc29ebf0337844b8acd856..10d92cf57ab6c07c07097f5a0ee99a6fedc3ac01 100644 (file)
@@ -105,7 +105,6 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
        struct cifs_tcon *pTcon;
        struct super_block *sb;
        char *full_path;
-       struct cifs_ntsd *pacl;
 
        if (direntry == NULL)
                return -EIO;
@@ -164,23 +163,24 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
        } else if (strncmp(ea_name, CIFS_XATTR_CIFS_ACL,
                        strlen(CIFS_XATTR_CIFS_ACL)) == 0) {
+#ifdef CONFIG_CIFS_ACL
+               struct cifs_ntsd *pacl;
                pacl = kmalloc(value_size, GFP_KERNEL);
                if (!pacl) {
                        cFYI(1, "%s: Can't allocate memory for ACL",
                                        __func__);
                        rc = -ENOMEM;
                } else {
-#ifdef CONFIG_CIFS_ACL
                        memcpy(pacl, ea_value, value_size);
                        rc = set_cifs_acl(pacl, value_size,
                                direntry->d_inode, full_path, CIFS_ACL_DACL);
                        if (rc == 0) /* force revalidate of the inode */
                                CIFS_I(direntry->d_inode)->time = 0;
                        kfree(pacl);
+               }
 #else
                        cFYI(1, "Set CIFS ACL not supported yet");
 #endif /* CONFIG_CIFS_ACL */
-               }
        } else {
                int temp;
                temp = strncmp(ea_name, POSIX_ACL_XATTR_ACCESS,
index d3ebdbe723d0d252358d23a75674d184e639dcb0..83ab215baab11bdacbc71d4a2b008d49da9fc003 100644 (file)
@@ -938,8 +938,7 @@ void lockdep_annotate_inode_mutex_key(struct inode *inode)
                struct file_system_type *type = inode->i_sb->s_type;
 
                /* Set new key only if filesystem hasn't already changed it */
-               if (!lockdep_match_class(&inode->i_mutex,
-                   &type->i_mutex_key)) {
+               if (lockdep_match_class(&inode->i_mutex, &type->i_mutex_key)) {
                        /*
                         * ensure nobody is actually holding i_mutex
                         */
@@ -966,6 +965,7 @@ void unlock_new_inode(struct inode *inode)
        spin_lock(&inode->i_lock);
        WARN_ON(!(inode->i_state & I_NEW));
        inode->i_state &= ~I_NEW;
+       smp_mb();
        wake_up_bit(&inode->i_state, __I_NEW);
        spin_unlock(&inode->i_lock);
 }
index e2ba62820a0f35ee0531a4ad6ac0dc6725ad0b58..46ea9cc16647c063ba0f485cf838d566e6b3dd42 100644 (file)
@@ -2162,7 +2162,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
                /* sayonara */
                error = complete_walk(nd);
                if (error)
-                       return ERR_PTR(-ECHILD);
+                       return ERR_PTR(error);
 
                error = -ENOTDIR;
                if (nd->flags & LOOKUP_DIRECTORY) {
@@ -2261,7 +2261,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
        /* Why this, you ask?  _Now_ we might have grown LOOKUP_JUMPED... */
        error = complete_walk(nd);
        if (error)
-               goto exit;
+               return ERR_PTR(error);
        error = -EISDIR;
        if (S_ISDIR(nd->inode->i_mode))
                goto exit;
index dca0c3881e82df76352b4254c520b7bcc9ee2928..d567b8448dfca100c9c221488f86a3c3c4268cd7 100644 (file)
@@ -201,12 +201,10 @@ out:
 static int udf_release_file(struct inode *inode, struct file *filp)
 {
        if (filp->f_mode & FMODE_WRITE) {
-               mutex_lock(&inode->i_mutex);
                down_write(&UDF_I(inode)->i_data_sem);
                udf_discard_prealloc(inode);
                udf_truncate_tail_extent(inode);
                up_write(&UDF_I(inode)->i_data_sem);
-               mutex_unlock(&inode->i_mutex);
        }
        return 0;
 }
index b029296d20d9dfc3c8bd85fb563d7d404c9cb5a1..c7a6f6faf91e4e15e326c7dd03d8aabe4a197c08 100644 (file)
@@ -165,7 +165,7 @@ struct tracepoint_path *tracepoint_id_to_path(u64 config)
        struct tracepoint_path *path = NULL;
        DIR *sys_dir, *evt_dir;
        struct dirent *sys_next, *evt_next, sys_dirent, evt_dirent;
-       char id_buf[4];
+       char id_buf[24];
        int fd;
        u64 id;
        char evt_path[MAXPATHLEN];